@qaecy/cue-ui 0.0.1 → 0.0.3
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/README.md +107 -22
- package/card/3rdpartylicenses.txt +443 -0
- package/card/index.html +40 -0
- package/card/main.js +1 -0
- package/card/polyfills.js +1 -0
- package/card/poppins-latin-400-normal.woff +0 -0
- package/card/poppins-latin-400-normal.woff2 +0 -0
- package/card/poppins-latin-ext-400-normal.woff +0 -0
- package/card/poppins-latin-ext-400-normal.woff2 +0 -0
- package/card/runtime.js +1 -0
- package/card/styles.css +1 -0
- package/document-list/3rdpartylicenses.txt +723 -0
- package/document-list/index.html +549 -0
- package/document-list/main.js +1 -0
- package/document-list/polyfills.js +1 -0
- package/document-list/poppins-latin-400-normal.woff +0 -0
- package/document-list/poppins-latin-400-normal.woff2 +0 -0
- package/document-list/poppins-latin-ext-400-normal.woff +0 -0
- package/document-list/poppins-latin-ext-400-normal.woff2 +0 -0
- package/document-list/runtime.js +1 -0
- package/document-list/styles.css +1 -0
- package/document-viewer/236.js +1 -0
- package/document-viewer/336.js +1 -0
- package/document-viewer/3rdpartylicenses.txt +50 -68
- package/document-viewer/560.js +1 -1
- package/document-viewer/741.js +1 -0
- package/document-viewer/{160.js → 781.js} +1 -1
- package/document-viewer/83.js +1 -1
- package/document-viewer/885.js +1 -0
- package/document-viewer/common.js +1 -1
- package/document-viewer/index.html +595 -29
- package/document-viewer/main.js +1 -1
- package/logo/index.html +86 -1
- package/logo/main.js +1 -1
- package/package.json +10 -2
- package/project-documents/main.js +1 -1
- package/document-viewer/130.js +0 -1
- package/document-viewer/241.js +0 -1
- package/document-viewer/266.js +0 -1
- package/document-viewer/315.js +0 -1
- package/document-viewer/734.js +0 -1
- package/document-viewer/829.js +0 -1
- package/document-viewer/843.js +0 -1
- package/document-viewer/888.js +0 -1
package/document-viewer/130.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[130],{6130(sg,gd,Ft){"use strict";Ft.d(gd,{Spreadsheet:()=>BV});var _r=Ft(467),N=Ft(7705),G=Ft(5802),qr=Ft(2271),St=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,r){const i=t?this.allAsyncListeners:this.allSyncListeners;let s=i.get(e);return!s&&r&&(s=new Set,i.set(e,s)),s}noRegisteredListenersExist(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size}addEventListener(e,t,r=!1){this.getListeners(e,r,!0).add(t)}removeEventListener(e,t,r=!1){const i=this.getListeners(e,r,!1);i&&(i.delete(t),0===i.size&&(r?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 r=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(r,t,!1);if((n?.size??0)>0){const a=new Set(n);for(const l of a)n?.has(l)&&s(()=>l(e))}const o=this.getGlobalListeners(t);if(o.size>0){const a=new Set(o);for(const l of a)s(()=>l(r,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}};function zi(e){return null==e||""===e?null:e}function le(e){return null!=e&&""!==e}function pt(e){return!le(e)}function Ns(e){return null!=e&&"function"==typeof e.toString?e.toString():null}function xn(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)}function Ue(e,t,r=!1){const i=null==e,s=null==t;if(e?.toNumber&&(e=e.toNumber()),t?.toNumber&&(t=t.toNumber()),i&&s)return 0;if(i)return-1;if(s)return 1;function n(o,a){return o>a?1:o<a?-1:0}if("string"!=typeof e||!r)return n(e,t);try{return e.localeCompare(t)}catch{return n(e,t)}}var Sn=/[&<>"']/g,pd={"&":"&","<":"<",">":">",'"':""","'":"'"};function Hs(e){return e?.toString().toString()??null}function Rr(e){return Hs(e)?.replace(Sn,t=>pd[t])??null}function kr(e){return e.eRootDiv.getRootNode()}function mt(e){return kr(e).activeElement}function It(e){const{gos:t,eRootDiv:r}=e;let i=null;const s=t.get("getDocument");return s&&le(s)?i=s():r&&(i=r.ownerDocument),i&&le(i)?i:document}function Gs(e){const t=mt(e);return null===t||t===It(e).body}function Vs(e){return It(e).defaultView||window}function lo(e){let t=null,r=null;try{t=It(e).fullscreenElement}catch{}finally{t||(t=kr(e));r=t.querySelector("body")||(t instanceof ShadowRoot?t:t instanceof Document?t?.documentElement:t)}return r}function Tr(e,t,r){null==r||"string"==typeof r&&""==r?co(e,t):Xr(e,t,r)}function Xr(e,t,r){e.setAttribute(ra(t),r.toString())}function co(e,t){e.removeAttribute(ra(t))}function ra(e){return`aria-${e}`}function Qi(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function z(e,t){Tr(e,"label",t)}function W(e,t){Tr(e,"labelledby",t)}function Te(e,t){Tr(e,"live",t)}function Oe(e,t){Tr(e,"invalid",t)}function Dt(e,t){Tr(e,"hidden",t)}function $e(e,t){Xr(e,"expanded",t)}function dt(e,t){Xr(e,"rowindex",t)}function Lr(e,t){Xr(e,"colindex",t)}function Wi(e,t){Tr(e,"selected",t)}function et(e,t){Tr(e,"owns",t)}function Me(e,t){return void 0===t?e("ariaIndeterminate","indeterminate"):!0===t?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Wt="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function ci(e){return!!(e&&e.matches("input, select, button, textarea")&&e.matches(Wt))&&Ji(e)}function at(e,t,r={}){const{skipAriaHidden:i}=r;e.classList.toggle("ag-hidden",!t),i||Dt(e,!t)}function di(e,t){const r="disabled",i=t?n=>n.setAttribute(r,""):n=>n.removeAttribute(r);i(e);const s=e.querySelectorAll("input")??[];for(const n of s)i(n)}function Or(e,t,r){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,"number"==typeof r){if(++i>r)break}else if(e===r)break}return!1}function Gt(e){const{height:t,width:r,borderTopWidth:i,borderRightWidth:s,borderBottomWidth:n,borderLeftWidth:o,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:d,marginTop:u,marginRight:h,marginBottom:f,marginLeft:p,boxSizing:g}=window.getComputedStyle(e),m=Number.parseFloat;return{height:m(t||"0"),width:m(r||"0"),borderTopWidth:m(i||"0"),borderRightWidth:m(s||"0"),borderBottomWidth:m(n||"0"),borderLeftWidth:m(o||"0"),paddingTop:m(a||"0"),paddingRight:m(l||"0"),paddingBottom:m(c||"0"),paddingLeft:m(d||"0"),marginTop:m(u||"0"),marginRight:m(h||"0"),marginBottom:m(f||"0"),marginLeft:m(p||"0"),boxSizing:g}}function si(e){const t=Gt(e);return"border-box"===t.boxSizing?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function Ut(e){const t=Gt(e);return"border-box"===t.boxSizing?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function Pr(e){const{height:t,marginBottom:r,marginTop:i}=Gt(e);return Math.floor(t+r+i)}function ui(e){const{width:t,marginLeft:r,marginRight:i}=Gt(e);return Math.floor(t+r+i)}function ho(e){const t=e.getBoundingClientRect(),{borderTopWidth:r,borderLeftWidth:i,borderRightWidth:s,borderBottomWidth:n}=Gt(e);return{top:t.top+(r||0),left:t.left+(i||0),right:t.right+(s||0),bottom:t.bottom+(n||0)}}function En(e,t){let r=e.scrollLeft;return t&&(r=Math.abs(r)),r}function Ui(e,t,r){r&&(t*=-1),e.scrollLeft=t}function Rt(e){for(;e?.firstChild;)e.firstChild.remove()}function vr(e){e?.parentNode&&e.remove()}function ia(e){return!!e.offsetParent}function Ji(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!ia(e)||"visible"!==window.getComputedStyle(e).visibility)}function md(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function ng(e,t,r){r&&r.nextSibling===t||(e.firstChild?r?r.nextSibling?e.insertBefore(t,r.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function og(e,t){for(let r=0;r<t.length;r++){const i=t[r],s=e.children[r];s!==i&&e.insertBefore(i,s)}}function ox(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function sa(e,t){if(t)for(const r of Object.keys(t)){const i=t[r];if(!r?.length||null==i)continue;const s=ox(r),n=i.toString(),o=n.replace(/\s*!important/g,"");e.style.setProperty(s,o,o.length!=n.length?"important":void 0)}}function na(e){return()=>{const t=e();return!t||vd(t)||ag(t)}}function vd(e){return e.clientWidth<e.scrollWidth}function ag(e){return e.clientHeight<e.scrollHeight}function Fl(e,t){"flex"===t?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Zi(e,t)}function Zi(e,t){t=Cd(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function oa(e,t){t=Cd(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function Cd(e){return"number"==typeof e?`${e}px`:e}function wd(e){return e instanceof Node||e instanceof HTMLElement}function hi(e,t,r){null==r||""===r?e.removeAttribute(t):e.setAttribute(t,r.toString())}function zs(e,t,r){const s=Vs(e).ResizeObserver,n=s?new s(r):null;return n?.observe(t),()=>n?.disconnect()}function ws(e,t){const r=Vs(e);r.requestAnimationFrame?r.requestAnimationFrame(t):r.webkitRequestAnimationFrame?r.webkitRequestAnimationFrame(t):r.setTimeout(t,0)}var xd,lg="data-ref";function cg(){return xd??(xd=document.createTextNode(" ")),xd.cloneNode()}function aa(e){const{attrs:t,children:r,cls:i,ref:s,role:n,tag:o}=e,a=document.createElement(o);if(i&&(a.className=i),s&&a.setAttribute(lg,s),n&&a.setAttribute("role",n),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(r)if("string"==typeof r)a.textContent=r;else{let l=!0;for(const c of r)c&&("string"==typeof c?(a.appendChild(document.createTextNode(c)),l=!1):"function"==typeof c?a.appendChild(c()):(l&&(a.appendChild(cg()),l=!1),a.append(aa(c)),a.appendChild(cg())))}return a}var ax=["touchstart","touchend","touchmove","touchcancel","scroll"],lx=["wheel"],Sd={},dg=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return r=>{if("boolean"==typeof Sd[r])return Sd[r];const i=document.createElement(e[r]||"div");return Sd[r="on"+r]=r in i}})();function cx(e,t){return!(!t||!e)&&function ux(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():function dx(e){const t=[];let r=e.target;for(;r;)t.push(r),r=r.parentElement;return t}(t)}(t).indexOf(e)>=0}function ug(e,t,r){if(0===r)return!1;const i=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(i,s)<=r}var la=(e,t)=>{const r=e.identifier;for(let i=0,s=t.length;i<s;++i){const n=t[i];if(n.identifier===r)return n}return null};function ca(e,t){return e.gos.isElementInThisInstance(t.target)}var Rl=(e,...t)=>{for(const r of t){const[i,s,n,o]=r;i.addEventListener(s,n,o),e.push(r)}},bd=e=>{if(e){for(const[t,r,i,s]of e)t.removeEventListener(r,i,s);e.length=0}},Ws=e=>{e.cancelable&&e.preventDefault()};function px(e,t){return t}function hg(e){return e?.getLocaleTextFunc()??px}var es=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,r){this.localEventService||(this.localEventService=new St),this.localEventService.addEventListener(e,t,r)}removeEventListener(e,t,r){this.localEventService?.removeEventListener(e,t,r)}dispatchLocalEvent(e){this.localEventService?.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const r=[];for(const i of Object.keys(t)){const s=t[i];s&&r.push(this._setupListener(e,i,s))}return r}_setupListener(e,t,r){if(this.destroyed)return()=>null;let i;if(function wx(e){return void 0!==e.__addEventListener}(e))e.__addEventListener(t,r),i=()=>(e.__removeEventListener(t,r),null);else{const s=function xx(e){return"global"===e.eventServiceType}(e);e instanceof HTMLElement?function hx(e,t,r){const i=(e=>{const t=ax.includes(e),r=lx.includes(e);return!!t||!r&&void 0})(t);let s;null!=i&&(s={passive:i}),e.addEventListener(t,r,s)}(e,t,r):s?e.addListener(t,r):e.addEventListener(t,r),i=s?()=>(e.removeListener(t,r),null):()=>(e.removeEventListener(t,r),null)}return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}setupPropertyListener(e,t){const{gos:r}=this;r.addPropertyEventListener(e,t);const i=()=>(r.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.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const r=e.join("-")+this.propertyListenerId++,i=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[r])return;this.lastChangeSetIdLookup[r]=s.changeSet.id}t({type:"propertyChanged",changeSet:s.changeSet,source:s.source})};for(const s of e)this.setupPropertyListener(s,i)}getLocaleTextFunc(){return hg(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 r=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),r}createBean(e,t,r){return(t||this.stubContext).createBean(e,r)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}},Q=class extends es{},fg={};function yd(e,t){fg[t]||(e(),fg[t]=!0)}var Sx={pending:!1,funcs:[]},bx={pending:!1,funcs:[]};function Ed(e,t="setTimeout",r){const i="raf"===t?bx:Sx;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;for(const o of n)o()};"raf"===t?ws(r,s):window.setTimeout(s,0)}function Cr(e,t,r){let i;return function(...s){const n=this;window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(n,s)},r)}}function gg(e,t){let r=0;return function(...i){const n=Date.now();n-r<t||(r=n,e.apply(this,i))}}var pg=new Set(["__proto__","constructor","prototype"]);function Jr(e,t,r=!0,i=!1){le(t)&&function Ex(e,t){if(null!=e){if(Array.isArray(e)){for(let r=0;r<e.length;r++)t(r.toString(),e[r]);return}for(const r of Object.keys(e).filter(i=>!pg.has(i)))t(r,e[r])}}(t,(s,n)=>{let o=e[s];o!==n&&(i&&null==o&&null!=n&&"object"==typeof n&&n.constructor===Object&&(o={},e[s]=o),mg(n)&&mg(o)&&!Array.isArray(o)?Jr(o,n,r,i):(r||void 0!==n)&&(e[s]=n))})}function mg(e){return"object"==typeof e&&null!==e}var Fx=(()=>{let e=class Bs{static applyGlobalGridOptions(r){if(!Bs.gridOptions)return{...r};let i={};return Jr(i,Bs.gridOptions,!0,!0),"deep"===Bs.mergeStrategy?Jr(i,r,!0,!0):i={...i,...r},Bs.gridOptions.context&&(i.context=Bs.gridOptions.context),r.context&&("deep"===Bs.mergeStrategy&&i.context&&Jr(r.context,i.context,!0,!0),i.context=r.context),i}static applyGlobalGridOption(r,i){if("deep"===Bs.mergeStrategy){const s=function vg(e){return da.gridOptions?.[e]}(r);if(s&&"object"==typeof s&&"object"==typeof i)return Bs.applyGlobalGridOptions({[r]:i})[r]}return i}};return e.gridOptions=void 0,e.mergeStrategy="shallow",e})(),da=Fx;var Cg={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:"\t",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1,enableFilterHandlers:!1},wg="https://www.ag-grid.com";function Us(e,t,...r){e.get("debug")&&console.log("AG Grid: "+t,...r)}function fo(e,...t){yd(()=>console.warn("AG Grid: "+e,...t),e+t?.join(""))}function go(e,...t){yd(()=>console.error("AG Grid: "+e,...t),e+t?.join(""))}var Tl,xg=new Set,kl={},Fn={},Sg=!1,bg=!1;function ua(e,t,r=!1){r||(Sg=!0),function kx(e){Tl||(Tl=e.version);const t=i=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${i} Please update all modules to the same version.`;e.version?function Rx(e){const[t,r]=e.version.split(".")||[],[i,s]=Tl.split(".")||[];return t===i&&r===s}(e)||go(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Tl}.`)):go(t(`'${e.moduleName}' is incompatible.`));const r=e.validate?.();r&&!r.isValid&&go(`${r.message}`)}(e);const i=e.rowModels??["all"];let s;xg.add(e),void 0!==t?(bg=!0,void 0===Fn[t]&&(Fn[t]={}),s=Fn[t]):s=kl;for(const n of i)void 0===s[n]&&(s[n]={}),s[n][e.moduleName]=e;if(e.dependsOn)for(const n of e.dependsOn)ua(n,t,r)}function Fd(e,t,r){const i=s=>!!kl[s]?.[e]||!!Fn[t]?.[s]?.[e];return i(r)||i("all")}function Rd(){return bg}var kd=class{static register(e){ua(e,void 0)}static registerModules(e){for(const t of e)ua(t,void 0)}},he="34.3.1",kg="_version_",Tg=null,po=`${wg}/javascript-data-grid`;function Pg(e,t,r){return Tg?.(e,t)??[Bx(e,t,r)]}function Pl(e,t,r,i,s){e(`${i?"warning":"error"} #${t}`,...Pg(t,r,s))}function Lx(e){let t=e;return e instanceof Error?t=e.toString():"object"==typeof e&&(t=function _x(e){if(!e)return String(e);const t={};for(const r of Object.keys(e))"object"!=typeof e[r]&&"function"!=typeof e[r]&&(t[r]=e[r]);return JSON.stringify(t)}(e)),t}function Dl(e){return void 0===e?"undefined":null===e?"null":e}function Td(e,t){return`${e}?${t.toString()}`}function Dg(e,t){const r=new URLSearchParams;if(r.append(kg,he),t)for(const n of Object.keys(t))r.append(n,Lx(t[n]));const i=`${po}/errors/${e}`,s=Td(i,r);return s.length<=2e3?s:function Ox(e,t,r){const i=Array.from(t.entries()).sort((n,o)=>o[1].length-n[1].length);let s=Td(e,t);for(const[n,o]of i){if(n===kg)continue;const a=s.length-r;if(a<=0)break;const l="...",c=a+l.length,d=o.length-c>100?o.slice(0,o.length-c)+l:o.slice(0,100)+l;t.set(n,d),s=Td(e,t)}return s}(i,r,2e3)}var Bx=(e,t,r)=>{const s=`${r?r+" \n":""}Visit ${Dg(e,t)}`;return`${s}${r?"":" \n Alternatively register the ValidationModule to see the full message in the console."}`};function ne(...e){Pl(fo,e[0],e[1],!0)}function Ct(...e){Pl(go,e[0],e[1],!1)}function ha(e,t,r){Pl(go,e,t,!1,r)}function ts(...e){return function Ag(e,t){const r=t[0];return`error #${r} `+Pg(r,t[1],e).join(" ")}(void 0,e)}function Mg(e,t){return e.get("rowModelType")===t}function rr(e,t){return Mg(e,"clientSide")}function mo(e,t){return Mg(e,"serverSide")}function Dr(e,t){return e.get("domLayout")===t}function Rn(e){return void 0!==Il(e)}function Ig(e){return"function"==typeof e.get("getRowHeight")}function $s(e,t,r=!1,i){const{gos:s,environment:n}=e;if(null==i&&(i=n.getDefaultRowHeight()),Ig(s)){if(r)return{height:i,estimated:!0};const l={node:t,data:t.data},c=s.getCallback("getRowHeight")(l);if(Pd(c))return 0===c&&ne(23),{height:Math.max(1,c),estimated:!1}}if(t.detail&&s.get("masterDetail"))return function Hx(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return Pd(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}(s);const o=s.get("rowHeight");return{height:o&&Pd(o)?o:i,estimated:!1}}function kn(e){const{environment:t,gos:r}=e,i=r.get("rowHeight");if(!i||pt(i))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return-1!==s?s:(ne(24),t.getDefaultRowHeight())}function Pd(e){return!isNaN(e)&&"number"==typeof e&&isFinite(e)}function _g(e,t,r){const i=t[e.getDomDataKey()];return i?i[r]:void 0}function Tn(e,t,r,i){const s=e.getDomDataKey();let n=t[s];pt(n)&&(n={},t[s]=n),n[r]=i}function vo(e){return!e.get("ensureDomOrder")&&e.get("animateRows")}function Lg(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Dr(e,"print"))}function rs(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function Dd(e){const t=e.get("groupAggFiltering");return"function"==typeof t?e.getCallback("groupAggFiltering"):!0===t?()=>!0:void 0}function Og(e){return e.get("grandTotalRow")}function Bg(e,t){return!t&&"groupRows"===e.get("groupDisplayType")}function Ng(e,t,r){return!!t.group&&!t.footer&&Bg(e,r)}function Co(e){const t=e.getCallback("getRowId");return void 0===t?t:r=>{let i=t(r);return"string"!=typeof i&&(yd(()=>ne(25,{id:i}),"getRowIdString"),i=String(i)),i}}function wo(e){return e?.checkboxes??!0}function Al(e){return"multiRow"===e?.mode&&(e.headerCheckbox??!0)}function Ml(e){if("object"==typeof e)return e.checkboxLocation??"selectionColumn"}function Ad(e){return e?.hideDisabledCheckboxes??!1}function xs(e){const t=e.get("cellSelection");return void 0!==t?!!t:e.get("enableRangeSelection")}function Hg(e){const t=e.get("rowSelection")??"single";if("string"==typeof t){const r=e.get("suppressRowClickSelection"),i=e.get("suppressRowDeselection");return(!r||!i)&&(r?"enableDeselection":!i||"enableSelection")}return("singleRow"===t.mode||"multiRow"===t.mode)&&(t.enableClickSelection??!1)}function Md(e){const t=e.get("rowSelection");return"string"==typeof t?e.get("isRowSelectable"):t?.isRowSelectable}function Il(e){const t="beanName"in e&&"gos"===e.beanName?e.get("rowSelection"):e.rowSelection;if("string"==typeof t)switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t?.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function fa(e){return"multiRow"===Il(e)}function _l(e){const t=e.get("rowSelection");if("string"==typeof t){const r=e.get("groupSelectsChildren"),i=e.get("groupSelectsFiltered");return r&&i?"filteredDescendants":r?"descendants":"self"}return"multiRow"===t?.mode?t.groupSelects:void 0}function Gg(e,t=!0){const r=e.get("rowSelection");return"object"!=typeof r?t?"all":void 0:"multiRow"===r.mode?r.selectAll:"all"}function ga(e){const t=_l(e);return"descendants"===t||"filteredDescendants"===t}function Vg(e){const t=e.get("rowSelection");return"object"==typeof t&&t.masterSelects||"self"}function fi(e){return"legacy"===e.get("columnMenu")}function _e(e,t){return e.addCommon(t)}function zg({gos:e},t){return 2===t.button||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var Jx={resizable:!0,sortable:!0},Zx=0;function Wg(){return Zx++}function js(e){return e instanceof Ks}var Ks=class extends Q{constructor(e,t,r,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=r,this.primary=i,this.isColumn=!0,this.instanceId=Wg(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new St,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Rr(r)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:r,colFlex:i}}=this;t?.initCol(this);const s=e.hide;this.visible=void 0!==s?!s:!e.initialHide,r?.initCol(this),i?.initCol(this)}setColDef(e,t,r){const i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&(this.beans.rowSpanSvc?.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",r)}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:r}}=this,i=e.get("suppressFieldDotNotation");this.fieldContainsDots=le(t)&&t.includes(".")&&!i,this.tooltipFieldContainsDots=le(r)&&r.includes(".")&&!i}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.beans.tooltipSvc?.initCol(this)}initRowSpan(){this.colDef.spanRows&&this.beans.rowSpanSvc?.register(this)}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:r=>{const i=e.recreateColDef(this.colDef);this.setColDef(i,i,r.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const r=e.width,i=e.initialWidth;return t=null!=r?r:null!=i?i:200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){return this.beans.showRowGroupCols?.isRowGroupDisplayed(this,e)??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.colEventSvc);const r=this.frameworkEventListenerService?.wrap(e,t)??t;this.colEventSvc.addEventListener(e,r)}removeEventListener(e,t){const r=this.frameworkEventListenerService?.unwrap(e,t)??t;this.colEventSvc.removeEventListener(e,r)}createColumnFunctionCallbackParams(e){return _e(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){return this.beans.cellNavigation?.isSuppressNavigable(this,e)??!1}isCellEditable(e){return this.beans.editSvc?.isCellEditable({rowNode:e,column:this})??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){return this.beans.selectionSvc?.isCellCheckboxSelection(this,e)??!1}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?.suppressPaste??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??Jx[e]}isColumnFunc(e,t){return"boolean"==typeof t?t:"function"==typeof t&&t(this.createColumnFunctionCallbackParams(e))}createColumnEvent(e,t){return _e(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return"asc"===this.sort}isSortDescending(){return"desc"===this.sort}isSortNone(){return pt(this.sort)}isSorting(){return le(this.sort)}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){return ne(261),!!this.beans.colHover?.isHovered(this)}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return"left"===this.pinned||"right"===this.pinned}isPinnedLeft(){return"left"===this.pinned}isPinnedRight(){return"right"===this.pinned}getPinned(){return this.pinned}setVisible(e,t){const r=!0===e;this.visible!==r&&(this.visible=r,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let e=this.getOriginalParent();for(;e?.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e?.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let r=!0;for(;e;){if(!e.isPadding()){r=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:r}}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 _e(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(pt(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),r=this.colDef.colSpan(t);return Math.max(r,1)}getRowSpan(e){if(pt(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),r=this.colDef.rowSpan(t);return Math.max(r,1)}setActualWidth(e,t,r=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,null!=this.flex&&"flex"!==t&&"gridInitializing"!==t&&(this.flex=null),r||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return!0===this.colDef.enablePivot}isAllowValue(){return!0===this.colDef.enableValue}isAllowRowGroup(){return!0===this.colDef.enableRowGroup}dispatchColEvent(e,t,r){const i=this.createColumnEvent(e,t);r&&Jr(i,r),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function Br(e){return e instanceof pa}var pa=class extends Q{constructor(e,t,r,i){super(),this.colGroupDef=e,this.groupId=t,this.padding=r,this.level=i,this.isColumn=!1,this.expandable=!1,this.instanceId=Wg(),this.expandableListenerRemoveCallback=null,this.expanded=!!e?.openByDefault}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return!!this.children&&this.children.some(e=>e.isVisible())}isPadding(){return this.padding}setExpanded(e){this.expanded=void 0!==e&&e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(const t of this.children)js(t)?e(t):Br(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)js(t)?e.push(t):Br(t)&&t.addLeafColumns(e)}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);for(const t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(const t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,r=!1;const i=this.findChildrenRemovingPadding();for(let n=0,o=i.length;n<o;n++){const a=i[n];if(!a.isVisible())continue;const l=a.getColumnGroupShow();"open"===l?(e=!0,r=!0):"closed"===l?(t=!0,r=!0):(e=!0,t=!0)}const s=e&&t&&r;this.expandable!==s&&(this.expandable=s,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=r=>{for(const i of r)Br(i)&&i.isPadding()?t(i.children):e.push(i)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},eS={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function Id(e,t,r){const i={},s=e.gos;return Object.assign(i,s.get("defaultColGroupDef")),Object.assign(i,t),s.validateColDef(i,r),i}var tS=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=Ns(e);let r=0;for(;;){let i=e??t;if(i?0!==r&&(i+="_"+r):i=r,!this.existingKeys[i]){const s=String(i);return e&&r>0&&ne(273,{providedId:e,usedId:s}),this.existingKeys[s]=!0,s}r++}}};function kt(e){if(e?.length)return e[e.length-1]}function qs(e,t,r){if(e===t)return!0;if(!e||!t)return null==e&&null==t;const i=e.length;if(i!==t.length)return!1;for(let s=0;s<i;s++)if(e[s]!==t[s]&&!r?.(e[s],t[s]))return!1;return!0}function ma(e,t){if(e)for(const r of e)t(r)}function ki(e,t){const r=e.indexOf(t);r>=0&&e.splice(r,1)}function Ug(e,t,r){for(let i=0;i<t.length;i++)ki(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(r,0,t[i])}Object.freeze([]);var Xs="ag-Grid-AutoColumn",_d="ag-Grid-SelectionColumn",Ld="ag-Grid-RowNumbersColumn";function $g(e){const t=[],r=i=>{for(let s=0;s<i.length;s++){const n=i[s];js(n)?t.push(n):Br(n)&&r(n.getChildren())}};return r(e),t}function Ss(e){return e.reduce((t,r)=>t+r.getActualWidth(),0)}function Ll(e,t,r){const i={};if(!t)return;is(null,t,n=>{i[n.getInstanceId()]=n}),r&&is(null,r,n=>{i[n.getInstanceId()]=null});const s=Object.values(i).filter(n=>null!=n);e.context.destroyBeans(s)}function Od(e){return e.getId().startsWith(Xs)}function bs(e){return("string"==typeof e?e:"getColId"in e?e.getColId():e.colId)?.startsWith(_d)??!1}function ys(e){return("string"==typeof e?e:"getColId"in e?e.getColId():e.colId)?.startsWith(Ld)??!1}function rS(e){return bs(e)||ys(e)}function Ol(e){let t=[];return e instanceof Array?t=e:"string"==typeof e&&(t=e.split(",")),t}function xo(e){return"optionsUpdated"===e?"gridOptionsChanged":e}function va(e,t){const r=e===t,i=e.getColDef()===t,s=e.getColId()==t;return r||i||s}var jg=(e,t)=>{Br(e)&&e.setupExpandable(),e.originalParent=t};function qg(e,t,r,i,s,n,o,a){if(!t)return[];const{colGroupSvc:l}=e,c=new Array(t.length);for(let d=0;d<c.length;d++){const u=t[d];c[d]=l&&Qg(u)?l.createProvidedColumnGroup(i,u,r,s,n,o,a):aS(e,i,u,s,n,a)}return c}function aS(e,t,r,i,s,n){const o=function lS(e,t){if(t)for(let r=0;r<t.length;r++){const i=t[r].getUserProvidedColDef();if(i)if(null==e.colId){if(null==e.field){if(i===e)return{idx:r,column:t[r]}}else if(i.field===e.field)return{idx:r,column:t[r]}}else if(t[r].getId()===e.colId)return{idx:r,column:t[r]}}}(r,i);o&&i?.splice(o.idx,1);let a=o?.column;if(a){const l=Bl(e,r,a.getColId());a.setColDef(l,r,n),function Yg(e,t,r,i){Xg(e,t,r.hide,r.sort,r.sortIndex,r.pinned,r.flex,i);const s=t.getFlex();if(!(null!=s&&s>0))if(null!=r.width)t.setActualWidth(r.width,i);else{const n=t.getActualWidth();t.setActualWidth(n,i)}}(e,a,l,n)}else{const l=s.getUniqueKey(r.colId,r.field),c=Bl(e,r,l);a=new Ks(c,r,l,t),e.context.createBean(a)}return e.dataTypeSvc?.addColumnListeners(a),a}function Xg(e,t,r,i,s,n,o,a){const{sortSvc:l,pinnedCols:c,colFlex:d}=e;void 0!==r&&t.setVisible(!r,a),l&&(l.updateColSort(t,i,a),void 0!==s&&l.setColSortIndex(t,s)),void 0!==n&&c?.setColPinned(t,n),void 0!==o&&d?.setColFlex(t,o)}function Bl(e,t,r,i){const{gos:s,dataTypeSvc:n}=e,o={};Jr(o,s.get("defaultColDef"),!1,!0);const l=function cS(e,t,r,i){const s=e.dataTypeSvc?.updateColDefAndGetColumnType(t,r,i),n=r.type??s??t.type;return t.type=n,n?Ol(n):void 0}(e,o,t,r);l&&function dS(e,t,r){if(!t.length)return;const i=Object.assign({},eS),s=e.gos.get("columnTypes")||{};for(const n of Object.keys(s)){const o=s[n];n in i?ne(34,{key:n}):(o.type&&ne(35),i[n]=o)}for(const n of t){const o=i[n.trim()];o?Jr(r,o,!1,!0):ne(36,{t:n})}}(e,l,o);const c=o.cellDataType;Jr(o,t,!1,!0),void 0!==c&&(o.cellDataType=c);const d=s.get("autoGroupColumnDef"),u=rs(s);return t.rowGroup&&d&&u&&Jr(o,{sort:d.sort,initialSort:d.initialSort},!1,!0),n&&(n.postProcess(o),n.validateColDef(o)),s.validateColDef(o,r,i),o}function Qg(e){return void 0!==e.children}function is(e,t,r){if(t)for(let i=0;i<t.length;i++){const s=t[i];Br(s)&&is(s,s.getChildren(),r),r(s,e)}}function Jg(e,t){const r=[],i=[],s=[];return e.forEach(o=>{const a=o.getColDef().lockPosition;"right"===a?s.push(o):"left"===a||!0===a?r.push(o):i.push(o)}),t.get("enableRtl")?[...s,...i,...r]:[...r,...i,...s]}function Zg(e,t){let r=!0;return is(null,t,i=>{if(!Br(i))return;const s=i;if(!s.getColGroupDef()?.marryChildren)return;const a=[];for(const h of s.getLeafColumns()){const f=e.indexOf(h);a.push(f)}Math.max.apply(Math,a)-Math.min.apply(Math,a)>s.getLeafColumns().length-1&&(r=!1)}),r}function ep(e,t){if(!e||0==e.length)return;const r=t(e[0]);for(let i=1;i<e.length;i++)if(r!==t(e[i]))return;return r}function tp(e,t,r){if(!t.length)return;const i=1===t.length?t[0]:null,s=ep(t,n=>n.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:i,source:r})}function So(e,t,r,i,s=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:1===t.length?t[0]:null,flexColumns:s,finished:r,source:i})}function $i(e,t,r){const{colModel:i,rowGroupColsSvc:s,pivotColsSvc:n,autoColSvc:o,selectionColSvc:a,colAnimation:l,visibleCols:c,pivotResultCols:d,environment:u,valueColsSvc:h,eventSvc:f,gos:p}=e,g=i.getColDefCols()??[],m=a?.getColumns();if(!g.length&&!m?.length)return!1;if(t?.state&&!t.state.forEach)return ne(32),!1;const v=(k,E,S,_,M)=>{if(!k)return;const H=((e,t)=>(r,i)=>{const s={value1:void 0,value2:void 0};let n=!1;return e&&(void 0!==e[r]&&(s.value1=e[r],n=!0),le(i)&&void 0!==e[i]&&(s.value2=e[i],n=!0)),!n&&t&&(void 0!==t[r]&&(s.value1=t[r]),le(i)&&void 0!==t[i]&&(s.value2=t[i])),s})(E,t.defaultState),V=H("flex").value1;if(Xg(e,k,H("hide").value1,H("sort").value1,H("sortIndex").value1,H("pinned").value1,V,r),null==V){const B=H("width").value1;if(null!=B){const re=k.getColDef().minWidth??u.getDefaultColumnMinWidth();null!=re&&B>=re&&k.setActualWidth(B,r)}}M||!k.isPrimary()||(h?.syncColumnWithState(k,r,H),s?.syncColumnWithState(k,r,H,S),n?.syncColumnWithState(k,r,H,_))},w=(k,E,S)=>{const _=ip(e,r),M=E.slice(),H={},V={},B=[],re=[],ue=[];let oe=0;const Ae=s?.columns.slice()??[],ke=n?.columns.slice()??[];for(const be of k){const te=be.colId;if(te.startsWith(Xs)){B.push(be),ue.push(be);continue}if(bs(te)){re.push(be),ue.push(be);continue}const j=S(te);j?(v(j,be,H,V,!1),ki(M,j)):(ue.push(be),oe+=1)}const Ze=be=>v(be,null,H,V,!1);M.forEach(Ze),s?.sortColumns(np.bind(s,H,Ae)),n?.sortColumns(np.bind(n,V,ke)),i.refreshCols(!1,r);const we=(be,te,A=[])=>{for(const j of te){const L=be(j.colId);ki(A,L),v(L,j,null,null,!0)}A.forEach(Ze)};return we(be=>o?.getColumn(be)??null,B,o?.getColumns()?.slice()),we(be=>a?.getColumn(be)??null,re,a?.getColumns()?.slice()),function fS(e,t,r){if(!e.applyOrder||!e.state)return;const i=[];for(const s of e.state)null!=s.colId&&i.push(s.colId);!function gS(e,t,r,i){if(null==e)return;let s=[];const n={};for(const a of t){if(n[a])continue;const l=e.map[a];l&&(s.push(l),n[a]=!0)}let o=0;for(const a of e.list){const l=a.getColId();null==n[l]&&(l.startsWith(Xs)?s.splice(o++,0,a):s.push(a))}s=Jg(s,i),Zg(s,r.getColTree())?e.list=s:ne(39)}(t.cols,i,t,r)}(t,i,p),c.refresh(r),f.dispatchEvent({type:"columnEverythingChanged",source:r}),_(),{unmatchedAndAutoStates:ue,unmatchedCount:oe}};l?.start();let{unmatchedAndAutoStates:C,unmatchedCount:y}=w(t.state||[],g,k=>i.getColDefCol(k));return(C.length>0||le(t.defaultState))&&(y=w(C,d?.getPivotResultCols()?.list??[],E=>d?.getPivotResultCol(E)??null).unmatchedCount),l?.finish(),0===y}function ip(e,t){const{rowGroupColsSvc:r,pivotColsSvc:i,valueColsSvc:s,colModel:n,sortSvc:o,eventSvc:a}=e,l={rowGroupColumns:r?.columns.slice()??[],pivotColumns:i?.columns.slice()??[],valueColumns:s?.columns.slice()??[]},c=Nl(e),d={};for(const u of c)d[u.colId]=u;return()=>{const u=(E,S,_,M)=>{if(qs(S.map(M),_.map(M)))return;const re=new Set(S);for(const oe of _)re.delete(oe)||re.add(oe);const ue=[...re];a.dispatchEvent({type:E,columns:ue,column:1===ue.length?ue[0]:null,source:t})},h=E=>{const S=[];return n.forAllCols(_=>{const M=d[_.getColId()];M&&E(M,_)&&S.push(_)}),S},f=E=>E.getColId();u("columnRowGroupChanged",l.rowGroupColumns,r?.columns??[],f),u("columnPivotChanged",l.pivotColumns,i?.columns??[],f);const g=h((E,S)=>{const _=null!=E.aggFunc,M=_!=S.isValueActive(),H=_&&E.aggFunc!=S.getAggFunc();return M||H});g.length>0&&function rp(e,t,r,i){e.dispatchEvent({type:t,columns:r,column:r&&1==r.length?r[0]:null,source:i})}(a,"columnValueChanged",g,t),So(a,h((E,S)=>E.width!=S.getActualWidth()),!0,t),tp(a,h((E,S)=>E.pinned!=S.getPinned()),t),function uS(e,t,r){if(!t.length)return;const i=1===t.length?t[0]:null,s=ep(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:i,source:r})}(a,h((E,S)=>E.hide==S.isVisible()),t);const y=h((E,S)=>E.sort!=S.getSort()||E.sortIndex!=S.getSortIndex());y.length>0&&o?.dispatchSortChangedEvents(t,y);const k=Nl(e);!function pS(e,t,r,i,s){const n={};for(const d of t)n[d.colId]=d;const o={};for(const d of e)n[d.colId]&&(o[d.colId]=!0);const a=e.filter(d=>o[d.colId]),l=t.filter(d=>o[d.colId]),c=[];l.forEach((d,u)=>{const h=a?.[u];if(h&&h.colId!==d.colId){const f=i.getCol(h.colId);f&&c.push(f)}}),c.length&&s.dispatchEvent({type:"columnMoved",columns:c,column:1===c.length?c[0]:null,finished:!0,source:r})}(c,k,t,n,a)}}function Nl(e){const{colModel:t,rowGroupColsSvc:r,pivotColsSvc:i}=e;if(pt(t.getColDefCols())||!t.isAlive())return[];const n=r?.columns,o=i?.columns,a=[];t.forAllCols(d=>(d=>{const u=d.isRowGroupActive()&&n?n.indexOf(d):null,h=d.isPivotActive()&&o?o.indexOf(d):null,f=d.isValueActive()?d.getAggFunc():null,p=null!=d.getSort()?d.getSort():null,g=null!=d.getSortIndex()?d.getSortIndex():null;a.push({colId:d.getColId(),width:d.getActualWidth(),hide:!d.isVisible(),pinned:d.getPinned(),sort:p,sortIndex:g,aggFunc:f,rowGroup:d.isRowGroupActive(),rowGroupIndex:u,pivot:d.isPivotActive(),pivotIndex:h,flex:d.getFlex()??null})})(d));const c=new Map(t.getCols().map((d,u)=>[d.getColId(),u]));return a.sort((d,u)=>(c.has(d.colId)?c.get(d.colId):-1)-(c.has(u.colId)?c.get(u.colId):-1)),a}function sp(e){const t=(p,g)=>p??g??null,r=e.getColDef(),i=t(r.sort,r.initialSort),s=t(r.sortIndex,r.initialSortIndex),n=t(r.hide,r.initialHide),o=t(r.pinned,r.initialPinned),a=t(r.width,r.initialWidth),l=t(r.flex,r.initialFlex);let c=t(r.rowGroupIndex,r.initialRowGroupIndex),d=t(r.rowGroup,r.initialRowGroup);null==c&&!d&&(c=null,d=null);let u=t(r.pivotIndex,r.initialPivotIndex),h=t(r.pivot,r.initialPivot);null==u&&!h&&(u=null,h=null);const f=t(r.aggFunc,r.initialAggFunc);return{colId:e.getColId(),sort:i,sortIndex:s,hide:n,pinned:o,width:a,flex:l,rowGroup:d,rowGroupIndex:c,pivot:h,pivotIndex:u,aggFunc:f}}var np=(e,t,r,i)=>{const s=e[r.getId()],n=e[i.getId()],o=null!=s,a=null!=n;if(o&&a)return s-n;if(o)return-1;if(a)return 1;const l=t.indexOf(r),c=t.indexOf(i),d=l>=0;return d&&c>=0?l-c:d?-1:1},op=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let r;return r="number"!=typeof t?0:t+1,this.existingIds[e]=r,r}};function Ca(e,t,r){return r&&e.addDestroyFunc(()=>t.destroyBean(r)),r??e}var ge=null;function ap(e){return"function"==typeof e?.getGui}var lp=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){if(e){if(e.indexOf(" ")>=0){const i=(e||"").split(" ");if(i.length>1){for(const s of i)this.toggleCss(s,t);return}}this.cssClassStates[e]!==t&&e.length&&(this.getGui()?.classList.toggle(e,t),this.cssClassStates[e]=t)}}},vS=0,wa=class extends es{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=vS++,this.cssManager=new lp(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(r=>[r.selector,r])),e&&this.setTemplate(e)}preConstruct(){this.wireTemplate(this.getGui());const e="component-"+Object.getPrototypeOf(this)?.constructor?.name;for(const t of this.css??[])this.beans.environment.addGlobalCSS(t,e)}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(lg):null}applyElementsToComponent(e,t,r,i=null){if(void 0===t&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===ge)this[t]=i??e;else{const n=r?.[t];if(!this.suppressDataRefValidation&&!n)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${s}`)}}}createChildComponentsFromTags(e,t){const r=[];for(const i of e.childNodes??[])r.push(i);for(const i of r){if(!(i instanceof HTMLElement))continue;const s=this.createComponentFromElement(i,n=>{const o=n.getGui();if(o)for(const a of i.attributes??[])o.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,r){const i=e.nodeName,s=this.getDataRefAttribute(e),n=0===i.indexOf("AG-"),o=n?this.componentSelectors.get(i):null;let a=null;if(o)a=new o.component(r&&s?r[s]:void 0),a.setParentComponent(this),this.createBean(a,null,t);else if(n)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,s,r,a),a}swapComponentForNode(e,t,r){const i=e.getGui();t.replaceChild(i,r),t.insertBefore(document.createComment(r.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());for(const r of e)r.setAttribute("tabindex",t.toString())}setTemplate(e,t,r){let i;i="string"==typeof e||null==e?md(e):aa(e),this.setTemplateFromElement(i,t,r)}setTemplateFromElement(e,t,r,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,r)}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 r=t;return null==e?null:(r||(r=this.eGui),wd(e)?{element:e,parent:r}:{element:e.getGui(),parent:r})}prependChild(e,t){const{element:r,parent:i}=this.getContainerAndElement(e,t)||{};!r||!i||i.insertAdjacentElement("afterbegin",r)}appendChild(e,t){const{element:r,parent:i}=this.getContainerAndElement(e,t)||{};!r||!i||i.appendChild(r)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:r}=t;!function yn(e,t,r={}){const{skipAriaHidden:i}=r;e.classList.toggle("ag-invisible",!t),i||Dt(e,!t)}(this.eGui,e,{skipAriaHidden:r})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:r}=t;at(this.eGui,e,{skipAriaHidden:r}),this.dispatchLocalEvent({type:"displayChanged",visible:this.displayed})}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,r){this.eGui.addEventListener(e,t,r),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)}},ft=class extends wa{};function cp(e){return"object"==typeof e&&!!e.component}var $t=class El{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(r=>this.onDone(r),r=>this.onReject(r))}static all(t){return t.length?new El(r=>{let i=t.length;const s=new Array(i);t.forEach((n,o)=>{n.then(a=>{s[o]=a,i--,0===i&&r(s)})})}):El.resolve()}static resolve(t=null){return new El(r=>r(t))}then(t){return new El(r=>{1===this.status?r(t(this.resolution)):this.waiters.push(i=>r(t(i)))})}onDone(t){this.status=1,this.resolution=t;for(const r of this.waiters)r(t)}onReject(t){}};function dp(e,t,r,i){const{name:s}=r;let n,o,a,l,c,d;if(t){const u=t,h=u[s+"Selector"],f=h?h(i):null,p=g=>{"string"==typeof g?n=g:null!=g&&!0!==g&&(e.isFrameworkComponent(g)?a=g:o=g)};f?(p(f.component),l=f.params,c=f.popup,d=f.popupPosition):p(u[s])}return{compName:n,jsComp:o,fwComp:a,paramsFromSelector:l,popupFromSelector:c,popupPositionFromSelector:d}}var SS={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},bS={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},yS={name:"headerComponent",optionalMethods:["refresh"]},ES={name:"innerHeaderComponent"},FS={name:"innerHeaderGroupComponent"},RS={name:"headerGroupComponent"},TS={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},DS={name:"loadingCellRenderer",cellRenderer:!0},AS={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},MS={name:"loadingOverlayComponent",optionalMethods:["refresh"]},IS={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},_S={name:"tooltipComponent"},Bd={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},LS={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},OS={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},BS={name:"loadingCellRenderer",cellRenderer:!0},NS={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},HS={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function up(e,t,r){return e.getCompDetails(t,TS,void 0,r)}function hp(e,t,r){return e.getCompDetails(t,DS,"agSkeletonCellRenderer",r,!0)}function fp(e,t,r){return e.getCompDetails(t,AS,"agCellEditor",r,!0)}function gp(e,t){return dp(e,t,Bd)}function Nd(e,t,r){return e.mergeParams(t,Bd,r)}function xa(e){const t=e;return null!=t?.getFrameworkComponentInstance?t.getFrameworkComponentInstance():e}function t2(e){return"object"==typeof e&&!!e.getComp}var Gd,Vd,zd,Wd,Ud,$d,jd,U_LEFT="ArrowLeft",U_UP="ArrowUp",U_RIGHT="ArrowRight",U_DOWN="ArrowDown",Hd=class extends wa{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e?.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}};function Ys(){return void 0===Gd&&(Gd=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Gd}function pp(){return void 0===Vd&&(Vd=/(firefox)/i.test(navigator.userAgent)),Vd}function mp(){return void 0===zd&&(zd=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),zd}function Pn(){return void 0===Wd&&(Wd=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1),Wd}function Kd(e){if(!e)return null;const t=e.tabIndex,r=e.getAttribute("tabIndex");return-1!==t||null!==r&&(""!==r||pp())?t.toString():null}function vp(){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 r=t.offsetWidth-t.clientWidth;0===r&&0===t.clientWidth&&(r=null),t.parentNode&&t.remove(),null!=r&&($d=r,Ud=0===r)}function Cp(){return null==Ud&&vp(),Ud}var s2=new RegExp("[T ]"),n2=new RegExp("^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}\\D?)?");function ss(e,t){return e.toString().padStart(t,"0")}function gi(e,t=!0,r="T"){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(s=>ss(s,2)).join("-");return t&&(i+=r+[e.getHours(),e.getMinutes(),e.getSeconds()].map(s=>ss(s,2)).join(":")),i}function Hl(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),ss(e.getDate(),2),ss(e.getHours(),2),`:${ss(e.getMinutes(),2)}`,`:${ss(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,ss(e.getDate(),2)].map(String):null}var Xd=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"},wp=["January","February","March","April","May","June","July","August","September","October","November","December"],Yd=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Qd(e,t){if(null==t)return gi(e,!1);const r=ss(e.getFullYear(),4),i={YYYY:()=>r.slice(r.length-4,r.length),YY:()=>r.slice(r.length-2,r.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>wp[e.getMonth()],MMM:()=>wp[e.getMonth()].slice(0,3),MM:()=>ss(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${Xd(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${Xd(e.getDate())}`,DD:()=>ss(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>Yd[e.getDay()],ddd:()=>Yd[e.getDay()].slice(0,3),dd:()=>Yd[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${Xd(e.getDay())}`,d:()=>`${e.getDay()}`},s=new RegExp(Object.keys(i).join("|"),"g");return t.replace(s,n=>n in i?i[n]():n)}function Gl(e,t=!1){return!!ni(e,t)}function ni(e,t=!1,r){if(!e||!r&&!n2.test(e))return null;const[i,s]=e.split(s2);if(!i)return null;const n=i.split("-").map(f=>Number.parseInt(f,10));if(3!==n.filter(f=>!isNaN(f)).length)return null;const[o,a,l]=n,c=new Date(o,a-1,l);if(c.getFullYear()!==o||c.getMonth()!==a-1||c.getDate()!==l||!s&&t)return null;if(!s||"00:00:00"===s)return c;const[d,u,h]=s.split(":").map(f=>Number.parseInt(f,10));if(d>=0&&d<24)c.setHours(d);else if(t)return null;if(u>=0&&u<60)c.setMinutes(u);else if(t)return null;if(h>=0&&h<60)c.setSeconds(h);else if(t)return null;return c}function Jd(e){const{inputValue:t,allSuggestions:r,hideIrrelevant:i,filterByPercentageOfBestMatch:s}=e;let n=(r??[]).map((l,c)=>({value:l,relevance:a2(t,l),idx:c}));if(n.sort((l,c)=>l.relevance-c.relevance),i&&(n=n.filter(l=>l.relevance<Math.max(l.value.length,t.length))),n.length>0&&s&&s>0){const c=n[0].relevance*s;n=n.filter(d=>c-d.relevance<0)}const o=[],a=[];for(const l of n)o.push(l.value),a.push(l.idx);return{values:o,indices:a}}function a2(e,t){e.length<t.length&&([e,t]=[t,e]);let r=[],i=[];const s=e.length,n=t.length;for(let a=0;a<=n;a++)r[a]=a;let o=0;for(let a=1;a<=s;a++){i[0]=a;for(let l=1;l<=n;l++){const c=e[a-1],d=t[l-1];c.toLocaleLowerCase()===d.toLocaleLowerCase()?(++o,c===d&&++o,a>1&&l>1&&e[a-2].toLocaleLowerCase()===t[l-2].toLocaleLowerCase()&&(++o,e[a-2]===t[l-2]&&++o),a<s/2-10&&++o,i[l]=r[l-1]):i[l]=1+Math.min(i[l-1],r[l],r[l-1])}[r,i]=[i,r]}return r[n]/(o+1)}function xp(e){return!(e.altKey||e.ctrlKey||e.metaKey)&&1===e.key?.length}var Zd=!1,Vl=0;function zl(e){const r="keydown"===e.type;r&&(e.ctrlKey||e.metaKey||e.altKey)||Zd!==r&&(Zd=r)}function bo(e,t,r=!1){let s=Wt;t&&(s+=", "+t),r&&(s+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(e.querySelectorAll("[tabindex], input, select, button, textarea, [href]")).filter(l=>Ji(l)),o=Array.prototype.slice.apply(e.querySelectorAll(s));return o.length?(c=o,n.filter(d=>-1===c.indexOf(d))):n;var c}function Dn(e,t=!1,r=!1,i=!1){const s=bo(e,i?".ag-tab-guard":null,r),n=t?kt(s):s[0];return!!n&&(n.focus({preventScroll:!0}),!0)}function An(e,t,r,i){const s=bo(t,r?':not([tabindex="-1"])':null),n=mt(e);let o;o=r?s.findIndex(l=>l.contains(n)):s.indexOf(n);const a=o+(i?-1:1);return a<0||a>=s.length?null:s[a]}function Sp(e,t=5){let r=0;for(;e&&null===Kd(e)&&++r<=t;)e=e.parentElement;return null===Kd(e)?null:e}var Fp,Lp,Ro,ko,f2=class extends wa{constructor(e,t,r){super(t,r),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}")}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:r,labelAlignment:i,disabled:s}=this.config;null!=s&&this.setDisabled(s),null!=e&&this.setLabelSeparator(e),null!=t&&this.setLabel(t),null!=r&&this.setLabelWidth(r),this.setLabelAlignment(i||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;Rt(t),"string"==typeof e?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),""===e?(at(t,!1),Qi(t,"presentation")):(at(t,!0),Qi(t,null))}setLabelSeparator(e){return this.labelSeparator===e||(this.labelSeparator=e,null!=this.label&&this.refreshLabel()),this}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e||(this.label=e,this.refreshLabel()),this}setLabelAlignment(e){const r=this.getGui().classList;return r.toggle("ag-label-align-left","left"===e),r.toggle("ag-label-align-right","right"===e),r.toggle("ag-label-align-top","top"===e),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return null==this.label||Fl(this.eLabel,e),this}setDisabled(e){e=!!e;const t=this.getGui();return di(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},bp=class extends f2{constructor(e,t,r,i){super(e,t,r),this.className=i}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:r}=this.config;null!=e&&this.setWidth(e),null!=t&&this.setValue(t),null!=r&&this.onValueChange(r),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(),r=this.getLabel();null==r||""==r||null!==function bt(e){return e.getAttribute("aria-label")}(e)?W(e,""):W(e,t??"")}setAriaLabel(e){return z(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 Zi(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e||(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"})),this}},Mn=class extends bp{constructor(e,t,r="text",i="input"){super(e,e?.template??function g2(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"}]}]}}(i),[],t),this.inputType=r,this.displayFieldTag=i,this.eLabel=ge,this.eWrapper=ge,this.eInput=ge}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:r,className:i}=this;e.classList.add(`${i}-label`),t.classList.add(`${i}-input-wrapper`),r.classList.add(`${i}-input`),this.addCss("ag-input-field"),r.id=r.id||`ag-${this.getCompId()}-input`;const{inputName:s,inputWidth:n}=this.config;null!=s&&this.setInputName(s),null!=n&&this.setInputWidth(n),this.addInputListeners(),this.activateTabIndex([r])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){"input"===this.displayFieldTag&&(this.inputType=e,hi(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return Fl(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){return this.eInput.maxLength=e,this}setInputPlaceholder(e){return hi(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return z(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return di(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){return hi(this.eInput,"autocomplete",!0===e?null:"string"==typeof e?e:"off"),this}},Wl=class extends Mn{constructor(e,t="ag-checkbox",r="checkbox"){super(e,t,r),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;"boolean"==typeof e&&this.setReadOnly(e),"boolean"==typeof t&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return void 0===this.selected||!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){return this.getInputElement().name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected="boolean"==typeof e?e:void 0;const r=this.eInput;r.checked=e,r.indeterminate=void 0===e,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,r){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:r});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(),r=this.selected=e.target.checked;this.refreshSelectedClass(r),this.dispatchChange(r,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",!0===e),t.toggle("ag-indeterminate",null==e)}},eu={selector:"AG-CHECKBOX",component:Wl},p2=class extends Wl{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},In=class extends Mn{constructor(e,t="ag-text-field",r="text"){super(e,t,r)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const r=this.eInput;return r.value!==e&&(r.value=le(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`);this.addManagedListeners(this.eInput,{keydown:r=>{xp(r)&&r.key&&!e.test(r.key)&&r.preventDefault()},paste:r=>{r.clipboardData?.getData("text")?.split("").some(s=>!e.test(s))&&r.preventDefault()}})}},Ul={selector:"AG-INPUT-TEXT-FIELD",component:In},w2={selector:"AG-INPUT-TEXT-AREA",component:class extends Mn{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const r=super.setValue(e,t);return this.eInput.value=e,r}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}}},tu=class extends In{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const n=Number.parseFloat(e.value),o=isNaN(n)?"":this.normalizeValue(n.toString());this.value!==o&&this.setValue(o)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:r,max:i,step:s}=this.config;"number"==typeof t&&this.setPrecision(t),"number"==typeof r&&this.setMin(r),"number"==typeof i&&this.setMax(i),"number"==typeof s&&this.setStep(s)}onWheel(e){mt(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return""===e?"":(null!=this.precision&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const r=this.precision;if(null==r)return e;if(t){const s=Number.parseFloat(e).toFixed(r);return Number.parseFloat(s).toString()}const i=String(e).split(".");if(i.length>1){if(i[1].length<=r)return e;if(r>0)return`${i[0]}.${i[1].slice(0,r)}`}return i[0]}setMin(e){return this.min===e||(this.min=e,hi(this.eInput,"min",e)),this}setMax(e){return this.max===e||(this.max=e,hi(this.eInput,"max",e)),this}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e||(this.step=e,hi(this.eInput,"step",e)),this}setValue(e,t){return this.setValueOrInputValue(r=>super.setValue(r,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,r){if(le(r)){let i=this.isScientificNotation(r);if(i&&this.eInput.validity.valid)return e(r);if(i||(i=(r=this.adjustPrecision(r))!=this.normalizeValue(r)),i)return t(r)}return e(r)}getValue(){const e=this.eInput;if(!e.validity.valid)return;const t=e.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(e){return"string"==typeof e&&e.includes("e")}},x2={selector:"AG-INPUT-NUMBER-FIELD",component:tu},yp={selector:"AG-INPUT-DATE-FIELD",component:class extends In{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=Ys();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){mt(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?gi(e??null,!!this.includeTime)??void 0:e;return this.min===t||(this.min=t,hi(this.eInput,"min",t)),this}setMax(e){const t=e instanceof Date?gi(e??null,!!this.includeTime)??void 0:e;return this.max===t||(this.max=t,hi(this.eInput,"max",t)),this}setStep(e){return this.step===e||(this.step=e,hi(this.eInput,"step",e)),this}setIncludeTime(e){return this.includeTime===e||(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1)),this}getDate(){if(this.eInput.validity.valid)return ni(this.getValue())??void 0}setDate(e,t){this.setValue(gi(e??null,this.includeTime),t)}}},F2=class extends wa{constructor(e,t,r){super(((e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",ref:"eText",children:t}]}))(e,t)),this.label=t,this.value=r,this.eText=ge}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle("ag-active-item",e),Wi(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const r=this.getGui();(function Qe(e,t){Xr(e,"posinset",t)})(r,e),function He(e,t){Xr(e,"setsize",t)}(r,t)}createTooltip(){const t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,{getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>vd(this.eText)},this));t&&(this.tooltipFeature=t)}addEventListeners(){const e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},R2=class extends wa{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}")}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case"Enter":if(this.highlightedItem){const r=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(r)}else this.setValue(this.getValue());break;case U_DOWN:case U_UP:e.preventDefault(),this.navigate(t);break;case"PageDown":case"PageUp":case"Home":case"End":e.preventDefault(),this.navigateToPage(t)}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:r}=e,i=r??t;return this.options.push({value:t,text:i}),this.renderOption(t,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();Rt(this.getGui()),this.listItems=[],this.refreshAriaRole()}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(null==e)return this.reset(t),this;const r=this.options.findIndex(i=>i.value===e);if(-1!==r){const i=this.options[r];this.value=i.value,this.displayValue=i.text,this.highlightItem(this.listItems[r]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);-1!==e&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!Ji(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const r=this.getGui(),{scrollTop:i,clientHeight:s}=r,{offsetTop:n,offsetHeight:o}=t;(n+o>i+s||n<i)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){this.highlightedItem?.tooltipFeature?.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){this.highlightedItem?.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){const r=new F2(this.cssIdentifier,t,e);r.setParentComponent(this);const i=this.createManagedBean(r);this.listItems.push(i),this.getGui().appendChild(i.getGui())}navigate(e){const t=e===U_DOWN;let r;const{listItems:i,highlightedItem:s}=this;if(s){let o=i.indexOf(s)+(t?1:-1);o=Math.min(Math.max(o,0),i.length-1),r=i[o]}else r=t?i[0]:kt(i);this.highlightItem(r)}navigateToPage(e){const{listItems:t,highlightedItem:r}=this;if(!r||0===t.length)return;const i=t.indexOf(r),s=this.options.length-1,n=t[0].getHeight(),o=Math.floor(this.getGui().clientHeight/n);let a=-1;"Home"===e?a=0:"End"===e?a=s:"PageDown"===e?a=Math.min(i+o,s):"PageUp"===e&&(a=Math.max(i-o,0)),-1!==a&&this.highlightItem(t[a])}refreshAriaRole(){Qi(this.getGui(),0===this.options.length?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((r,i)=>{r.setIndex(i+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},T2={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"}}]}]},P2=class extends bp{constructor(e){if(super(e,e?.template||T2,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=ge,this.eWrapper=ge,this.eDisplayField=ge,this.eIcon=ge,this.registerCSS(".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.ag-picker-has-focus),&:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:disabled{opacity:.5}}"),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:r,variableWidth:i,minPickerWidth:s,maxPickerWidth:n}=e;null!=t&&(this.pickerGap=t),this.variableWidth=!!i,null!=r&&this.setPickerMaxHeight(r),null!=s&&this.setPickerMinWidth(s),null!=n&&this.setPickerMaxWidth(n)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:r,inputWidth:i}=this.config;if(r){const s=this.beans.iconSvc.createIconNoSpan(r);s&&this.eIcon.appendChild(s)}null!=i&&this.setInputWidth(i)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),$e(e,!1),this.ariaRole&&Qi(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}this.skipClick?this.skipClick=!1:this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case U_UP:case U_DOWN:case"Enter":case" ":e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case"Escape":this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker())}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:r,pickerAriaLabelValue:i,modalPicker:s=!0},maxPickerHeight:n,minPickerWidth:o,maxPickerWidth:a,variableWidth:l,beans:c,eWrapper:d}=this,u={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const g=Gs(c);this.beforeHidePicker(),g&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(r,i),anchorToElement:d};e.style.position="absolute";const h=c.popupSvc,f=h.addPopup(u);l?(o&&(e.style.minWidth=o),e.style.width=Cd(ui(d)),a&&(e.style.maxWidth=a)):Fl(e,a??ui(d));const p=n??`${si(h.getPopupParent())}px`;return e.style.setProperty("max-height",p),this.alignPickerToComponent(),f.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:r,gos:i},eWrapper:s,pickerComponent:n}=this,o=i.get("enableRtl")?"right":"left";r.positionPopupByComponent({type:t,eventSource:s,ePopup:n.getGui(),position:"under",alignSide:o,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;$e(this.getAriaElement(),e);const r=this.eWrapper.classList;r.toggle("ag-picker-expanded",e),r.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return Fl(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return"number"==typeof e&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return"number"==typeof e&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return"number"==typeof e&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},ru=class extends P2{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}")}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:na(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:r}=this.config;null!=e&&this.addOptions(e),null!=t&&this.setValue(t,!0),r&&null==t&&(this.eDisplayField.textContent=r),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new R2("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),r=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",r),function Ve(e,t){(function Ne(e,t){Tr(e,"controls",t)})(e,t.id),W(t,e.id)}(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){this.listComponent?.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){const{key:t}=e;switch("Tab"===t&&this.hidePicker(),t){case"Enter":case U_UP:case U_DOWN:case"PageUp":case"PageDown":case"Home":case"End":e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case"Escape":super.onKeyDown(e);break;case" ":this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e)}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}setValue(e,t,r){const{listComponent:i,config:{placeholder:s},eDisplayField:n,tooltipFeature:o}=this;if(this.value===e||!i)return this;if(r||i.setValue(e,!0),i.getValue()===this.getValue())return this;let l=i.getDisplayValue();return null==l&&s&&(l=s),n.textContent=l,o?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},A2={selector:"AG-SELECT",component:ru},iu="object"!=typeof window||!window?.document?.fonts?.forEach,yo=(e,t,r,i,s,n)=>{if(iu)return;i&&(e=`@layer ${CSS.escape(i)} { ${e} }`);let o=Eo.map.get(t);if(o||(o=[],Eo.map.set(t,o)),o.some(d=>d.css===e))return;const a=document.createElement("style");n&&a.setAttribute("nonce",n),a.dataset.agGlobalCss=r,a.textContent=e;const l={css:e,el:a,priority:s};let c;for(const d of o){if(d.priority>s)break;c=d}if(c){c.el.insertAdjacentElement("afterend",a);const d=o.indexOf(c);o.splice(d+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),o.push(l)},Ep=(e,t,r,i)=>{yo(':where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}&:where(button){color:inherit}}:where(.ag-root-wrapper,ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-chart,.ag-dnd-ghost,.ag-external,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}',e,"shared",t,0,r),i?.forEach((s,n)=>s.forEach(o=>yo(o,e,n,t,0,r)))},Eo=(Fp="object"==typeof window?window:{}).agStyleInjectionState??(Fp.agStyleInjectionState={map:new WeakMap,grids:new Set}),gt=e=>new Rp(e),Qs="$default",O2=0,Rp=class{constructor({feature:e,params:t,modeParams:r={},css:i,cssImports:s}){this.feature=e,this.css=i,this.cssImports=s,this.modeParams={[Qs]:{...r[Qs]??{},...t??{}},...r}}use(e,t,r){let i=this._inject;if(null==i){let{css:s}=this;if(s){const n=`ag-theme-${this.feature??"part"}-${++O2}`;"function"==typeof s&&(s=s()),s=`:where(.${n}) {\n${s}\n}\n`;for(const o of this.cssImports??[])s=`@import url(${JSON.stringify(o)});\n${s}`;i={css:s,class:n}}else i=!1;this._inject=i}return i&&e&&yo(i.css,e,i.class,t,1,r),!!i&&i.class}},kp=e=>`--ag-${(e=>e.replace(/[A-Z]/g,t=>`-${t}`).toLowerCase())(e)}`,ns=e=>`var(${kp(e)})`,pi=e=>({ref:"accentColor",mix:e}),ir=e=>({ref:"foregroundColor",mix:e}),Vt=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),jt={ref:"backgroundColor"},mi={ref:"foregroundColor"},Yt={ref:"accentColor"},_n={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:ir(.15),chromeBackgroundColor:Vt(.02),browserColorScheme:"light"},V2={..._n,textColor:mi,accentColor:"#2196f3",invalidColor:"#e02525",fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],subtleTextColor:{ref:"textColor",mix:.5},borderWidth:1,borderRadius:4,spacing:8,fontSize:14,focusShadow:{spread:3,color:pi(.5)},focusErrorShadow:{spread:3,color:{ref:"invalidColor",onto:"backgroundColor",mix:.5}},popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},dragAndDropImageBackgroundColor:jt,dragAndDropImageBorder:!0,dragAndDropImageNotAllowedBorder:{color:{ref:"invalidColor",onto:"dragAndDropImageBackgroundColor",mix:.5}},dragAndDropImageShadow:{ref:"popupShadow"},iconSize:16,iconColor:"inherit",toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:Yt,toggleButtonOffBackgroundColor:Vt(.3),toggleButtonSwitchBackgroundColor:jt,toggleButtonSwitchInset:2,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipErrorBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.1},tooltipTextColor:{ref:"textColor"},tooltipErrorTextColor:{ref:"invalidColor"},tooltipBorder:!0,tooltipErrorBorder:{color:{ref:"invalidColor",onto:"backgroundColor",mix:.25}}},z2=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],W2=(()=>{const t=new Map;return r=>{const i=r;return t.has(i)||t.set(i,(e=>(e=e.toLowerCase(),z2.find(t=>e.endsWith(t.toLowerCase()))??"length"))(r)),t.get(i)}})(),$l=e=>"object"==typeof e&&e?.ref?ns(e.ref):"string"==typeof e?e:"number"==typeof e&&String(e),jl=e=>{if("string"==typeof e)return e;if(e&&"ref"in e){const t=ns(e.ref);return null==e.mix?t:`color-mix(in srgb, ${e.onto?ns(e.onto):"transparent"}, ${t} ${(e=>Math.max(0,Math.min(100,e)))(100*e.mix)}%)`}return!1},Fo=e=>"string"==typeof e?e:"number"==typeof e?`${e}px`:e&&"calc"in e?`calc(${e.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,r=>"-"===r[0]?r:" "+ns(r)+" ")})`:!(!e||!("ref"in e))&&ns(e.ref),nu=(e,t)=>"string"==typeof e?e:!0===e?nu({},t):!1===e?"columnBorder"===t?nu({color:"transparent"},t):"none":e&&"ref"in e?ns(e.ref):Tp(e.style??"solid")+" "+Fo(e.width??{ref:"borderWidth"})+" "+jl(e.color??{ref:"borderColor"}),Tp=$l,ou=e=>"string"==typeof e?e.includes(",")?e:Pp(e):e&&"googleFont"in e?ou(e.googleFont):e&&"ref"in e?ns(e.ref):!!Array.isArray(e)&&e.map(t=>("object"==typeof t&&"googleFont"in t&&(t=t.googleFont),Pp(t))).join(", "),Pp=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),Dp=$l,au=e=>"string"==typeof e?e:e&&"url"in e?`url(${JSON.stringify(e.url)})`:e&&"svg"in e?au({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):!(!e||!("ref"in e))&&ns(e.ref),q2={color:jl,colorScheme:$l,length:Fo,scale:$l,border:nu,borderStyle:Tp,shadow:e=>"string"==typeof e?e:!1===e?"none":e&&"ref"in e?ns(e.ref):[Fo(e.offsetX??0),Fo(e.offsetY??0),Fo(e.radius??0),Fo(e.spread??0),jl(e.color??{ref:"foregroundColor"})].join(" "),image:au,fontFamily:ou,fontWeight:Dp,duration:(e,t,r)=>"string"==typeof e?e:"number"==typeof e?(e>=10&&r.warn(104,{value:e,param:t}),`${e}s`):!(!e||!("ref"in e))&&ns(e.ref)},X2=(e,t,r)=>{const i=W2(e);return q2[i](t,e,r)},lu=class nx{constructor(t,r=[]){this.themeLogger=t,this.parts=r}withPart(t){return"function"==typeof t&&(t=t()),t instanceof Rp?new nx(this.themeLogger,[...this.parts,t]):(this.themeLogger.preInitErr(259,"Invalid part",{part:t}),this)}withoutPart(t){return this.withPart(gt({feature:t}))}withParams(t,r=Qs){return this.withPart(gt({modeParams:{[r]:t}}))}_startUse({styleContainer:t,cssLayer:r,nonce:i,loadThemeGoogleFonts:s,moduleCss:n}){if(iu)return;J2(),Ep(t,r,i,n);const o=Q2(this);if(o.length>0)for(const a of o)s&&Z2(a,i);for(const a of this.parts)a.use(t,r,i)}_getCssClass(){return this._cssClassCache??(this._cssClassCache=Ap(this.parts).map(t=>t.use(void 0,void 0,void 0)).filter(Boolean).join(" "))}_getModeParams(){let t=this._paramsCache;if(!t){const r={[Qs]:{...V2}};for(const i of Ap(this.parts))for(const s of Object.keys(i.modeParams)){const n=i.modeParams[s];if(n){const o=r[s]??(r[s]={}),a=new Set;for(const l of Object.keys(n)){const c=n[l];void 0!==c&&(o[l]=c,a.add(l))}if(s===Qs)for(const l of Object.keys(r)){const c=r[l];if(l!==Qs)for(const d of a)delete c[d]}}}this._paramsCache=t=r}return t}_getPerInstanceCss(t){const r="##SELECTOR##";let i=this._paramsCssCache;if(!i){let s="",n="";const o=this._getModeParams();for(const l of Object.keys(o)){const c=o[l];if(l!==Qs){const u=`:where([data-ag-theme-mode="${"object"==typeof CSS?CSS.escape(l):l}"]) & {\n`;s+=u,n+=u}for(const d of Object.keys(c).sort()){const u=c[d],h=X2(d,u,this.themeLogger);if(!1===h)this.themeLogger.error(107,{key:d,value:u});else{const f=kp(d),p=f.replace("--ag-","--ag-inherited-");s+=`\t${f}: var(${p}, ${h});\n`,n+=`\t${p}: var(${f});\n`}}l!==Qs&&(s+="}\n",n+="}\n")}let a=`${r} {\n${s}}\n`;a+=`:has(> ${r}):not(${r}) {\n${n}}\n`,this._paramsCssCache=i=a}return i.replaceAll(r,`:where(.${t})`)}},Ap=e=>{const t=new Map;for(const i of e)t.set(i.feature,i);const r=[];for(const i of e)(!i.feature||t.get(i.feature)===i)&&r.push(i);return r},Q2=e=>{const t=new Set,r=n=>{if(Array.isArray(n))n.forEach(r);else{const o=n?.googleFont;"string"==typeof o&&t.add(o)}};return Object.values(e._getModeParams()).flatMap(n=>Object.values(n)).forEach(r),Array.from(t).sort()},Mp=!1,J2=()=>{if(!Mp){Mp=!0;for(const e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},Z2=function(){var e=(0,_r.A)(function*(t,r){const i=`@import url('https://${eb}/css2?family=${encodeURIComponent(t)}:wght@100;200;300;400;500;600;700;800;900&display=swap');\n`;yo(i,document.head,`googleFont:${t}`,void 0,0,r)});return function(r,i){return e.apply(this,arguments)}}(),eb="fonts.googleapis.com",tb=1,rb=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=tb++,e?.beanClasses&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){this.id=e.id,this.beans.context=this,this.destroyCallback=e.destroyCallback;for(const t of Object.keys(e.providedBeanInstances))this.beans[t]=e.providedBeanInstances[t];for(const t of e.beanClasses){const r=new t;r.beanName?this.beans[r.beanName]=r:console.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(r)}for(const t of e.derivedBeans??[]){const{beanName:r,bean:i}=t(this);this.beans[r]=i,this.createdBeans.push(i)}e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){return this.initBeans([e],t),e}initBeans(e,t){const r=this.beans;for(const i of e)i.preWireBeans?.(r),i.wireBeans?.(r);for(const i of e)i.preConstruct?.();t&&e.forEach(t);for(const i of e)i.postConstruct?.()}getBeans(){return this.beans}getBean(e){return this.beans[e]}getId(){return this.id}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[],this.destroyCallback?.()}destroyBean(e){e?.destroy?.()}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}},ib=0,sb=class extends es{constructor(){super(...arguments),this.beanName="environment",this.paramsClass="ag-theme-params-"+ ++ib,this.globalCSS=[]}wireBeans(e){this.eRootDiv=e.eRootDiv}postConstruct(){const{gos:e,eRootDiv:t}=this;e.setInstanceDomData(t),this.eStyleContainer=e.get("themeStyleContainer")??(t.getRootNode()===document?document.head:t),this.cssLayer=e.get("themeCssLayer"),this.styleNonce=e.get("styleNonce"),this.addManagedPropertyListener("theme",()=>this.handleThemeChange()),this.handleThemeChange(),this.initVariables(),this.addDestroyFunc(()=>(()=>{if(Eo.grids.delete(this),0===Eo.grids.size){Eo.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}})()),this.mutationObserver=new MutationObserver(()=>{this.fireStylesChangedEvent("themeChanged")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}applyThemeClasses(e,t=[]){const{theme:r}=this;let i;i=r?`${this.paramsClass} ${r._getCssClass()}`:this.applyLegacyThemeClasses();for(const s of Array.from(e.classList))s.startsWith("ag-theme-")&&e.classList.remove(s);if(i){const s=e.className;e.className=`${s}${s?" ":""}${i}${t?.length?" "+t.join(" "):""}`}}applyLegacyThemeClasses(){let e="";this.mutationObserver.disconnect();let t=this.eRootDiv;for(;t;){let r=!1;for(const i of Array.from(t.classList))i.startsWith("ag-theme-")&&(r=!0,e=e?`${e} ${i}`:i);r&&this.mutationObserver.observe(t,{attributes:!0,attributeFilter:["class"]}),t=t.parentElement}return e}addGlobalCSS(e,t){this.theme?yo(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}handleThemeChange(){const{gos:e,theme:t}=this,r=e.get("theme");let i;if("legacy"===r)i=void 0;else{const s=r??this.getDefaultTheme();s instanceof lu?i=s:this.themeError(s)}i!==t&&this.handleNewTheme(i),this.postProcessThemeChange(i,r)}handleNewTheme(e){const{gos:t,eRootDiv:r,globalCSS:i}=this,s=this.getAdditionalCss();if(e){(()=>{Eo.grids.add(this)})(),Ep(this.eStyleContainer,this.cssLayer,this.styleNonce,s);for(const[o,a]of i)yo(o,this.eStyleContainer,a,this.cssLayer,0,this.styleNonce);i.length=0}this.theme=e,e?._startUse({loadThemeGoogleFonts:t.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce,moduleCss:s});let n=this.eParamsStyle;if(!n){n=this.eParamsStyle=aa({tag:"style"});const o=t.get("styleNonce");o&&n.setAttribute("nonce",o),r.appendChild(n)}iu||(n.textContent=e?._getPerInstanceCss(this.paramsClass)||""),this.applyThemeClasses(r),this.fireStylesChangedEvent("themeChanged")}},nb=class extends es{constructor(){super(...arguments),this.beanName="registry"}registerDynamicBeans(e){if(e){this.dynamicBeans??(this.dynamicBeans={});for(const t of Object.keys(e))this.dynamicBeans[t]=e[t]}}createDynamicBean(e,t,...r){if(!this.dynamicBeans)throw new Error(this.getDynamicError(e,!0));const i=this.dynamicBeans[e];if(null!=i)return new i(...r);if(t)throw new Error(this.getDynamicError(e,!1))}},ob=class extends es{constructor(){super(...arguments),this.beanName="eventSvc",this.eventServiceType="global",this.globalSvc=new St}addListener(e,t,r){this.globalSvc.addEventListener(e,t,r)}removeListener(e,t,r){this.globalSvc.removeEventListener(e,t,r)}addGlobalListener(e,t=!1){this.globalSvc.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalSvc.removeGlobalListener(e,t)}dispatchEvent(e){this.globalSvc.dispatchEvent(this.gos.addCommon(e))}dispatchEventOnce(e){this.globalSvc.dispatchEventOnce(this.gos.addCommon(e))}},Ip=class extends es{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){const r="title",i=this.ctrl.getGui();i&&(null==e||""==e&&!t?i.removeAttribute(r):i.setAttribute(r,e))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){if(null==this.tooltipManager){const e=this.beans.registry.createDynamicBean("tooltipStateManager",!0,this.ctrl,()=>this.tooltip);e&&(this.tooltipManager=this.createBean(e,this.beans.context))}}attemptToShowTooltip(){this.tooltipManager?.prepareToShowTooltip()}attemptToHideTooltip(){this.tooltipManager?.hideTooltip()}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(e){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(e?"":null,e),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},Kl=!1,cb=class extends es{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();0===this.tooltipTrigger&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),1===this.tooltipTrigger&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){return"show"===e?this.tooltipCtrl.getTooltipShowDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipShowDelay"):this.tooltipCtrl.getTooltipHideDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return e&&"hover"!==e?1:0}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!Pn()&&(Kl?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},100):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&2===this.state&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){const t=e.relatedTarget,r=this.tooltipCtrl.getGui(),i=this.tooltipComp?.getGui();this.isInteractingWithTooltip||r.contains(t)||this.interactionEnabled&&i?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(0!=this.state||Kl)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()-Lp<1e3}setToDoNothing(e){!e&&2===this.state&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.clearEventHandlers(),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!le(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip())return void this.setToDoNothing();const r=this.gos.addCommon({location:t.getLocation?.()??"UNKNOWN",value:e,hideTooltipCallback:()=>this.hideTooltip(!0),...t.getAdditionalParams?.()});this.state=2,this.tooltipInstanceCount++;const i=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(r,i)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),Lp=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(2!==this.state||this.tooltipInstanceCount!==e)return void this.destroyBean(t);const i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),0===this.tooltipTrigger&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");const s=this.getLocaleTextFunc(),n=this.popupSvc?.addPopup({eChild:i,ariaLabel:s("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),1===this.tooltipTrigger){const o=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:o}),this.setEventHandlers(o)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(It(this.beans),{keydown:o=>{i.contains(o?.target)||this.onKeyDown()}}),1===this.tooltipTrigger&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:i,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){const e=this.tooltipComp?.getGui(),t=mt(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupSvc?.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):this.popupSvc?.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp;window.setTimeout(()=>{e(),this.destroyBean(t)},0===this.tooltipTrigger?1e3:0),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){for(const e of[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener])e&&e();this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){Kl=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},100)}unlockService(){Kl=!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()}},ql=0,hb=class extends es{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}getPopupParent(){return this.gos.get("popupParent")||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:r,nudgeY:i,skipObserver:s}=e;this.positionPopup({ePopup:t,nudgeX:r,nudgeY:i,keepWithinBounds:!0,skipObserver:s,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e,e.type,e.ePopup,null,e.mouseEvent)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:r,nudgeY:i,keepWithinBounds:s,eventSource:n,alignSide:o="left",position:a="over",type:l}=e,c=n.getBoundingClientRect(),d=this.getParentRect();this.setAlignedTo(n,t),this.positionPopup({ePopup:t,nudgeX:r,nudgeY:i,keepWithinBounds:s,updatePosition:()=>{let f,h=c.left-d.left;return"right"===o&&(h-=t.offsetWidth-c.width),"over"===a?(f=c.top-d.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),f="under"===this.shouldRenderUnderOrAbove(t,c,d,e.nudgeY||0)?c.top-d.top+c.height:c.top-t.offsetHeight-2*(i||0)-d.top),{x:h,y:f}},postProcessCallback:()=>this.callPostProcessPopup(e,l,t,n,null)})}shouldRenderUnderOrAbove(e,t,r,i){const s=r.bottom-t.bottom,n=t.top-r.top,o=e.offsetHeight+i;return s>o?"under":n>o||n>s?"above":"under"}setAlignedStyles(e,t){const r=this.getPopupIndex(e);if(-1===r)return;const i=this.popupList[r],{alignedToElement:s}=i;if(!s)return;const n=["right","left","over","above","under"];for(const o of n)s.classList.remove(`ag-has-popup-positioned-${o}`),e.classList.remove(`ag-popup-positioned-${o}`);t&&(s.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const r=this.getPopupIndex(t);-1!==r&&(this.popupList[r].alignedToElement=e)}positionPopup(e){const{ePopup:t,keepWithinBounds:r,nudgeX:i,nudgeY:s,skipObserver:n,updatePosition:o}=e,a={width:0,height:0},l=(c=!1)=>{let{x:d,y:u}=o();c&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,i&&(d+=i),s&&(u+=s),r&&(d=this.keepXYWithinBounds(t,d,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${d}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!n){const c=zs(this.beans,t,()=>l(!0));setTimeout(()=>c(),200)}}getParentRect(){const e=It(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:"static"===getComputedStyle(t).position&&(t=t.offsetParent),ho(t)}keepXYWithinBounds(e,t,r){const i=0===r,s=i?"clientHeight":"clientWidth",n=i?"top":"left",o=i?"height":"width",a=i?"scrollTop":"scrollLeft",l=It(this.beans),c=l.documentElement,d=this.getPopupParent(),u=e.getBoundingClientRect(),h=d.getBoundingClientRect(),f=l.documentElement.getBoundingClientRect(),p=d===l.body,g=Math.ceil(u[o]);let v=p?(i?Pr:ui)(c)+c[a]:d[s];p&&(v-=Math.abs(f[n]-h[n]));const w=v-g;return Math.min(Math.max(t,0),Math.max(w,0))}addPopup(e){const{eChild:t,ariaLabel:r,ariaOwns:i,alwaysOnTop:s,positionCallback:n,anchorToElement:o}=e,a=this.getPopupIndex(t);if(-1!==a)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(t);const l=this.createPopupWrapper(t,!!s,r,i),c=this.addEventListenersToPopup({...e,wrapperEl:l});return n&&n(),this.addPopupToPopupList(t,l,c,o),{hideFunc:c}}initialisePopupPosition(e){const r=this.getPopupParent().getBoundingClientRect();le(e.style.top)||(e.style.top=-1*r.top+"px"),le(e.style.left)||(e.style.left=-1*r.left+"px")}createPopupWrapper(e,t,r,i){const s=this.getPopupParent(),{environment:n,gos:o}=this.beans,a=aa({tag:"div"});return n.applyThemeClasses(a),a.classList.add("ag-popup"),e.classList.add(o.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Qi(e,"dialog"),r?z(e,r):i&&(e.id||(e.id=`popup-component-${ql}`),et(i,e.id)),a.appendChild(e),s.appendChild(a),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),a}addEventListenersToPopup(e){const t=this.beans,r=It(t),{wrapperEl:i,eChild:s,closedCallback:n,afterGuiAttached:o,closeOnEsc:a,modal:l,ariaOwns:c}=e;let d=!1;const u=g=>{i.contains(mt(t))&&"Escape"===g.key&&!this.isStopPropagation(g)&&p({keyboardEvent:g})},h=g=>p({mouseEvent:g}),f=g=>p({touchEvent:g}),p=(g={})=>{const{mouseEvent:m,touchEvent:v,keyboardEvent:w,forceHide:C}=g;!C&&(this.isEventFromCurrentPopup({mouseEvent:m,touchEvent:v},s)||d)||(d=!0,i.remove(),r.removeEventListener("keydown",u),r.removeEventListener("mousedown",h),r.removeEventListener("touchstart",f),r.removeEventListener("contextmenu",h),this.eventSvc.removeListener("dragStarted",h),n&&n(m||v||w),this.removePopupFromPopupList(s,c))};return o&&o({hidePopup:p}),window.setTimeout(()=>{a&&r.addEventListener("keydown",u),l&&(r.addEventListener("mousedown",h),this.eventSvc.addListener("dragStarted",h),r.addEventListener("touchstart",f),r.addEventListener("contextmenu",h))},0),p}addPopupToPopupList(e,t,r,i){this.popupList.push({element:e,wrapper:t,hideFunc:r,instanceId:ql,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i),ql+=1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const r=this.getPopupIndex(e);if(-1===r)return;const i=this.popupList[r];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&&et(t,null),this.popupList=this.popupList.filter(r=>r.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),r=t.getBoundingClientRect(),{element:i,ePopup:s}=e,n=i.getBoundingClientRect(),o=u=>Number.parseInt(u.substring(0,u.length-1),10),a=(u,h)=>{const f=r[u]-n[u],p=o(s.style[u]);return{initialDiff:f,lastDiff:f,initial:p,last:p,direction:h}},l=a("top",0),c=a("left",1),d=this.beans.frameworkOverrides;return new $t(u=>{d.wrapIncoming(()=>{(function CS(e,t){return new $t(r=>{r(window.setInterval(e,t))})})(()=>{const h=t.getBoundingClientRect(),f=i.getBoundingClientRect();if(0==f.top&&0==f.left&&0==f.height&&0==f.width)return void e.hidePopup();const g=(m,v)=>{const w=o(s.style[v]);m.last!==w&&(m.initial=w,m.last=w);const C=h[v]-f[v];if(C!=m.lastDiff){const y=this.keepXYWithinBounds(s,m.initial+m.initialDiff-C,m.direction);s.style[v]=`${y}px`,m.last=y}m.lastDiff=C};g(l,"top"),g(c,"left")},200).then(h=>{u(()=>{null!=h&&window.clearInterval(h)})})},"popupPositioning")})}isEventFromCurrentPopup(e,t){const{mouseEvent:r,touchEvent:i}=e,s=r||i;if(!s)return!1;const n=this.getPopupIndex(t);if(-1===n)return!1;for(let o=n;o<this.popupList.length;o++)if(cx(this.popupList[o].element,s))return!0;return this.isElementWithinCustomPopup(s.target)}isElementWithinCustomPopup(e){const t=It(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||null===e.parentElement)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const r=this.getWrapper(e);r&&(r.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(r))}bringPopupToFront(e){const t=this.getPopupParent(),r=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),i=r.length,s=this.getWrapper(e);if(!s||i<=1||!t.contains(e))return;const n=[],o=[];for(const h of r)h!==s&&(h.classList.contains("ag-always-on-top")?o.push(h):n.push(h));const a=[],l=o.length,u=s.classList.contains("ag-always-on-top")||!l?[...n,...o,s]:[...n,s,...o];for(let h=0;h<=i;h++){const f=u[h];if(r[h]===u[h]||f===s)continue;const p=f.querySelectorAll("div");for(const g of p)0!==g.scrollTop&&a.push([g,g.scrollTop]);0===h?t.insertAdjacentElement("afterbegin",f):u[h-1].insertAdjacentElement("afterend",f)}for(;a.length;){const h=a.pop();h[0].scrollTop=h[1]}}},Op=(e,t)=>{if(null!=t&&e?.setPointerCapture)try{return e.setPointerCapture(t),e.hasPointerCapture(t)}catch{}return!1},Bp=e=>{const{eElement:t,onLost:r}=e;t&&r&&(t.removeEventListener("lostpointercapture",r),e.onLost=null)},Es=e=>{if(ko){if(ko.has(e))return!1}else ko=new WeakSet;return ko.add(e),!0},vb=class extends es{constructor(){super(...arguments),this.beanName="dragSvc",this.dragging=!1,this.drag=null,this.dragSources=[]}get startTarget(){return this.drag?.start.target??null}isPointer(){return!!Ro?.has(kr(this.beans))}hasPointerCapture(){const e=this.drag?.pointerCapture;return!(!e||!this.beans.eRootDiv.hasPointerCapture?.(e.pointerId))}destroy(){this.drag&&this.cancelDrag();const e=this.dragSources;for(const t of e)Np(t);e.length=0,super.destroy()}removeDragSource(e){const t=this.dragSources;for(let r=0,i=t.length;r<i;++r){const s=t[r];if(s.params===e){t.splice(r,1),Np(s);break}}}addDragSource(e){if(!this.isAlive())return;const{eElement:t,includeTouch:r}=e,i=[];let s;if(r){const c=t.style;c&&(s=c.touchAction,c.touchAction="none")}this.dragSources.push({handlers:i,params:e,oldTouchAction:s}),Rl(i,[t,"pointerdown",c=>this.onPointerDown(e,c),{passive:!1}],[t,"mousedown",c=>this.onMouseDown(e,c)]);const l=this.gos.get("suppressTouch");r&&!l&&Rl(i,[t,"touchstart",d=>this.onTouchStart(e,d),{passive:!1}])}cancelDrag(e){const t=this.drag;e??(e=t?.eElement),e&&this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),t?.params.onDragCancel?.(),this.destroyDrag()}shouldPreventMouseEvent(e){const t=e.type;return("mousemove"===t||"pointermove"===t)&&e.cancelable&&ca(this.beans,e)&&!ci(du(e))}initDrag(e,...t){this.drag=e;const r=this.beans,i=a=>this.onScroll(a),n=kr(r),o=It(r);Rl(e.handlers,[n,"contextmenu",Ws],[n,"keydown",a=>this.onKeyDown(a)],[o,"scroll",i,{capture:!0}],[o.defaultView||window,"scroll",i],...t)}destroyDrag(){this.dragging=!1;const e=this.drag;if(e){const t=e.rootEl;Ro?.get(t)===e&&Ro?.delete(t),this.drag=null,(e=>{if(!e)return;Bp(e);const{eElement:t,pointerId:r}=e;if(t){try{t.releasePointerCapture(r)}catch{}e.eElement=null}})(e.pointerCapture),bd(e.handlers)}}onPointerDown(e,t){if(this.isPointer())return;const r=this.beans;if(ko?.has(t))return;const i=t.pointerType;if("touch"===i&&(r.gos.get("suppressTouch")||!e.includeTouch||(e.stopPropagationForTouch&&t.stopPropagation(),ci(du(t))))||!t.isPrimary||"mouse"===i&&0!==t.button)return;this.destroyDrag();const s=kr(r),n=e.eElement,o=t.pointerId,a=new cu(s,e,t,o);Ro??(Ro=new WeakMap),Ro.set(s,a),this.initDrag(a,[s,"pointerup",u=>{u.pointerId===o&&this.onMouseOrPointerUp(u)}],[s,"pointercancel",u=>{u.pointerId===o&&Es(u)&&this.cancelDrag()}],[s,"pointermove",u=>{u.pointerId===o&&this.onMouseOrPointerMove(u)},{passive:!1}],[s,"touchmove",Ws,{passive:!1}],[n,"mousemove",Ws,{passive:!1}]),0===e.dragStartPixels?this.onMouseOrPointerMove(t):Es(t)}onTouchStart(e,t){if(this.gos.get("suppressTouch")||!e.includeTouch||!Es(t)||ci(du(t)))return;if(e.stopPropagationForTouch&&t.stopPropagation(),this.isPointer())return void Ws(t);this.destroyDrag();const i=this.beans,s=kr(i),n=new cu(s,e,t.touches[0]),a=c=>this.onTouchUp(c),l=t.target??e.eElement;this.initDrag(n,[kr(i),"touchmove",Ws,{passive:!1}],[l,"touchmove",c=>this.onTouchMove(c),{passive:!0}],[l,"touchend",a,{passive:!0}],[l,"touchcancel",a,{passive:!0}]),0===e.dragStartPixels&&this.onMove(n.start)}onMouseDown(e,t){if(0!==t.button||ko?.has(t)||this.isPointer())return;const r=this.beans;this.destroyDrag();const i=new cu(kr(r),e,t),o=kr(r);this.initDrag(i,[o,"mousemove",a=>this.onMouseOrPointerMove(a)],[o,"mouseup",a=>this.onMouseOrPointerUp(a)]),0===e.dragStartPixels?this.onMouseOrPointerMove(t):Es(t)}onScroll(e){if(!Es(e))return;const t=this.drag,r=t?.lastDrag;r&&this.dragging&&t.params?.onDragging(r)}onMouseOrPointerMove(e){Es(e)&&(Ys()&&It(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&Ws(e),this.onMove(e))}onTouchMove(e){const t=this.drag;if(!t||!Es(e))return;const r=la(t.start,e.touches);r&&(e.preventDefault(),this.onMove(r))}onMove(e){const t=this.drag;if(!t)return;t.lastDrag=e;const r=t.params;if(!this.dragging){const i=t.start;if(ug(e,i,r.dragStartPixels??4)||(this.dragging=!0,r.capturePointer&&(t.pointerCapture=((e,t)=>{if(typeof PointerEvent>"u"||!(t instanceof PointerEvent))return null;const r=t.pointerId;if(!Op(e,r))return null;const i={eElement:e,pointerId:r,onLost(s){((e,t)=>{Bp(e);const{eElement:r,pointerId:i}=e;r&&t.pointerId===i&&Op(r,i)})(i,s)}};return e.addEventListener("lostpointercapture",i.onLost),i})(this.beans.eRootDiv,e)),this.eventSvc.dispatchEvent({type:"dragStarted",target:r.eElement}),r.onDragStart(i),this.drag!==t)||(r.onDragging(i),this.drag!==t))return}r.onDragging(e)}onTouchUp(e){const t=this.drag;t&&Es(e)&&this.onUp(la(t.start,e.changedTouches))}onMouseOrPointerUp(e){Es(e)&&this.onUp(e)}onUp(e){const t=this.drag;t&&(e||(e=t.lastDrag),e&&this.dragging&&(this.dragging=!1,t.params.onDragStop(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t.params.eElement})),this.destroyDrag())}onKeyDown(e){"Escape"===e.key&&this.cancelDrag()}},Np=e=>{bd(e.handlers);const t=e.oldTouchAction;if(null!=t){const r=e.params.eElement.style;r&&(r.touchAction=t)}},cu=class{constructor(e,t,r,i=null){this.rootEl=e,this.params=t,this.start=r,this.pointerId=i,this.handlers=[],this.lastDrag=null,this.pointerCapture=null,this.eElement=t.eElement}},du=e=>{const t=e.target;return t instanceof Element?t:null},Cb=class extends es{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.dragSource=null,this.dragImageParent=null,this.dragImageCompPromise=null,this.dragImageComp=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.dropTargets=[],this.lastDropTarget=null}addDragSource(e,t=!1){const r={capturePointer:!0,dragSource:e,eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:i=>this.onDragStart(e,i),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push(r),this.beans.dragSvc.addDragSource(r)}setDragImageCompIcon(e,t=!1){const r=this.dragImageComp;r&&(t||this.dragImageLastIcon!==e)&&(this.dragImageLastIcon=e,r.setIcon(e,t))}removeDragSource(e){const{dragSourceAndParamsList:t,beans:r}=this,i=t.find(s=>s.dragSource===e);i&&(r.dragSvc?.removeDragSource(i),ki(t,i))}destroy(){const{dragSourceAndParamsList:e,dropTargets:t,beans:r}=this,i=r.dragSvc;for(const s of e)i?.removeDragSource(s);e.length=0,t.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){const e=this.lastMouseEvent;e&&this.onDragging(e,!0)}onDragStart(e,t){this.lastMouseEvent=t,this.dragSource=e,this.dragItem=e.getDragItem();const r=e.eElement.getBoundingClientRect();this.dragInitialSourcePointerOffsetX=t.clientX-r.left,this.dragInitialSourcePointerOffsetY=t.clientY-r.top,e.onDragStarted?.(),this.createAndUpdateDragImageComp(e)}onDragStop(e){const{dragSource:t,lastDropTarget:r}=this;if(t?.onDragStopped?.(),r){const i=this.dropTargetEvent(r,e,!1);r.onDragStop?.(i)}this.clearDragAndDropProperties()}onDragCancel(){const{dragSource:e,lastDropTarget:t,lastMouseEvent:r}=this;if(e?.onDragCancelled?.(),t&&r){const i=this.dropTargetEvent(t,r,!1);t.onDragCancel?.(i)}this.clearDragAndDropProperties()}onDragging(e,t=!1){this.positionDragImageComp(e);const r=this.findCurrentDropTarget(e),{lastDropTarget:i,dragSource:s,dragItem:n}=this;let o=!1;if(r!==i){if(o=!0,i){const a=this.dropTargetEvent(i,e,t);i.onDragLeave?.(a)}if(null===i||r?null===i&&r&&this.handleEnter(s,n):this.handleExit(s,n),r){const a=this.dropTargetEvent(r,e,t);r.onDragEnter?.(a)}this.lastDropTarget=r}else if(r){const a=this.dropTargetEvent(r,e,t);r.onDragging?.(a),a?.changed&&(o=!0)}this.lastMouseEvent=e,o&&this.updateDragImageComp()}clearDragAndDropProperties(){this.removeDragImageComp(this.dragImageComp),this.dragImageCompPromise=null,this.dragImageParent=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.lastDropTarget=null,this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.dragSource=null}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,r=[[e.getContainer()]];return t?r.concat(t):r}isMouseOnDropTarget(e,t){const r=this.getAllContainersFromDropTarget(t);let i=!1;const s=(a,l)=>{for(const c of l){const{width:d,height:u,left:h,right:f,top:p,bottom:g}=c.getBoundingClientRect();if(0===d||0===u)return!1;if(!(a.clientX>=h&&a.clientX<f&&a.clientY>=p&&a.clientY<g))return!1}return!0};for(const a of r)if(s(e,a)){i=!0;break}const{eElement:n,type:o}=this.dragSource;return!(t.targetContainsSource&&!t.getContainer().contains(n))&&i&&t.isInterestedIn(o,n)}findCurrentDropTarget(e){const t=this.dropTargets.filter(n=>this.isMouseOnDropTarget(e,n)),r=t.length;if(0===r)return null;if(1===r)return t[0];const s=kr(this.beans).elementsFromPoint(e.clientX,e.clientY);for(const n of s)for(const o of t)if(-1!==this.getAllContainersFromDropTarget(o).flatMap(l=>l).indexOf(n))return o;return null}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.find(t=>t.external&&t.getContainer()===e)||null}dropTargetEvent(e,t,r){const{dragSource:i,dragItem:s,lastDraggingEvent:n,lastMouseEvent:o,dragInitialSourcePointerOffsetX:a,dragInitialSourcePointerOffsetY:l}=this,c=e.getContainer(),d=c.getBoundingClientRect(),{clientX:u,clientY:h}=t,f=u-(o?.clientX||0),p=h-(o?.clientY||0),g=this.createEvent({event:t,x:u-d.left,y:h-d.top,vDirection:p>0?"down":p<0?"up":null,hDirection:f<0?"left":f>0?"right":null,initialSourcePointerOffsetX:a,initialSourcePointerOffsetY:l,dragSource:i,fromNudge:r,dragItem:s,dropZoneTarget:c,dropTarget:n?.dropTarget??null,changed:!!n?.changed});return this.lastDraggingEvent=g,g}positionDragImageComp(e){const t=this.dragImageComp?.getGui();t&&function gx(e,t,r){const s=e.getBoundingClientRect().height,n=function bn(e){return lo(e)?.clientWidth??(window.innerWidth||-1)}(r)-2,o=function ta(e){return lo(e)?.clientHeight??(window.innerHeight||-1)}(r)-2;if(!e.offsetParent)return;const l=ho(e.offsetParent),{clientY:c,clientX:d}=t;let u=c-l.top-s/2,h=d-l.left-10;const f=It(r),p=f.defaultView||window,g=p.pageYOffset||f.documentElement.scrollTop,m=p.pageXOffset||f.documentElement.scrollLeft;n>0&&h+e.clientWidth>n+m&&(h=n+m-e.clientWidth),h<0&&(h=0),o>0&&u+e.clientHeight>o+g&&(u=o+g-e.clientHeight),u<0&&(u=0),e.style.left=`${h}px`,e.style.top=`${u}px`}(t,e,this.beans)}removeDragImageComp(e){this.dragImageComp===e&&(this.dragImageComp=null),e&&(e.getGui()?.remove(),this.destroyBean(e))}createAndUpdateDragImageComp(e){const t=this.createDragImageComp(e)??null;this.dragImageCompPromise=t,t?.then(r=>{if(t!==this.dragImageCompPromise||!this.lastMouseEvent||!this.isAlive())return void this.destroyBean(r);this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0;const i=this.dragImageComp;i!==r&&(this.dragImageComp=r,this.removeDragImageComp(i)),r&&(this.appendDragImageComp(r),this.updateDragImageComp())})}appendDragImageComp(e){const t=e.getGui(),r=t.style;r.position="absolute",r.zIndex="9999",this.beans.dragSvc?.hasPointerCapture()&&(r.pointerEvents="none"),this.gos.setInstanceDomData(t),this.beans.environment.applyThemeClasses(t),r.top="20px",r.left="20px";const i=lo(this.beans);this.dragImageParent=i,i?i.appendChild(t):this.warnNoBody()}updateDragImageComp(){const{dragImageComp:e,dragSource:t,lastDropTarget:r,lastDraggingEvent:i,dragImageLastLabel:s}=this;if(!e)return;this.setDragImageCompIcon(r?.getIconName?.(i)??null);let n=t?.dragItemName;"function"==typeof n&&(n=n(i)),n||(n=""),s!==n&&(this.dragImageLastLabel=n,e.setLabel(n))}};function Hp(e,t){return e+"_"+t}function sr(e){return e instanceof Sa}var Sa=class extends Q{constructor(e,t,r,i){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=r,this.pinned=i,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.colIdSanitised=Rr(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return Hp(this.groupId,this.partId)}isEmptyGroup(){return 0===this.displayedChildren.length}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!(!e||0===e.length)&&e.every(t=>t.isMoving())}checkLeft(){for(const e of this.displayedChildren)sr(e)&&e.checkLeft();if(this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=kt(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;for(const t of this.displayedChildren??[])e+=t.getActualWidth();return e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;for(const t of this.displayedChildren)t.isResizable()&&(e=!0);return e}getMinWidth(){let e=0;for(const t of this.displayedChildren)e+=t.getMinWidth();return e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){return!!this.getColGroupDef()?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){for(const t of this.displayedChildren??[])js(t)?e.push(t):sr(t)&&t.addDisplayedLeafColumns(e)}addLeafColumns(e){for(const t of this.children??[])js(t)?e.push(t):sr(t)&&t.addLeafColumns(e)}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return this.isPadding()&&e?.isPadding()?1+e.getPaddingLevel():0}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e?.isPadding();)e=e.getParent();if(!e||!e.getProvidedColumnGroup().isExpandable())return this.displayedChildren=this.children,void this.dispatchLocalEvent({type:"displayedChildrenChanged"});for(const r of this.children??[])if(!sr(r)||r.displayedChildren?.length)switch(r.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(r);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(r);break;default:this.displayedChildren.push(r)}this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},uu="row-group-",Sb=0,Js=class{constructor(e){this.master=!1,this.detail=void 0,this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this._leafs=void 0,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=Sb++,this.alreadyRendered=!1,this.hovered=!1,this.__selected=!1,this.beans=e}get allLeafChildren(){const e=this._leafs;return void 0===e?this.beans.groupStage?.loadLeafs?.(this)??null:e}set allLeafChildren(e){this._leafs=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const{valueCache:r,eventSvc:i}=this.beans,s=this.data;this.data=e,r?.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,s,t);if(this.__localEventService?.dispatchEvent(n),this.sibling){this.sibling.data=e;const a=this.sibling.createDataChangedEvent(e,s,t);this.sibling.__localEventService?.dispatchEvent(a)}i.dispatchEvent({type:"rowNodeDataChanged",node:this});const o=this.pinnedSibling;o&&(o.data=e,o.__localEventService?.dispatchEvent(o.createDataChangedEvent(e,s,t)),i.dispatchEvent({type:"rowNodeDataChanged",node:o}))}updateDataOnDetailNode(){const e=this.detailNode;e&&(e.data=this.data)}createDataChangedEvent(e,t,r){return{type:"dataChanged",node:this,oldData:t,newData:e,update:r}}getRowIndexString(){return null==this.rowIndex?(Ct(13),null):"top"===this.rowPinned?"t-"+this.rowIndex:"bottom"===this.rowPinned?"b-"+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){const{selectionSvc:r}=this.beans,i=r?.createDaemonNode?.(this),s=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),r&&(r.updateRowSelectable(this),r.syncInRowNode(this,i));const n=this.createDataChangedEvent(e,s,!1);this.__localEventService?.dispatchEvent(n)}setId(e){const t=Co(this.beans.gos);if(t)if(this.data){const r=this.parent?.getRoute()??[];this.id=t({data:this.data,parentKeys:r.length>0?r:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(uu)&&Ct(14,{groupPrefix:uu})}else this.id=void 0;else this.id=e}setRowTop(e){if(this.oldRowTop=this.rowTop,this.rowTop===e)return;this.rowTop=e,this.dispatchRowEvent("topChanged");const t=null!==e;this.displayed!==t&&(this.displayed=t,this.dispatchRowEvent("displayedChanged"))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,r){this.beans.expansionSvc?.setExpanded(this,e,t,r)}setDataValue(e,t,r){const{colModel:i,valueSvc:s,gos:n,editSvc:o}=this.beans,a="string"!=typeof e?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:d},data:u,rowIndex:h,rowPinned:f}=this;return d.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:h,rowPinned:f,column:a,colDef:a.colDef,data:u,node:this,oldValue:l,newValue:t,value:t,source:r}),!1}if(o&&!o.committing){const d=o.setDataValue({rowNode:this,column:a},t,r);if(null!=d)return d}const c=s.setValue(this,a,t,r);return this.dispatchCellChangedEvent(a,t,l),c&&this.pinnedSibling?.dispatchCellChangedEvent(a,t,l),c}updateHasChildren(){let e=this.group&&!this.footer||!!this.childrenAfterGroup?.length;const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return null==this.__hasChildren&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,r){const i={type:"cellChanged",node:this,column:e,newValue:t,oldValue:r};this.__localEventService?.dispatchEvent(i)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){if(this.footer)return this.sibling.isSelected();const e=this.rowPinned&&this.pinnedSibling;return e?e.isSelected():this.__selected}depthFirstSearch(e){const t=this.childrenAfterGroup;if(t)for(let r=0,i=t.length;r<i;++r)t[r].depthFirstSearch(e);e(this)}dispatchRowEvent(e){this.__localEventService?.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,r="api"){this.beans.selectionSvc?.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:r})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){(this.__localEventService??(this.__localEventService=new St)).addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){this.beans.validation?.checkRowEvents(e);const r=this.__localEventService??(this.__localEventService=new St);this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,r);const i=this.frameworkEventListenerService?.wrap(e,t)??t;r.addEventListener(e,i)}removeEventListener(e,t){const r=this.frameworkEventListenerService?.unwrap(e,t)??t;this.removeLocalListener(e,r)}removeLocalListener(e,t){const r=this.__localEventService;r&&(r.removeEventListener(e,t),r.noRegisteredListenersExist()&&(this.__localEventService=null))}isFullWidthCell(){if(ne(61),this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return!!e&&e({rowNode:this})}getRoute(){if(-1===this.level)return[];if(null==this.key)return;const e=[];let t=this;for(;null!=t?.key;)e.push(t.key),t=t.parent;return e.reverse()}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}getFirstChild(){const e=this.childStore;return e?e.getFirstNode():this.childrenAfterSort?.[0]??null}};function bb(e,t,r){return _e(t,{type:r,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var yb=new Set(["__autoHeights","__checkAutoHeightsDebounced","__localEventService","__objectId","_leafs","childStore","oldRowTop","sticky","treeNodeFlags","treeParent"]),Gp=e=>{for(;e?.length;){const t=e[0];if(t.data)return t;e=t.childrenAfterGroup}},Vp={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},Fb=new Set(Object.values(Vp));function Zs(e,t){const r=e.filterUi;if(!r)return null;if(r.created)return r.promise;if(t)return null;const i=r.create(r.refreshed),s=r;return s.created=!0,s.promise=i,i}function zp(e,t,r,i,s,n){e?.refresh?.({...t,model:r,state:i,source:s,additionalEventAttributes:n})}function Wp(e,t,r){const i=e();i?.created&&i.promise.then(s=>{const n=t();zp(s,i.filterParams,n,r()??{model:n},"ui")})}function Up(e,t,r,i,s,n,o){let a,c,l=!1;switch(e){case"apply":{const d=i();c=d?.model??null,o&&(c=o(c)),a={state:d?.state,model:c},l=!0;break}case"clear":a={model:null};break;case"reset":a={model:null},l=!0,c=null;break;case"cancel":a={model:r()}}s(a),l?n(c):Wp(t,r,i)}function Sr(e,t){return e[t]??null}function nr(e){return aa(e)}var $p=class extends ft{constructor(e){const{className:t="ag-filter-apply-panel"}=e??{};super(function kb(e){return{tag:"div",cls:e}}(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){const r=this.buttons;if(this.buttons=e,r===e)return;const i=this.getGui();let s;Rt(i),this.destroyListeners();const n=document.createDocumentFragment(),o=this.className,a=({type:c,label:d})=>{const u=v=>{this.dispatchLocalEvent({type:c,event:v})};["apply","clear","reset","cancel"].includes(c)||ne(75);const h="apply"===c,p=nr({tag:"button",attrs:{type:h&&t?"submit":"button"},ref:`${c}FilterButton`,cls:`ag-button ag-standard-button ${o}-button${h?" "+o+"-apply-button":""}`,children:d});this.activateTabIndex([p]),h&&(s=p);const g=v=>{"Enter"===v.key&&(v.preventDefault(),u(v))},m=this.listeners;p.addEventListener("click",u),m.push(()=>p.removeEventListener("click",u)),p.addEventListener("keydown",g),m.push(()=>p.removeEventListener("keydown",g)),n.append(p)};for(const c of e)a(c);this.eApply=s;const l=this.validationTooltipFeature;s&&!l?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!s&&l&&(this.validationTooltipFeature=this.destroyBean(l)),i.append(n)}getApplyButton(){return this.eApply}updateValidity(e,t=null){const r=this.eApply;r&&(di(r,!1===e),this.validationMessage=t??null,this.validationTooltipFeature?.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(const e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}},Tb={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd",filterSummaryInactive:"is (All)",filterSummaryContains:"contains",filterSummaryNotContains:"does not contain",filterSummaryTextEquals:"equals",filterSummaryTextNotEqual:"does not equal",filterSummaryStartsWith:"begins with",filterSummaryEndsWith:"ends with",filterSummaryBlank:"is blank",filterSummaryNotBlank:"is not blank",filterSummaryEquals:"=",filterSummaryNotEqual:"!=",filterSummaryGreaterThan:">",filterSummaryGreaterThanOrEqual:">=",filterSummaryLessThan:"<",filterSummaryLessThanOrEqual:"<=",filterSummaryInRange:"between",filterSummaryInRangeValues:e=>`(${e[0]}, ${e[1]})`,filterSummaryTextQuote:e=>`"${e[0]}"`};function en(e,t,r){return function mx(e,t,r,i){const s=t[r];return e.getLocaleTextFunc()(r,"function"==typeof s?s(i):s,i)}(e,Tb,t,r)}function gu(e,t){const{debounceMs:r}=e;return Xl(e)?(null!=r&&ne(71),0):r??t}function Xl(e){return(e.buttons?.indexOf("apply")??-1)>=0}var Pb=class extends ft{constructor(e,t,r,i,s,n){super(),this.column=e,this.wrapper=t,this.eventParent=r,this.updateModel=i,this.isGlobalButtons=s,this.enableGlobalButtonCheck=n,this.hidePopup=null,this.applyActive=!1}postConstruct(){const{comp:e,params:t}=this.wrapper,r=t,i=r.useForm;this.setTemplate({tag:i?"form":"div",cls:"ag-filter-wrapper"}),i&&this.addManagedElementListeners(this.getGui(),{submit:n=>{n?.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=r,this.resetButtonsPanel(r),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:n,params:o})=>{n===this.column&&this.resetButtonsPanel(o,this.params)},filterStateChanged:({column:n,state:o})=>{n===this.column&&this.eButtons?.updateValidity(!1!==o.valid)},filterAction:({column:n,action:o,event:a})=>{n===this.column&&this.afterAction(o,a)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:n})=>{if(n!==this.isGlobalButtons){this.isGlobalButtons=n;const o=this.params;this.resetButtonsPanel(o,o,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,r){const{buttons:i,readOnly:s}=t??{},{buttons:n,readOnly:o,useForm:a}=e;if(!r&&s===o&&xn(i,n))return;let c=this.eButtons;if(n&&n.length>0&&!e.readOnly&&!this.isGlobalButtons){const d=n.map(u=>({type:u,label:en(this,`${u}Filter`)}));if(this.applyActive=Xl(this.params),!c){c=this.createBean(new $p),this.appendChild(c.getGui());const u=this.column,h=f=>({event:p})=>{this.updateModel(u,f,{fromButtons:!0}),this.afterAction(f,p)};c?.addManagedListeners(c,{apply:h("apply"),clear:h("clear"),reset:h("reset"),cancel:h("cancel")}),this.eButtons=c}c.updateButtons(d,a)}else this.applyActive=!1,c&&(vr(c.getGui()),this.eButtons=this.destroyBean(c))}close(e){const t=this.hidePopup;if(!t)return;const r=e,i=r?.key;let s;("Enter"===i||" "===i)&&(s={keyboardEvent:r}),t(s),this.hidePopup=null}afterAction(e,t){const{params:r,applyActive:i}=this,s=r?.closeOnApply;switch(e){case"apply":t?.preventDefault(),s&&i&&this.close(t);break;case"reset":s&&i&&this.close();break;case"cancel":s&&this.close(t)}}handleKeyDown(e){!e.defaultPrevented&&"Enter"===e.key&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},Db={tag:"div",cls:"ag-filter"},Ab=class extends ft{constructor(e,t,r){super(Db),this.column=e,this.source=t,this.enableGlobalButtonCheck=r,this.wrapper=null}postConstruct(){this.beans.colFilter?.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return null!=this.wrapper}getFilter(){return this.wrapper?.then(e=>e.comp)??null}afterInit(){return this.wrapper?.then(()=>{})??$t.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.wrapper?.then(t=>{this.comp?.afterGuiAttached(e),t?.comp?.afterGuiAttached?.(e)})}afterGuiDetached(){this.wrapper?.then(e=>{e?.comp?.afterGuiDetached?.()})}createFilter(e){const{column:t,source:r,beans:{colFilter:i}}=this,s=i.getFilterUiForDisplay(t)??null;this.wrapper=s,s?.then(n=>{if(!n)return;const{isHandler:o,comp:a}=n;let l;if(o){const c=!!this.enableGlobalButtonCheck,d=this.createBean(new Pb(t,n,i,i.updateModel.bind(i),c&&i.isGlobalButtons,c));this.comp=d,l=d.getGui()}else l=a.getGui(),le(l)||ne(69,{guiFromFilter:l});this.appendChild(l),e?this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:r,eGui:this.getGui()}):a.afterGuiAttached?.(this.afterGuiAttachedParams)})}onFilterDestroyed(e){const{source:t,column:r}=e;("api"===t||"paramsUpdated"===t)&&r.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(Rt(this.getGui()),this.comp=this.destroyBean(this.comp),this.createFilter())}destroy(){this.beans.colFilter?.activeFilterComps.delete(this),this.eventSvc.dispatchEvent({type:"filterClosed",column:this.column}),this.wrapper=null,this.comp=this.destroyBean(this.comp),this.afterGuiAttachedParams=void 0,super.destroy()}},jp={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},Kp=["january","february","march","april","may","june","july","august","september","october","november","december"];function Mb(e,t){return null==e?-1:null==t?1:Number.parseFloat(e)-Number.parseFloat(t)}function qp(e){return e instanceof Date&&!isNaN(e.getTime())}var pu={number:()=>{},boolean:()=>({maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>!1===t,numberOfInputs:0}]}),date:()=>({isValidDate:qp}),dateString:({dataTypeDefinition:e})=>({comparator:(t,r)=>{const i=e.dateParser(r);return null==r||i<t?-1:i>t?1:0},isValidDate:t=>"string"==typeof t&&qp(e.dateParser(t))}),dateTime:e=>pu.date(e),dateTimeString:e=>pu.dateString(e),object:()=>{},text:()=>{}},mu={number:()=>({comparator:Mb}),boolean:({t:e})=>({valueFormatter:t=>le(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:r=>{const i=e(r);return le(i)?i:t("blanks","(Blanks)")},treeList:!0,treeListFormatter:(r,i)=>{if("NaN"===r)return t("invalidDate","Invalid Date");if(1===i&&null!=r){const s=Kp[Number(r)-1];return t(s,jp[s])}return r??t("blanks","(Blanks)")},treeListPathGetter:r=>Hl(r,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:r})=>({valueFormatter:i=>{const s=e(i);return le(s)?s:r("blanks","(Blanks)")},treeList:!0,treeListPathGetter:i=>Hl(t.dateParser(i??void 0),!1),treeListFormatter:(i,s)=>{if(1===s&&null!=i){const n=Kp[Number(i)-1];return r(n,jp[n])}return i??r("blanks","(Blanks)")}}),dateTime:e=>{const t=mu.date(e);return t.treeListPathGetter=Hl,t},dateTimeString(e){const t=e.dataTypeDefinition.dateParser,r=mu.dateString(e);return r.treeListPathGetter=i=>Hl(t(i??void 0)),r},object:({formatValue:e,t})=>({valueFormatter:r=>{const i=e(r);return le(i)?i:t("blanks","(Blanks)")}}),text:()=>{}},_b={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},Lb={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"},Xp="ag-resizer-wrapper",tn=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),Bb={tag:"div",cls:Xp,children:[tn("eTopLeft","topLeft"),tn("eTop","top"),tn("eTopRight","topRight"),tn("eRight","right"),tn("eBottomRight","bottomRight"),tn("eBottom","bottom"),tn("eBottomLeft","bottomLeft"),tn("eLeft","left")]},Nb=class extends Q{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config=Object.assign({},{popup:!1},t)}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(e){const{clientHeight:t,clientWidth:r}=this.offsetParent,i=r/2-this.getWidth()/2,s=t/2-this.getHeight()/2;this.offsetElement(i,s,e)}initialisePosition(e){if(this.positioned)return;const{centered:t,forcePopupParentAsOffsetParent:r,minWidth:i,width:s,minHeight:n,height:o,x:a,y:l}=this.config;this.offsetParent||this.setOffsetParent();let c=0,d=0;const u=Ji(this.element);if(u){const h=this.findBoundaryElement(),f=window.getComputedStyle(h);if(null!=f.minWidth){const p=h.offsetWidth-this.element.offsetWidth;d=Number.parseInt(f.minWidth,10)-p}if(null!=f.minHeight){const p=h.offsetHeight-this.element.offsetHeight;c=Number.parseInt(f.minHeight,10)-p}}if(this.minHeight=n||c,this.minWidth=i||d,s&&this.setWidth(s),o&&this.setHeight(o),(!s||!o)&&this.refreshSize(),t)this.center(e);else if(a||l)this.offsetElement(a,l,e);else if(u&&r){let h=this.boundaryEl,f=!0;if(h||(h=this.findBoundaryElement(),f=!1),h){const p=Number.parseFloat(h.style.top),g=Number.parseFloat(h.style.left);f?this.offsetElement(isNaN(g)?0:g,isNaN(p)?0:p,e):this.setPosition(g,p)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){if(!this.config.popup||e===this.movable)return;this.movable=e;const r=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragSvc?.addDragSource(r),this.moveElementDragListener=r):(this.dragSvc?.removeDragSource(r),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),"boolean"==typeof e){if(!1===e)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(t=>{const i=!!e[t],s=this.getResizerElement(t),n={dragStartPixels:0,eElement:s,onDragStart:o=>this.onResizeStart(o,t),onDragging:this.onResize.bind(this),onDragStop:o=>this.onResizeEnd(o,t)};(i||!this.isAlive()&&!i)&&(i?(this.dragSvc?.addDragSource(n),this.resizeListeners.push(n),s.style.pointerEvents="all"):s.style.pointerEvents="none",this.resizable[t]=i)})}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:e,width:t}=this.lastSize;-1!==t&&(this.element.style.width=`${t}px`),-1!==e&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,r=this.element;let i=!1;if("string"==typeof e&&e.includes("%"))oa(r,e),e=Pr(r),i=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const s=this.getAvailableHeight();s&&e>s&&(e=s)}this.getHeight()!==e&&(i?(r.style.maxHeight="unset",r.style.minHeight="unset"):t?oa(r,e):(r.style.height=`${e}px`,r.style.flex="0 0 auto",this.lastSize.height="number"==typeof e?e:Number.parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:r}=this.offsetParent;if(!r)return null;const i=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),n=e?this.position.y:i.top,o=e?0:s.top;let a=0;if(t){const c=this.element.parentElement;if(c){const{bottom:d}=c.getBoundingClientRect();a=d-i.bottom}}return r+o-n-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:r}=this.config;let i=!1;if("string"==typeof e&&e.includes("%"))Zi(t,e),e=ui(t),i=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:s}=this.offsetParent,n=r?this.position.x:this.element.getBoundingClientRect().left;s&&e+n>s&&(e=s-n)}this.getWidth()!==e&&(i?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Zi(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width="number"==typeof e?e:Number.parseFloat(e)))}offsetElement(e=0,t=0,r){const{forcePopupParentAsOffsetParent:i}=this.config,s=i?this.boundaryEl:this.element;s&&(this.popupSvc?.positionPopup({ePopup:s,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t}),postProcessCallback:r}),this.setPosition(Number.parseFloat(s.style.left),Number.parseFloat(s.style.top)))}constrainSizeToAvailableHeight(e){this.config.forcePopupParentAsOffsetParent&&(e&&this.popupSvc?(this.resizeObserverSubscriber?.(),this.resizeObserverSubscriber=zs(this.beans,this.popupSvc?.getPopupParent(),()=>{const r=this.getAvailableHeight();this.element.style.setProperty("max-height",`${r}px`)})):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0)))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){const{e:t,isLeft:r,isTop:i,anywhereWithin:s,topBuffer:n}=e,o=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y;return{movementX:this.shouldSkipX(t,!!r,!!s,o)?0:o,movementY:this.shouldSkipY(t,!!i,n,a)?0:a}}shouldSkipX(e,t,r,i){const s=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),o=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:s.left;let l=a<=0&&n.left>=e.clientX||n.right<=e.clientX&&n.right<=o.right;return!!l||(l=t?i<0&&e.clientX>a+n.left||i>0&&e.clientX<a+n.left:r?i<0&&e.clientX>o.right||i>0&&e.clientX<a+n.left:i<0&&e.clientX>o.right||i>0&&e.clientX<o.right,l)}shouldSkipY(e,t,r=0,i){const s=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),o=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:s.top;let l=a<=0&&n.top>=e.clientY||n.bottom<=e.clientY&&n.bottom<=o.bottom;return!!l||(l=t?i<0&&e.clientY>a+n.top+r||i>0&&e.clientY<a+n.top:i<0&&e.clientY>o.bottom||i>0&&e.clientY<o.bottom,l)}createResizeMap(){const e=t=>({element:this.element.querySelector(`[data-ref=${t}Resizer]`)});this.resizerMap={topLeft:e("eTopLeft"),top:e("eTop"),topRight:e("eTopRight"),right:e("eRight"),bottomRight:e("eBottomRight"),bottom:e("eBottom"),bottomLeft:e("eBottomLeft"),left:e("eLeft")}}addResizers(){if(this.resizersAdded)return;const e=this.element;e&&(e.appendChild(nr(Bb)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0,this.element.querySelector(`.${Xp}`)?.remove(),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");const{popup:r,forcePopupParentAsOffsetParent:i}=this.config;!r&&!i&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(r=>!r.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,r=0;for(let i=0;i<e.length;i++){const s=e[i],n=!!s.style.flex&&"0 0 auto"!==s.style.flex;if(s===this.element)continue;let o=this.minHeight||0,a=this.minWidth||0;if(n){const l=window.getComputedStyle(s);l.minHeight&&(o=Number.parseInt(l.minHeight,10)),l.minWidth&&(a=Number.parseInt(l.minWidth,10))}else o=s.offsetHeight,a=s.offsetWidth;t+=o,r+=a}return{height:t,width:r}}applySizeToSiblings(e){let t=null;const r=this.getSiblings();if(r){for(let i=0;i<r.length;i++){const s=r[i];s!==t&&(e?s.style.height=`${s.offsetHeight}px`:s.style.width=`${s.offsetWidth}px`,s.style.flex="0 0 auto",s===this.element&&(t=r[i+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:r}=this.config,{isTop:i,isRight:s,isBottom:n,isLeft:o}=this.currentResizer,a=s||o,l=n||i,{movementX:c,movementY:d}=this.calculateMouseMovement({e,isLeft:o,isTop:i}),u=this.position.x,h=this.position.y;let f=0,p=0;if(a&&c){const g=o?-1:1,m=this.getWidth(),v=m+c*g;let w=!1;o&&(f=m-v,(u+f<=0||v<=this.minWidth)&&(w=!0,f=0)),w||this.setWidth(v)}if(l&&d){const g=i?-1:1,m=this.getHeight(),v=m+d*g;let w=!1;i?(p=m-v,(h+p<=0||v<=this.minHeight)&&(w=!0,p=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&m<v&&this.getMinSizeOfSiblings().height+v>this.element.parentElement.offsetHeight&&(w=!0),w||this.setHeight(v)}this.updateDragStartPosition(e.clientX,e.clientY),((t||r)&&f||p)&&this.offsetElement(u+f,h+p)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:t,y:r}=this.position;let i;this.config.calculateTopBuffer&&(i=this.config.calculateTopBuffer());const{movementX:s,movementY:n}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:i});this.offsetElement(t+s,r+n),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.offsetParent=this.config.forcePopupParentAsOffsetParent&&this.popupSvc?this.popupSvc.getPopupParent():this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if("static"!==window.getComputedStyle(e).position)return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){const e=this.resizeListeners.pop();this.dragSvc?.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragSvc?.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},Yp="__ag_Grid_Stop_Propagation";function Ln(e){e[Yp]=!0}function Fs(e){return!0===e[Yp]}var To=class extends Q{constructor(e,t={}){super(),this.eFocusable=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:r=>{if(r.defaultPrevented)return;const i=An(this.beans,this.eFocusable,!1,r.shiftKey);i&&(i.focus(),r.preventDefault())},...t}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:r}}=this;e.classList.add("ag-focus-managed"),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),r&&this.addManagedElementListeners(e,{focusout:r})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:t=>{if(t.defaultPrevented||Fs(t))return;const{callbacks:r}=this;r.shouldStopEventPropagation(t)?Ln(t):"Tab"===t.key?r.onTabKeyDown(t):r.handleKeyDown&&r.handleKeyDown(t)}})}},Gb=class extends ft{constructor(e,t){super(),this.filterNameKey=e,this.cssIdentifier=t,this.applyActive=!1,this.debouncePending=!1,this.defaultDebounceMs=0}postConstruct(){const e={tag:"div",cls:`ag-filter-body-wrapper ag-${this.cssIdentifier}-body-wrapper`,children:[this.createBodyTemplate()]};this.setTemplate(e,this.getAgComponents()),this.createManagedBean(new To(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new Nb(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}handleKeyDown(e){}init(e){const t=e;this.setParams(t),this.setModelIntoUi(t.state.model,!0).then(()=>this.updateUiVisibility())}refresh(e){const t=e,r=this.params;this.params=t,"colDef"===t.source&&this.updateParams(t,r);const s=t.state,n=this.state;return this.state=s,(s.model!==n.model||s.state!==n.state)&&this.setModelIntoUi(s.model),!0}setParams(e){this.params=e,this.state=e.state,this.commonUpdateParams(e)}updateParams(e,t){this.commonUpdateParams(e,t)}commonUpdateParams(e,t){this.applyActive=Xl(e),this.setupApplyDebounced()}doesFilterPass(e){ne(283);const{getHandler:t,model:r,column:i}=this.params;return t().doesFilterPass({...e,model:r,handlerParams:this.beans.colFilter.getHandlerParams(i)})}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return ne(284),null!=this.params.model}setupApplyDebounced(){const e=gu(this.params,this.defaultDebounceMs),t=Cr(this,this.checkApplyDebounce.bind(this),e);this.applyDebounced=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return ne(285),this.params.model}setModel(e){ne(286);const{beans:t,params:r}=this;return t.colFilter.setModelForColumnLegacy(r.column,e)}applyModel(e="api"){return this.doApplyModel()}canApply(e){return!0}doApplyModel(e){const{params:t,state:r}=this,i=!this.areModelsEqual(t.model,r.model);return i&&t.onAction("apply",e),i}onNewRowsLoaded(){}onUiChanged(e,t=!1){this.updateUiVisibility();const r=this.getModelFromUi(),i={model:r,state:this.getState(),valid:this.canApply(r)};this.state=i;const s=this.params;s.onStateChange(i),s.onUiChange(this.getUiChangeEventParams()),this.gos.get("enableFilterHandlers")||this.eventSvc.dispatchEvent({type:"filterModified",column:s.column,filterInstance:this}),e??(e=this.applyActive?void 0:"debounce"),"immediately"===e?this.doApplyModel({afterFloatingFilter:t,afterDataChange:!1}):"debounce"===e&&this.applyDebounced()}getState(){}getUiChangeEventParams(){}afterGuiAttached(e){this.lastContainerType=e?.container,this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:r}=this;if(!t)return;const i="floatingFilter"===e||"columnFilter"===e;i?(t.restoreLastSize(),t.setResizable(r.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(i)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(e){return en(this,e)}getPositionableElement(){return this.getGui()}areModelsEqual(e,t){return e===t||null==e&&null==t||null!=e&&null!=t&&this.areNonNullModelsEqual(e,t)}};function Qp(e){return!!e.operator}var ji={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},vu=class extends Q{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.gos.get("domLayout"),t={autoHeight:"autoHeight"===e,normal:"normal"===e,print:"print"===e};this.view.updateLayoutClasses(t.autoHeight?ji.AUTO_HEIGHT:t.print?ji.PRINT:ji.NORMAL,t)}},rn="Viewport",Jp="fakeVScrollComp",Cu=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],zb=class extends Q{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=Cr(this,()=>this.lastScrollSource[1]=null,150),this.resetLastVScrollDebounced=Cr(this,()=>this.lastScrollSource[0]=null,150)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),this.clearRetryListenerFncs=[],window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.invalidateVerticalScroll.bind(this),t=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),bodyHeightChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,r=>{this.centerRowsCtrl=r.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,rn)});for(const e of Cu){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"),r=t?Cr(this,this.onVScroll.bind(this,rn),100):this.onVScroll.bind(this,rn),i=t?Cr(this,this.onVScroll.bind(this,Jp),100):this.onVScroll.bind(this,Jp);this.addManagedElementListeners(this.eBodyViewport,{scroll:r}),this.registerScrollPartner(e,i)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){null!=this.centerRowsCtrl&&(void 0===e&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...Cu,rn])this.lastScrollSource[1]!==t&&Ui(this.getViewportForSource(t),e,this.enableRtl)}getViewportForSource(e){return e===rn?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return null==this.lastScrollSource[t]?(0===t?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;const t=this.centerRowsCtrl.eViewport,{scrollLeft:r}=t;if(this.shouldBlockScrollUpdate(1,r,!0))return;const i=En(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(i),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(t=e===rn?this.eBodyViewport.scrollTop:this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0))return;const{animationFrameSvc:r}=this;r?.setScrollTop(t),this.nextScrollTop=t,e===rn?this.ctrlsSvc.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,r?.active?r.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.ctrlsSvc.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}isScrolling(){return this.isScrollActive}fireScrollEvent(e){const t={type:"bodyScroll",direction:1===e?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.isScrollActive=!0,this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.isScrollActive=!1,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},150)}shouldBlockScrollUpdate(e,t,r=!1){return!(r&&!Pn())&&(0===e?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t))}shouldBlockVerticalScroll(e){const t=si(this.eBodyViewport),{scrollHeight:r}=this.eBodyViewport;return e<0||e+t>r}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:r}=this.centerRowsCtrl.eViewport;if(this.enableRtl){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>r}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){const e=this.scrollLeft;let t=!1;for(const r of Cu)if(this.getViewportForSource(r).scrollLeft!==e){t=!0;break}t&&this.onHScroll(rn)}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)&&(e=this.enableRtl?e>0?0:i:Math.min(Math.max(e,0),i)),Ui(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:r,lastScrollTop:i}=this;return{top:i,bottom:i+r}}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:r}=this.beans,i=r.getRowCount();let s=-1;for(let n=0;n<i;n++){const o=r.getRow(n);if("function"==typeof e){if(o&&e(o)){s=n;break}}else if(e===o||e===o.data){s=n;break}}s>=0&&this.ensureIndexVisible(s,t)}ensureIndexVisible(e,t,r=0){if(Dr(this.gos,"print"))return;const{rowModel:i}=this.beans,s=i.getRowCount();if("number"!=typeof e||e<0||e>=s)return void ne(88,{index:e});this.clearRetryListeners();const{frameworkOverrides:n,pageBounds:o,rowContainerHeight:a,rowRenderer:l}=this.beans;n.wrapIncoming(()=>{const c=this.ctrlsSvc.getGridBodyCtrl(),d=i.getRow(e);let u,h,f=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:p,stickyBottomHeight:g}=c,m=d.rowTop,v=d.rowHeight,w=o.getPixelOffset(),C=d.rowTop-w,y=C+d.rowHeight,k=this.getVScrollPosition(),E=a.divStretchOffset,S=k.top+E,_=k.bottom+E,M=_-S,H=a.getScrollPositionForPixel(C),V=a.getScrollPositionForPixel(y-M),B=Math.min((H+V)/2,C);let oe=null;"top"===t?oe=H-p:"bottom"===t?oe=V+g:"middle"===t?oe=B:S+p>C?oe=H-p:_-g<y&&(oe=V-H>M?H-p:V+g),null!==oe&&(this.setVerticalScrollPosition(oe),l.redraw({afterScroll:!0})),u=m!==d.rowTop||v!==d.rowHeight,h=p!==c.stickyTopHeight||g!==c.stickyBottomHeight,f++}while((u||h)&&f<10);if(this.animationFrameSvc?.flushAllFrames(),r<10&&(d?.stub||!this.beans.rowAutoHeight?.areRowsMeasured())){const p=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{const g=this.getVScrollPosition().top;p!==g&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=i.getRowCount())&&this.ensureIndexVisible(e,t,r+1)}})}})}clearRetryListeners(){for(const e of this.clearRetryListenerFncs)e();this.clearRetryListenerFncs=[]}ensureColumnVisible(e,t="auto"){const{colModel:r,frameworkOverrides:i}=this.beans,s=r.getCol(e);if(!s||s.isPinned()||!this.visibleCols.isColDisplayed(s))return;const n=this.getPositionedHorizontalScroll(s,t);i.wrapIncoming(()=>{null!==n&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:r,columnAfterEnd:i}=this.isColumnOutsideViewport(e),s=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),n=this.centerRowsCtrl.getCenterWidth(),o=this.enableRtl;let a=(o?r:i)||s,l=o?i:r;"auto"!==t&&(a="start"===t,l="end"===t);const c="middle"===t;if(a||l||c){const{colLeft:d,colMiddle:u,colRight:h}=this.getColumnBounds(e);return c?u-n/2:a?o?h:d:o?d-n:h-n}return null}isColumnOutsideViewport(e){const{start:t,end:r}=this.getViewportBounds(),{colLeft:i,colRight:s}=this.getColumnBounds(e),n=this.enableRtl;return{columnBeforeStart:n?t>s:r<s,columnAfterEnd:n?r<i:t>i}}getColumnBounds(e){const t=this.enableRtl,r=this.visibleCols.bodyWidth,i=e.getActualWidth(),s=e.getLeft(),n=t?-1:1,o=t?r-s:s;return{colLeft:o,colMiddle:o+i/2*n,colRight:o+i*n}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft();return{start:t,end:e+t,width:e}}},xu=class extends Q{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=Dr(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:r}=this.beans,i=t.bodyWidth,s=t.getColsLeftWidth(),n=t.getDisplayedColumnsRightWidth();let o;e?o=i+s+n:(o=i,this.addSpacer&&0===(this.gos.get("enableRtl")?s:n)&&r.verticalScrollShowing&&(o+=r.getScrollbarWidth())),this.callback(o)}},Wb=class extends Q{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:r}=this,i=()=>{ws(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(i),r.registerBodyViewportResizeListener(i)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans;e?.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const r=this.centerContainerCtrl.getCenterWidth();r!==this.centerWidth&&(this.centerWidth=r,t?.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const t=si(this.gridBodyCtrl.eBodyViewport);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){if(!this.isAlive())return;const e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.beans.colViewport.setScrollPosition(e,t)}};function Yl(e,t,r,i){const s=t.getColDef().cellRendererParams?.suppressMouseEventHandling;return e0(e,t,r,i,s)}function e0(e,t,r,i,s){return!!s&&s(_e(e,{column:t,node:r,event:i}))}function t0(e,t,r){let i=t;for(;i;){const s=_g(e,i,r);if(s)return s;i=i.parentElement}return null}var Ql="cellCtrl";function Su(e,t){return t0(e,t,Ql)}var Jl="renderedRow";function $b(e,t){return t0(e,t,Jl)}function bu(e,t,r,i,s){const n=i?i.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;const o=_e(e,{event:t,editing:s,column:i,node:r,data:r.data,colDef:i.getColDef()});return!(!n||!n(o))}var ey=class extends Q{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){const t=["dblclick","contextmenu","mouseover","mouseout","click",dg("touchstart")?"touchstart":"mousedown"];for(const r of t){const i=this.processMouseEvent.bind(this,r);this.addManagedElementListeners(this.element,{[r]:i})}}processMouseEvent(e,t){if(!ca(this.beans,t)||Fs(t))return;const{cellCtrl:r,rowCtrl:i}=this.getControlsForEventTarget(t.target);"contextmenu"===e?(r?.column&&r.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,i,r)):(r&&r.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:Su(t,e),rowCtrl:$b(t,e)}}processKeyboardEvent(e,t){const{cellCtrl:r,rowCtrl:i}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(r?this.processCellKeyboardEvent(r,e,t):i?.isFullWidth()&&this.processFullWidthRowKeyboardEvent(i,e,t))}processCellKeyboardEvent(e,t,r){const i=this.editSvc?.isEditing(e,{withOpenEditor:!0})??!1;!bu(this.gos,r,e.rowNode,e.column,i)&&"keydown"===t&&(!i&&this.beans.navigation?.handlePageScrollingKey(r)||e.onKeyDown(r),this.doGridOperations(r,i),xp(r)&&e.processCharacter(r)),"keydown"===t&&this.eventSvc.dispatchEvent(e.createEvent(r,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,r){const{rowNode:i}=e,{focusSvc:s,navigation:n}=this.beans,a=s.getFocusedCell()?.column;if(!bu(this.gos,r,i,a,!1)&&"keydown"===t)switch(r.key){case"Home":case"End":case"PageUp":case"PageDown":n?.handlePageScrollingKey(r,!0);break;case U_LEFT:case U_RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case U_UP:case U_DOWN:e.onKeyboardNavigate(r);break;case"Tab":e.onTabKeyDown(r)}"keydown"===t&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",r))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!ca(this.beans,e))return;const r=function Zb(e){const{keyCode:t}=e;let r;switch(t){case 65:r="KeyA";break;case 67:r="KeyC";break;case 86:r="KeyV";break;case 68:r="KeyD";break;case 90:r="KeyZ";break;case 89:r="KeyY";break;default:r=e.code}return r}(e),{clipboardSvc:i,undoRedo:s}=this.beans;return"KeyA"===r?this.onCtrlAndA(e):"KeyC"===r?this.onCtrlAndC(i,e):"KeyD"===r?this.onCtrlAndD(i,e):"KeyV"===r?this.onCtrlAndV(i,e):"KeyX"===r?this.onCtrlAndX(i,e):"KeyY"===r?this.onCtrlAndY(s):"KeyZ"===r?this.onCtrlAndZ(s,e):void 0}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:r,selectionSvc:i},gos:s}=this;r&&xs(s)&&!function jx(e){const t=e.get("rowSelection");return"string"!=typeof t&&"multiRow"===t?.mode&&(t.ctrlASelectsRows??!1)}(s)&&t.isRowsToRender()?function jb(e){const{pinnedRowModel:t,rowModel:r}=e,[i,s]=[t?.isEmpty("top")??!0,t?.isEmpty("bottom")??!0],n=i?null:"top";let o,a;s?(o=null,a=r.getRowCount()-1):(o="bottom",a=t?.getPinnedBottomRowCount()??-1);const{visibleCols:l,rangeSvc:c}=e,d=l.allCols;!c||!d?.length||c.setCellRange({rowStartIndex:0,rowStartPinned:n,rowEndIndex:a,rowEndPinned:o})}(this.beans):i&&i.selectAllRowNodes({source:"keyboardSelectAll",selectAll:Gg(s)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:r}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(r,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:r}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(r,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){const{cellCtrl:r}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(r,{withOpenEditor:!0})||e&&!this.gos.get("suppressClipboardPaste")&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get("suppressClipboardPaste")&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){!this.gos.get("undoRedoCellEditing")||!e||(t.preventDefault(),t.shiftKey?e.redo("ui"):e.undo("ui"))}onCtrlAndY(e){e?.redo("ui")}},r0=class extends Q{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,r=null!=t?`${t}px`:"";this.eContainer.style.height=r,this.eViewport&&(this.eViewport.style.height=r)}},Zl=e=>e.topRowCtrls,ec=e=>e.getStickyTopRowCtrls(),tc=e=>e.getStickyBottomRowCtrls(),rc=e=>e.bottomRowCtrls,ic=e=>e.allRowCtrls,yu=e=>e.getCtrls("top"),Eu=e=>e.getCtrls("center"),Fu=e=>e.getCtrls("bottom"),ty={center:{type:"center",name:"center-cols",getRowCtrls:ic,getSpannedRowCtrls:Eu},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:ic,getSpannedRowCtrls:Eu},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:ic,getSpannedRowCtrls:Eu},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:ic},topCenter:{type:"center",name:"floating-top",getRowCtrls:Zl,getSpannedRowCtrls:yu},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:Zl,getSpannedRowCtrls:yu},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:Zl,getSpannedRowCtrls:yu},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:Zl},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:ec},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:ec},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:ec},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:ec},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:tc},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:tc},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:tc},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:tc},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:rc,getSpannedRowCtrls:Fu},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:rc,getSpannedRowCtrls:Fu},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:rc,getSpannedRowCtrls:Fu},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:rc}};function i0(e){return`ag-${ba(e).name}-viewport`}function sc(e){const t=ba(e);return t.container??`ag-${t.name}-container`}function ry(e){return`ag-${ba(e).name}-spanned-cells-container`}function ba(e){return ty[e]}var oy=["center","left","right","fullWidth"],ay=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],ly=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],cy=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],s0=["stickyTopCenter","stickyTopLeft","stickyTopRight"],n0=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],dy=[...s0,"stickyTopFullWidth",...n0,"stickyBottomFullWidth"],uy=["topCenter","topLeft","topRight","bottomCenter","bottomLeft","bottomRight","center","left","right",...s0,...n0],hy=class extends Q{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=ba(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new Wb(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,r,i){this.comp=e,this.eContainer=t,this.eSpannedContainer=r,this.eViewport=i,this.createManagedBean(new ey(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:s,rangeSvc:n}=this.beans,o=()=>this.onPinnedWidthChanged();this.forContainers(ly,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:o})}),this.forContainers(cy,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:o})}),this.forContainers(oy,()=>this.createManagedBean(new r0(this.eContainer,"center"===this.name?i:void 0))),n&&this.forContainers(uy,()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer))),this.forContainers(ay,()=>this.createManagedBean(new xu(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,r=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({displayedColumnsChanged:r,displayedColumnsWidthChanged:r,displayedRowsChanged:i=>this.onDisplayedRowsChanged(i.afterScroll)}),r(),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(dy.indexOf(this.name)>=0)return void this.comp.setDomOrder(!0);const t=()=>{const r=this.gos.get("ensureDomOrder"),i=Dr(this.gos,"print");this.comp.setDomOrder(r||i)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const t=r=>{e.dragging&&r.cancelable&&r.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),r=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,r,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 En(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=zs(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return ia(this.eViewport)}getViewportScrollLeft(){return En(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||vd(this.eViewport)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){Ui(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(null!=this.options.pinnedType)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){const t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||0===t.length)return void this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});const r=Dr(this.gos,"print"),s=this.gos.get("embedFullWidthRows")||r,n=t.filter(o=>{const a=o.isFullWidth();return this.options.fullWidth?!s&&a:s||!a});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:e})}},o0="ag-force-vertical-scroll",py=class extends Q{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,r,i,s,n,o){this.comp=e,this.eGridBody=t,this.eBodyViewport=r,this.eTop=i,this.eBottom=s,this.eStickyTop=n,this.eStickyBottom=o,this.eCenterColsViewport=r.querySelector(`.${i0("center")}`),this.eFullWidthContainer=r.querySelector(`.${sc("fullWidth")}`),this.eStickyTopFullWidthContainer=n.querySelector(`.${sc("stickyTopFullWidth")}`),this.eStickyBottomFullWidthContainer=o.querySelector(`.${sc("stickyBottomFullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",a=>this.setCellTextSelection(a.currentValue)),this.createManagedBean(new vu(this.comp)),this.scrollFeature=this.createManagedBean(new zb(r)),this.beans.rowDragSvc?.setupRowDrag(r,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([i,r,s,n,o]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(i),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this),r=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:r,rowResizeEnded:r}),this.addManagedPropertyListener("treeData",t)}toggleRowResizeStyles(e){this.eBodyViewport.classList.toggle("ag-prevent-animation","rowResizeStarted"===e.type)}onGridColumnsChanged(){const e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){const{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();const s=`calc(100% + ${(t&&e.getScrollbarWidth()||0)+(Cp()?16:0)}px)`;ws(this.beans,()=>this.comp.setBodyViewportWidth(s)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t}=this;let r=this.gos.get("treeData");if(!r){const i=t.isPivotMode();r=(e?e.columns.length:0)>=(i?2:1)}this.comp.setGridRootRole(r?"treegrid":"grid")}addFocusListeners(e){for(const t of e)this.addManagedElementListeners(t,{focusin:r=>{const{target:i}=r,s=Or(i,"ag-root",t);t.classList.toggle("ag-has-focus",!s)},focusout:r=>{const{target:i,relatedTarget:s}=r,n=t.contains(s),o=Or(s,"ag-root",t);Or(i,"ag-root",t)||(!n||o)&&t.classList.remove("ag-has-focus")}})}setColumnMovingCss(e){this.comp.setColumnMovingCss("ag-column-moving",e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss("ag-selectable",e)}updateScrollingClasses(){const{eGridBody:{classList:e},scrollVisibleSvc:t}=this;e.toggle("ag-body-vertical-content-no-gap",!t.verticalScrollGap),e.toggle("ag-body-horizontal-content-no-gap",!t.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){this.beans.editSvc?.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){const e=(this.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.filterManager?.getHeaderRowCount()??0),{rowModel:t}=this.beans,r=t.isLastRowIndexKnown()?t.getRowCount():-1;this.comp.setRowCount(-1===r?-1:e+r)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){this.comp.setPinnedTopBottomOverflowY(e?"scroll":"hidden")}isVerticalScrollShowing(){const e=this.gos.get("alwaysShowVerticalScroll"),t=e?o0:null,r=Dr(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||r&&ag(this.eBodyViewport)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let r=t.sizesMeasured;const i=()=>{const s=r&&vo(this.gos)&&!e.stretching;this.comp.setRowAnimationCssOnBodyViewport(s?"ag-row-animation":"ag-row-no-animation",s)};i(),this.addManagedEventListeners({heightScaleChanged:i}),this.addManagedPropertyListener("animateRows",i),this.addManagedEventListeners({gridStylesChanged:()=>{!r&&t.sizesMeasured&&(r=!0,i())}})}addBodyViewportListener(){const{eBodyViewport:e,eStickyTop:t,eStickyBottom:r,eTop:i,eBottom:s,beans:{popupSvc:n,touchSvc:o}}=this,a=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:a}),o?.mockBodyContextMenu(this,a),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,n)});const l=this.onStickyWheel.bind(this);for(const d of[t,r,i,s])this.addManagedElementListeners(d,{wheel:l});const c=this.onHorizontalWheel.bind(this);for(const d of["left","right","topLeft","topRight","bottomLeft","bottomRight"])this.addManagedElementListeners(this.ctrlsSvc.get(d).eContainer,{wheel:c});this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:r,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(r))&&ca(this.beans,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onHorizontalWheel(e){const{deltaX:t,deltaY:r,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(r))&&this.scrollGridBodyToMatchEvent(e)}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:r}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||r})}onBodyViewportContextMenu(e,t,r){if(!e&&!r)return;this.gos.get("preventDefaultOnContextMenu")&&(e||r).preventDefault();const{target:i}=e||t;(i===this.eBodyViewport||i===this.ctrlsSvc.get("center").eViewport)&&this.beans.contextMenuSvc?.showContextMenu({mouseEvent:e,touchEvent:r,value:null,anchorToElement:this.eGridBody,source:"ui"})}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e?.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){const{pinnedRowModel:e,beans:{environment:t}}=this,r=e?.getPinnedTopTotalHeight(),i=e?.getPinnedBottomTotalHeight(),o=t.getPinnedRowBorderWidth()-t.getRowBorderWidth(),a=r?o+r:0,l=i?o+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){const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}else this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%")}setStickyTopOffsetTop(){const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(this.filterManager?.getHeaderHeight()??0),r=this.pinnedRowModel?.getPinnedTopTotalHeight()??0;let i=0;t>0&&(i+=t),r>0&&(i+=r),i>0&&(i+=1),this.comp.setStickyTopTop(`${i}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:r}=this,i=e?.getPinnedBottomTotalHeight()??0,n=t.horizontalScrollShowing&&t.getScrollbarWidth()||0;r.setStickyBottomBottom(`${i+n}px`)}};function a0(e,t){const r=Dr(e.gos,"normal");let s,n;null!=t.clientX||null!=t.clientY?(s=t.clientX,n=t.clientY):(s=t.x,n=t.y);const{pageFirstPixel:o}=e.pageBounds.getCurrentPagePixelRange();if(n+=o,r){const a=e.ctrlsSvc.getScrollFeature(),l=a.getVScrollPosition();s+=a.getHScrollPosition().left,n+=l.top}return{x:s,y:n}}var l0=class extends ft{constructor(e,t){super(),this.direction=t,this.eViewport=ge,this.eContainer=ge,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",mp()||Pn())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.invisibleScrollbar=Cp(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.toggleCss("ag-scrollbar-active",!0),r=()=>this.toggleCss("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:r,touchend:r})}onScrollVisibilityChanged(){void 0===this.invisibleScrollbar&&this.initialiseInvisibleScrollbar(),ws(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.toggleCss("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.toggleCss("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;!function yx(e,t,r,i=100){const s=Date.now();let n=null,o=!1;const a=()=>{null!=n&&(window.clearInterval(n),n=null)};e.addDestroyFunc(a);const l=()=>{const c=Date.now()-s>i;(t()||c)&&(r(),o=!0,a())};l(),o||(n=window.setInterval(l,10))}(this,()=>Ji(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},vy={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"}]},wy={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:class extends l0{constructor(){super(vy,"horizontal"),this.eLeftSpacer=ge,this.eRightSpacer=ge,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 xu(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){if(!this.invisibleScrollbar)return;const e=this.beans.pinnedRowModel?.getPinnedBottomTotalHeight()??0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleSvc.verticalScrollShowing;let t=this.visibleCols.getDisplayedColumnsRightWidth();const r=!this.enableRtl&&e,i=this.scrollVisibleSvc.getScrollbarWidth();r&&(t+=i),Zi(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=i);let s=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(s+=i),Zi(this.eLeftSpacer,s),this.eLeftSpacer.classList.toggle("ag-scroller-corner",s<=i)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,r=this.gos.get("suppressHorizontalScroll"),i=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,n=r?0:0===i&&t?16:i,o=()=>{this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",t),oa(this.getGui(),n),oa(this.eViewport,n),oa(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(o,100):o()}getScrollPosition(){return En(this.eViewport,this.enableRtl)}setScrollPosition(e){Ji(this.eViewport)||this.attemptSettingScrollPosition(e),Ui(this.eViewport,e,this.enableRtl)}}},xy={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"}]}]},by={selector:"AG-FAKE-VERTICAL-SCROLL",component:class extends l0{constructor(){super(xy,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new r0(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,r=this.invisibleScrollbar,i=t&&e.getScrollbarWidth()||0,s=0===i&&r?16:i;this.toggleCss("ag-scrollbar-invisible",r),Zi(this.getGui(),s),Zi(this.eViewport,s),Zi(this.eContainer,s),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const r=e.getGridBodyCtrl().eBodyViewport,i=this.getScrollPosition(),s=r.scrollTop;i!=s&&this.setScrollPosition(s,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!Ji(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}}};function c0(e,t,r,i){return pt(e)?[]:function u0(e,t,r,i,s){if(pt(e))return[];let n;if("function"==typeof e){const o=function Fy(e,t,r,i){return _e(t,{colDef:e,column:r,columnGroup:i})}(t,r,i,s);n=e(o)}else n=e;return"string"==typeof n?[n]:Array.isArray(n)?[...n]:[]}(e.headerClass,e,t,r,i)}function d0(e,t,r){e.toggleCss("ag-column-first",r.isColAtEdge(t,"first")),e.toggleCss("ag-column-last",r.isColAtEdge(t,"last"))}function On(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.isExclusive()}function nc(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.isExclusive()}function Po(e,t,r=!1){const i=e.ctrlsSvc.get("gridCtrl");return!(r||!i.focusNextInnerContainer(t))||((r||!t&&!i.isDetailGrid())&&i.forceFocusOutOfContainer(t),!1)}function os(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function Ru(e){const t=[],r=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const i of r){if(!i)continue;const s=i.getGroupRowCount()||0;for(let n=0;n<s;n++){const o=i.getGroupRowCtrlAtIndex(n),a=t[n];if(o){const l=Ty(e,o);(null==a||l>a)&&(t[n]=l)}}}return t}function Ty(e,t){let i=e.colModel.isPivotMode()?function Dy(e){return e.gos.get("pivotGroupHeaderHeight")??f0(e)}(e):f0(e);const s=t.getHeaderCellCtrls();for(const n of s){const{column:o}=n,a=o.getAutoHeaderHeight();null!=a&&a>i&&o.isAutoHeaderHeight()&&(i=a)}return i}function ku(e){let r=e.colModel.isPivotMode()?function Py(e){return e.gos.get("pivotHeaderHeight")??ya(e)}(e):ya(e);return e.colModel.forAllCols(i=>{const s=i.getAutoHeaderHeight();null!=s&&s>r&&i.isAutoHeaderHeight()&&(r=s)}),r}function ya(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function h0(e){return e.gos.get("floatingFiltersHeight")??ya(e)}function f0(e){return e.gos.get("groupHeaderHeight")??ya(e)}var My=class extends Q{setComp(e,t,r){this.comp=e,this.eGui=t;const{beans:i}=this,{headerNavigation:s,touchSvc:n,ctrlsSvc:o}=i;s&&this.createManagedBean(new To(r,{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?.mockHeaderContextMenu(this,a),o.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:()=>ws(this.beans,()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){const{beans:e}=this;let t=0;const r=Ru(e).reduce((n,o)=>n+o,0),i=ku(e);e.filterManager?.hasFloatingFilters()&&(t+=h0(e)),t+=r,t+=i,this.headerHeight!==t&&(this.headerHeight=t,this.comp.setHeightAndMinHeight(`${t+1}px`),this.eventSvc.dispatchEvent({type:"headerHeightChanged"}))}onPivotModeChanged(e){const t=e.colModel.isPivotMode();this.comp.toggleCss("ag-pivot-on",t),this.comp.toggleCss("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const r=e.visibleCols.allCols.some(i=>i.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",r)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),r=e.shiftKey,i=r!==t?"LEFT":"RIGHT",{beans:s}=this,{headerNavigation:n,focusSvc:o}=s;(n.navigateHorizontally(i,!0,e)||!r&&o.focusOverlay(!1)||Po(s,r,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:r}=this.beans;switch(e.key){case U_LEFT:t="LEFT";case U_RIGHT:le(t)||(t="RIGHT"),r.navigateHorizontally(t,!1,e)&&e.preventDefault();break;case U_UP:t="UP";case U_DOWN:le(t)||(t="DOWN"),r.navigateVertically(t,e)&&e.preventDefault();break;default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:r,beans:i}=this;!t&&r.contains(mt(i))||r.contains(t)||(i.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,r){const{menuSvc:i,ctrlsSvc:s}=this.beans;if(!e&&!r||!i?.isHeaderContextMenuEnabled())return;const{target:n}=e??t;(n===this.eGui||n===s.getHeaderRowContainerCtrl()?.eViewport)&&i.showHeaderContextMenu(void 0,e,r)}},Tu=class extends ft{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},Iy={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"}]},_y=class extends Tu{constructor(e){super(Iy,e),this.eResize=ge,this.eHeaderCompWrapper=ge,this.headerCompVersion=0}postConstruct(){const e=this.getGui(),t=()=>{const i=this.ctrl.getSelectAllGui();i&&(this.eResize.insertAdjacentElement("afterend",i),this.addDestroyFunc(()=>i.remove()))};this.ctrl.setComp({setWidth:i=>e.style.width=i,toggleCss:(i,s)=>this.toggleCss(i,s),setUserStyles:i=>sa(e,i),setAriaSort:i=>i?function ii(e,t){Xr(e,"sort",t)}(e,i):function vt(e){co(e,"sort")}(e),setUserCompDetails:i=>this.setUserCompDetails(i),getUserCompInstance:()=>this.headerComp,refreshSelectAllGui:t,removeSelectAllGui:()=>this.ctrl.getSelectAllGui()?.remove()},this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0),t()}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.headerCompGui?.remove(),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;const t=this.headerCompVersion;e.newAgStackInstance().then(r=>this.afterCompCreated(t,r))}afterCompCreated(e,t){e==this.headerCompVersion&&this.isAlive()?(this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())):this.destroyBean(t)}},Ly={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"}]},Oy=class extends Tu{constructor(e){super(Ly,e),this.eResize=ge,this.eHeaderCompWrapper=ge}postConstruct(){const e=this.getGui();this.ctrl.setComp({toggleCss:(i,s)=>this.toggleCss(i,s),setUserStyles:i=>sa(e,i),setHeaderWrapperHidden:i=>{i?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:i=>{null!=i?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",null!=i)},setResizableDisplayed:i=>at(this.eResize,i),setWidth:i=>e.style.width=i,setAriaExpanded:i=>((i,s)=>null!=s?e.setAttribute(i,s):e.removeAttribute(i))("aria-expanded",i),setUserCompDetails:i=>this.setUserCompDetails(i),getUserCompInstance:()=>this.headerGroupComp},e,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(e){e.newAgStackInstance().then(t=>this.afterHeaderCompCreated(t))}afterHeaderCompCreated(e){const t=()=>this.destroyBean(e);if(!this.isAlive())return void t();const r=this.getGui(),i=e.getGui();this.eHeaderCompWrapper.appendChild(i),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(r)}},By={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"}}]}]},Ny=class extends Tu{constructor(e){super(By,e),this.eFloatingFilterBody=ge,this.eButtonWrapper=ge,this.eButtonShowMainFilter=ge}postConstruct(){const e=this.getGui();this.ctrl.setComp({toggleCss:(r,i)=>this.toggleCss(r,i),setUserStyles:r=>sa(e,r),addOrRemoveBodyCssClass:(r,i)=>this.eFloatingFilterBody.classList.toggle(r,i),setButtonWrapperDisplayed:r=>at(this.eButtonWrapper,r),setCompDetails:r=>this.setCompDetails(r),getFloatingFilterComp:()=>this.compPromise,setWidth:r=>e.style.width=r,setMenuIcon:r=>this.eButtonShowMainFilter.appendChild(r)},e,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(e){if(!e)return this.destroyFloatingFilterComp(),void(this.compPromise=null);this.compPromise=e.newAgStackInstance(),this.compPromise.then(t=>this.afterCompCreated(t))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.floatingFilterComp.getGui().remove(),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(e){if(e){if(!this.isAlive())return void this.destroyBean(e);this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()}}},Hy=class extends ft{constructor(e){super({tag:"div",cls:e.headerRowClass,role:"row"}),this.ctrl=e,this.headerComps={}}postConstruct(){this.getGui().setAttribute("tabindex",String(this.gos.get("tabIndex"))),dt(this.getGui(),this.ctrl.getAriaRowIndex()),this.ctrl.setComp({setHeight:r=>this.getGui().style.height=r,setTop:r=>this.getGui().style.top=r,setHeaderCtrls:(r,i)=>this.setHeaderCtrls(r,i),setWidth:r=>this.getGui().style.width=r,setRowIndex:r=>dt(this.getGui(),r)},void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;const r=this.headerComps;this.headerComps={};for(const i of e){const s=i.instanceId;let n=r[s];delete r[s],null==n&&(n=this.createHeaderComp(i),this.getGui().appendChild(n.getGui())),this.headerComps[s]=n}if(Object.values(r).forEach(i=>{i.getGui().remove(),this.destroyBean(i)}),t){const i=Object.values(this.headerComps);i.sort((n,o)=>n.getCtrl().column.getLeft()-o.getCtrl().column.getLeft());const s=i.map(n=>n.getGui());og(this.getGui(),s)}}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new Oy(e);break;case"filter":t=new Ny(e);break;default:t=new _y(e)}return this.createBean(t),t.setParentComponent(this),t}},Pu=class extends Q{constructor(e,t,r,i){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=i,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=r}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){const{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?kt(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,r=e.get("suppressColumnMoveAnimation"),i=le(this.columnOrGroup.getOldLeft());t?.isActive()&&i&&!r?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),r=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=r,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===r&&this.setLeft(r)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){const{gos:r,visibleCols:i}=this.beans;if(!Dr(r,"print")||"left"===e.getPinned())return t;const n=i.getColsLeftWidth();return"right"===e.getPinned()?n+i.bodyWidth+t:n+t}setLeft(e){if(le(e)&&(this.eCell.style.left=`${e}px`),sr(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&function pr(e,t){Xr(e,"colspan",t)}(this.ariaEl,t.length)}}},Gy=0,g0="headerCtrl",Du=class extends Q{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.reAttemptToFocus=!1,this.instanceId=e.getUniqueId()+"-"+Gy++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}setComp(e,t,r,i,s){t.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(e,t,r,i,s),this.reAttemptToFocus&&(this.reAttemptToFocus=!1,this.focus(this.lastFocusEvent??void 0))}shouldStopEventPropagation(e){const{headerRowIndex:t,column:r}=this.beans.focusSvc.focusedHeader,i=r.getDefinition(),s=i?.suppressHeaderKeyboardEvent;return!!le(s)&&!!s(_e(this.gos,{colDef:i,column:r,headerRowIndex:t,event:e}))}getWrapperHasFocus(){return mt(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 r;r="function"==typeof t?t(this.getHeaderClassParams()):t,r&&this.comp.setUserStyles(r)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:r,compBean:i}=e,{beans:s}=this,n=u=>{if(!this.isAlive()||!i.isAlive())return;const{paddingTop:h,paddingBottom:f,borderBottomWidth:p,borderTopWidth:g}=Gt(this.eGui),w=t.offsetHeight+(h+f+p+g);!(u<5)||It(s)?.contains(t)&&0!=w?this.setColHeaderHeight(this.column,w):Ed(()=>n(u+1),"raf",s)};let a,o=!1;const l=()=>{const u=this.column.isAutoHeaderHeight();u&&!o&&c(),!u&&o&&d()},c=()=>{o=!0,this.comp.toggleCss("ag-header-cell-auto-height",!0),n(0),a=zs(this.beans,t,()=>n(0))},d=()=>{o=!1,a&&a(),this.comp.toggleCss("ag-header-cell-auto-height",!1),a=void 0};l(),i.addDestroyFunc(()=>d()),i.addManagedListeners(this.column,{widthChanged:()=>o&&n(0)}),i.addManagedEventListeners({sortChanged:()=>{o&&window.setTimeout(()=>n(0))}}),r&&r(l)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:r,eGui:i}=this;!e||!t||!i||(d0(e,t,r.visibleCols),Lr(i,r.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=On(this.beans);this.eGui&&hi(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){const t=mt(this.beans),r=e.key===U_LEFT||e.key===U_RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey||((this.isResizing||r)&&(e.preventDefault(),e.stopImmediatePropagation()),!r))return;const s=e.key===U_LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const n=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(n,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(s)}moveHeader(e){this.beans.colMoves?.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){const t=this.getResizeDiff(e),{pinnedCols:r}=this.beans;return r?r.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){const{gos:t,column:r}=this;let i=e.key===U_LEFT!==t.get("enableRtl");const s=r.getPinned(),n=t.get("enableRtl");return s&&n!==("right"===s)&&(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(()=>{this.resizeFeature?.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case"PageDown":case"PageUp":case"Home":case"End":t&&e.preventDefault()}}addDomData(e){const t=g0,{eGui:r,gos:i}=this;Tn(i,r,t,this),e.addDestroyFunc(()=>Tn(i,r,t,null))}focus(e){if(!this.isAlive())return!1;const{eGui:t}=this;return t?(t.focus(),this.lastFocusEvent=e||null):this.reAttemptToFocus=!0,!0}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop?.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,r){const i=e??t,{menuSvc:s,gos:n}=this.beans;n.get("preventDefaultOnContextMenu")&&i.preventDefault(),s?.isHeaderContextMenuEnabled(r)&&s.showHeaderContextMenu(r,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",r)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:r}=this;r.dispatchEvent(e.isColumn?{type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}:{type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}},Vy=class extends Du{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}wireComp(e,t,r,i,s){this.comp=e;const{rowCtrl:n,column:o,beans:a}=this,{colResize:l,context:c,colHover:d,rangeSvc:u}=a,h=Ca(this,c,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,o,r,e,this)):at(r,!1),d?.createHoverFeature(h,[o],t),u?.createRangeHighlightFeature(h,o,e),h.createManagedBean(new Pu(o,t,a)),h.createManagedBean(new To(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(o,{colDefChanged:()=>this.refresh()}),h.addManagedListeners(o,{headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const f=()=>this.checkDisplayName();h.addManagedEventListeners({columnValueChanged:f,columnRowGroupChanged:f,columnPivotChanged:f,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),h.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){this.beans.colResize?.resizeHeader(this.column,e,t)}getHeaderClassParams(){const{column:e,beans:t}=this;return _e(t.gos,{colDef:e.colDef,column:e,floatingFilter:!1})}setupUserComp(){const e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return function VS(e,t,r){return e.getCompDetails(t,yS,"agColumnHeader",r)}(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:r,gos:i}=this.beans;return _e(i,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!e?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!r&&(!this.openFilterEnabled||fi(this.gos)),showColumnMenu:(n,o)=>{e?.showColumnMenu({column:this.column,buttonElement:n,positionBy:"button",onClosedCallback:o})},showColumnMenuAfterMouseClick:(n,o)=>{e?.showColumnMenu({column:this.column,mouseEvent:n,positionBy:"mouse",onClosedCallback:o})},showFilter:n=>{e?.showFilterMenu({column:this.column,buttonElement:n,containerType:"columnFilter",positionBy:"button"})},progressSort:n=>{t?.progressSort(this.column,!!n,"uiColumnSorted")},setSort:(n,o)=>{t?.setSortForColumn(this.column,n,!!o,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(n,o)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,o)}})}setupSelectAll(e){const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createOptionalManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature?.setComp(this),e.addManagedPropertyListener("rowSelection",()=>{const r=t.createSelectAllFeature(this.column);r&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(r),this.selectAllFeature?.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!r&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))}))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e)," "===e.key&&this.selectAllFeature?.onSpaceKeyDown(e),"Enter"===e.key&&this.onEnterKeyDown(e),e.key===U_DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){e.ctrlKey||e.metaKey?this.showMenuOnKeyPress(e,!0):this.sortable&&this.beans.sortSvc?.progressSort(this.column,e.shiftKey,"uiColumnSorted")}showMenuOnKeyPress(e,t){const r=this.comp.getUserCompInstance();p0(r)&&r.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),function u2(){return Zd}()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){const e=()=>{const r=c0(this.column.getColDef(),this.gos,this.column,null),i=this.userHeaderClasses;this.userHeaderClasses=new Set(r);for(const s of r)i.has(s)?i.delete(s):this.comp.toggleCss(s,!0);for(const s of i)this.comp.toggleCss(s,!1)};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){this.dragSourceElement=e,this.removeDragSource(),e&&this.draggable&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!e?.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=!!e?.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria();for(const e of Object.values(this.refreshFunctions))e()}refreshHeaderComp(){const e=this.lookupUserCompDetails();e&&(null!=this.comp.getUserCompInstance()&&this.userCompDetails.componentClass==e.componentClass&&this.attemptHeaderCompRefresh(e.params)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e))}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!(!t||!t.refresh)&&t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!(this.gos.get("suppressMovableColumns")||e.suppressMovable||e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){const t=()=>{const r=this.column.getActualWidth();this.comp.setWidth(`${r}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.toggleCss("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{this.comp?.toggleCss("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.toggleCss("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const t=()=>{const r=this.column.isFilterActive();this.comp.toggleCss("ag-header-cell-filtered",r),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(),r=1===e;this.comp.toggleCss("ag-header-highlight-before",0===e),this.comp.toggleCss("ag-header-highlight-after",r)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:r,beans:i}=this,s=Ru(this.beans),n=0===s.reduce((h,f)=>h+f,0);if(r.toggleCss("ag-header-parent-hidden",n),!t.isSpanHeaderHeight())return e.style.removeProperty("top"),e.style.removeProperty("height"),r.toggleCss("ag-header-span-height",!1),void r.toggleCss("ag-header-span-total",!1);const{numberOfParents:o,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();r.toggleCss("ag-header-span-height",o>0);const l=ku(i);if(0===o)return r.toggleCss("ag-header-span-total",!1),e.style.setProperty("top","0px"),void e.style.setProperty("height",`${l}px`);r.toggleCss("ag-header-span-total",a);const c=(this.column.getFirstRealParent()?.getLevel()??-1)+1,d=s.length-c;let u=0;for(let h=0;h<d;h++)u+=s[s.length-1-h];e.style.setProperty("top",-u+"px"),e.style.setProperty("height",`${l+u}px`)}refreshAriaSort(){if(this.sortable){const e=this.getLocaleTextFunc(),t=this.beans.sortSvc?.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(function uo(e){let t;return t="asc"===e?"ascending":"desc"===e?"descending":"mixed"===e?"other":"none",t}(t)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}refreshAriaMenu(){if(this.menuEnabled){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!fi(this.gos)){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){const e=this.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}setAriaDescriptionProperty(e,t){null!=t?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}announceAriaDescription(){if(!this.eGui.contains(mt(this.beans)))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort((t,r)=>"filter"===t?-1:r.charCodeAt(0)-t.charCodeAt(0)).map(t=>this.ariaDescriptionProperties.get(t)).join(". ");this.beans.ariaAnnounce?.announceValue(e,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=s=>this.handleMouseOverChange("mouseenter"===s.type);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},contextmenu:s=>this.handleContextMenuMouseEvent(s,void 0,this.column)})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.toggleCss("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return p0(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function p0(e){return"function"==typeof e?.getAnchorElementForMenu&&"function"==typeof e.onMenuKeyboardShortcut}var zy=0,Au=class extends Q{constructor(e,t,r){super(),this.rowIndex=e,this.pinned=t,this.type=r,this.instanceId=zy++,this.comp=null,this.allCtrls=[];let i="ag-header-row-column";"group"===r?i="ag-header-row-group":"filter"===r&&(i="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${i}`}setRowIndex(e){this.rowIndex=e,this.comp?.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=Dr(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return!!this.comp&&this.allCtrls.every(e=>null!=e.eGui)}setComp(e,t,r=!0){this.comp=e,t=Ca(this,this.beans.context,t),r&&(this.setRowIndex(this.rowIndex),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this),r=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:r,virtualColumnsChanged:i=>this.onVirtualColumnsChanged(i.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,gridStylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",r),e.addManagedPropertyListener("ensureDomOrder",i=>this.isEnsureDomOrder=i.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=Dr(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleCols:e}=this.beans;return this.isPrintLayout?null!=this.pinned?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){if(!this.comp)return;const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let e=0;const t=Ru(this.beans);for(let s=0;s<t.length;s++){if(s===this.rowIndex&&"group"===this.type)return{topOffset:e,rowHeight:t[s]};e+=t[s]}const r=ku(this.beans);return"column"===this.type?{topOffset:e,rowHeight:r}:(e+=r,{topOffset:e,rowHeight:h0(this.beans)})}onVirtualColumnsChanged(e=!1){if(!this.comp)return;const t=this.getUpdatedHeaderCtrls();this.comp.setHeaderCtrls(t,this.isEnsureDomOrder||this.isPrintLayout,e)}getUpdatedHeaderCtrls(){const e=this.ctrlsById;this.ctrlsById=new Map;const t=this.getColumnsInViewport();for(const i of t)this.recycleAndCreateHeaderCtrls(i,this.ctrlsById,e);const r=i=>{const{focusSvc:s,visibleCols:n}=this.beans;return!!s.isHeaderWrapperFocused(i)&&n.isVisible(i.column)};if(e)for(const[i,s]of e)r(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,r){if(e.isEmptyGroup())return;const i=e.getUniqueId();let s;if(r&&(s=r.get(i),r.delete(i)),s&&s.column!=e&&(this.destroyBean(s),s=void 0),null==s)switch(this.type){case"filter":s=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break;case"group":s=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:s=this.createBean(new Vy(e,this))}t.set(i,s)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];const e=[];for(const t of["left",null,"right"])e.push(...this.getComponentsToRender(t));return e}getComponentsToRender(e=this.pinned){return"group"===this.type?this.beans.colViewport.getHeadersToRender(e,this.rowIndex):this.beans.colViewport.getColumnHeadersToRender(e)}focusHeader(e,t){const r=this.allCtrls.find(s=>s.column==e);return!!r&&r.focus(t)}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},Wy=class extends Q{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:r,ctrlsSvc:i,colModel:s,colMoves:n}=this.beans;this.setupCenterWidth(),r?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(n,this.eViewport);const o=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:o,advancedFilterEnabledChanged:o}),i.register(`${"string"==typeof this.pinned?this.pinned:"center"}Header`,this),s.ready&&this.refresh()}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){const{focusSvc:t,filterManager:r,visibleCols:i}=this.beans;let s=0;const n=t.getFocusHeaderToUseAfterRefresh(),c=this.getAllCtrls();(()=>{const u=i.headerGroupRowCount;s=u,e||(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls));const h=this.groupsRowCtrls.length;if(h!==u){if(h>u){for(let f=u;f<h;f++)this.destroyBean(this.groupsRowCtrls[f]);return void(this.groupsRowCtrls.length=u)}for(let f=h;f<u;f++){const p=this.createBean(new Au(f,this.pinned,"group"));this.groupsRowCtrls.push(p)}}})(),(()=>{const u=s++;this.hidden?this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl):null!=this.columnsRowCtrl&&e?this.columnsRowCtrl.rowIndex!==u&&this.columnsRowCtrl.setRowIndex(u):(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new Au(u,this.pinned,"column")))})(),(()=>{this.includeFloatingFilter=!!r?.hasFloatingFilters()&&!this.hidden;const u=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter)return void u();e||u();const h=s++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==h&&this.filtersRowCtrl.setRowIndex(h):this.filtersRowCtrl=this.createBean(new Au(h,this.pinned,"filter"))})();const d=this.getAllCtrls();this.comp.setCtrls(d),this.restoreFocusOnHeader(t,n),c.length!==d.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){const t=r=>r?.getHeaderCellCtrls().find(i=>i.column===e);if(js(e))return t(this.columnsRowCtrl);if(0!==this.groupsRowCtrls.length)for(let r=0;r<this.groupsRowCtrls.length;r++){const i=t(this.groupsRowCtrls[r]);if(i)return i}}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,r){const s=this.getAllCtrls()[e];return!!s&&s.focusHeader(t,r)}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 r=e?.createBodyDropTarget(this.pinned,t);r&&this.createManagedBean(r)}restoreFocusOnHeader(e,t){if(!t)return;const{column:r}=t;r.getPinned()==this.pinned&&e.focusHeaderPosition({headerPosition:t,scroll:!1})}setupCenterWidth(){null==this.pinned&&this.createManagedBean(new xu(e=>this.comp.setCenterWidth(`${e}px`),!0))}};function m0(e,t,r){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",r))}function v0(e){const{enterpriseMenuFactory:t,filterMenuFactory:r,gos:i}=e;return t&&fi(i)?t:r}var oc=class extends Hd{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange(()=>e.validate())}destroy(){this.errorMessages=null}},C0=class extends ft{constructor(){super()}},$y={tag:"span",cls:"ag-overlay-loading-center"},Ky={tag:"span",cls:"ag-overlay-no-rows-center"};function Ti(e,t,r){let i=null;"smallDown"===e?ne(262):"smallLeft"===e?ne(263):"smallRight"===e&&ne(264);const s=r?.getColDef().icons;if(s&&(i=s[e]),t.gos&&!i){const n=t.gos.get("icons");n&&(i=n[e])}if(i){let n;if("function"==typeof i)n=i();else{if("string"!=typeof i)return void ne(38,{iconName:e});n=i}return"string"==typeof n?md(n):wd(n)?n:void ne(133,{iconName:e})}{const n=t.registry.getIcon(e);return n||t.validation?.validateIcon(e),nr({tag:"span",cls:`ag-icon ag-icon-${n??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var Qy={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"}]}]},e3={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},w0=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:r,order:i}=this;t.has(e)||(t.add(e),r.add(e),i.push(e),this.sort())}delete(e){this.all.delete(e),this.visible.delete(e),this.queued.delete(e.id),ki(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:r,queued:i}=this;e.clear(),i.clear(),t.clear(),r.length=0}sort(){const{sortSvc:e,rowNodeSorter:t,gos:r}=this.beans,i=e?.getSortOptions()??[],s=function s3(e){const t=e.findIndex(i3);if(t>-1)return e.splice(t,1)?.[0]}(this.order);if(this.order.sort((o,a)=>(o.pinnedSibling?.rowIndex??0)-(a.pinnedSibling?.rowIndex??0)),this.order=t?.doFullSort(this.order,i)??this.order,!s)return;const n=Og(r);"bottom"===n||"pinnedBottom"===n?this.order.push(s):this.order.unshift(s)}hide(e){const{all:t,visible:r}=this;t.forEach(i=>e(i)?r.delete(i):r.add(i)),this.order=Array.from(r),this.sort()}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function x0(e){if(-1===e.level)return!0;const t=e.parent;return!!t?.childrenAfterSort?.some(r=>r==e)&&x0(t)}function Mu(e,t){const{gos:r,rowModel:i,filterManager:s}=e;return mo(r)?!i.getRowNode(t.id):s?.isAnyFilterPresent()?!x0(t):!!r.get("pivotMode")&&!t.group}function i3(e){return!!e.pinnedSibling&&function r3(e){return!!e.footer&&-1===e.level}(e.pinnedSibling)}var S0=class extends Q{postConstruct(){const{gos:e,beans:t}=this;this.top=new w0(t,"top"),this.bottom=new w0(t,"bottom");const r=s=>Mu(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(o=>o.hide(r));const n=this.refreshRowPositions();(!s||n)&&this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(o3),this.refreshRowPositions()},rowNodeDataChanged:({node:s})=>{(e.get("isRowPinnable")?.(s)??1)||this.pinRow(s,null)},firstDataRendered:i}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(s=>s.hide(r)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:s})=>{this._grandTotalPinned="pinnedBottom"===s?"bottom":"pinnedTop"===s?"top":null}),this.addManagedPropertyListener("isRowPinned",i)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{const r=[];t.forEach(i=>r.push(i)),r.forEach(i=>this.pinRow(i,null)),t.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,r){if(e.footer&&e.level>-1)return;if(e.footer&&-1===e.level)return this._grandTotalPinned=t,void function l3({gos:e,rowModel:t}){rr(e)&&t.refreshModel({step:"map"})}(this.beans);const i=e.rowPinned??e.pinnedSibling?.rowPinned;if(null!=i&&null!=t&&t!=i){const a=e.rowPinned?e.pinnedSibling:e;return this.pinRow(e.rowPinned?e:e.pinnedSibling,null,r),void this.pinRow(a,t,r)}const n=r&&function a3(e,t,r){const{rowSpanSvc:i}=e,s=(r&&i?.isCellSpanning(r,t))??!1;if(r&&s)return i?.getCellSpan(r,t)?.spannedNodes}(this.beans,e,r);if(n)n.forEach(o=>this.pinRow(o,t));else if(null==t){const o=e.rowPinned?e:e.pinnedSibling,a=this.findPinnedRowNode(o);if(!a)return;a.delete(o);const l=o.pinnedSibling;Iu(o),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(l)}else{const o=b0(this.beans,e,t),a=this.getContainer(t);a.add(o),Mu(this.beans,e)&&a.hide(l=>Mu(this.beans,l.pinnedSibling)),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(e)}}isManual(){return!0}isEmpty(e){return 0===this.getContainer(e).size()}isRowsToRender(e){return!this.isEmpty(e)}ensureRowHeightsValid(){let e=!1,t=0;const r=i=>{if(i.rowHeightEstimated){const s=$s(this.beans,i);i.setRowTop(t),i.setRowHeight(s.height),t+=s.height,e=!0}};return this.bottom.forEach(r),t=0,this.top.forEach(r),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){return y0(this.top)}getPinnedBottomTotalHeight(){return y0(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 r=[];return this.forEachPinnedRow(t,i=>r.push(i.pinnedSibling.id)),r};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,r)=>{for(const i of e[r]){const s=this.beans.rowModel.getRowNode(i);s?this.pinRow(s,r):t.queue(i)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{const r=new Set;e.forEachQueued(i=>{const s=this.beans.rowModel.getRowNode(i);s&&r.add(s)});for(const i of r)e.unqueue(i.id),this.pinRow(i,t)})}pinGrandTotalRow(){const{gos:e,beans:t,_grandTotalPinned:r}=this,i=t.rowModel;if(!rr(e))return;const s=i.rootNode?.sibling;if(!s)return;const n=s.pinnedSibling,o=n&&this.findPinnedRowNode(n);if(r){if(o&&o.floating!==r&&(o.delete(n),Iu(n)),!o||o.floating!==r){const a=b0(t,s,r);this.getContainer(r).add(a)}}else{if(!o)return;o.delete(n),Iu(n)}}onGridStylesChanges(e){e.rowHeightChanged&&this.forContainers(t=>t.forEach(r=>r.setRowHeight(r.rowHeight,!0)))}getContainer(e){return"top"===e?this.top:this.bottom}findPinnedRowNode(e){return this.top.has(e)?this.top:this.bottom.has(e)?this.bottom:void 0}refreshRowPositions(e){const t=i=>function n3(e,t){let r=0,i=!1;return t.forEach((s,n)=>{if(i||(i=s.rowTop!==r),s.setRowTop(r),s.rowHeightEstimated||null==s.rowHeight){const o=$s(e,s).height;i||(i=s.rowHeight!==o),s.setRowHeight(o)}s.setRowIndex(n),r+=s.rowHeight}),i}(this.beans,i);if(e)return t(this.getContainer(e));let r=!1;return this.forContainers(i=>{const s=t(i);r||(r=s)}),r}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e?.dispatchRowEvent("rowPinned")}};function b0(e,t,r){if(t.pinnedSibling)return t.pinnedSibling;const i=((e,t)=>{const r=new Js(t);for(const i of Object.keys(e))yb.has(i)||(r[i]=e[i]);return r.oldRowTop=null,r})(t,e);return i.setRowTop(null),i.setRowIndex(null),i.rowPinned=r,i.id=`${"top"===r?"t-":"b-"}${r}-${t.id}`,i.pinnedSibling=t,t.pinnedSibling=i,i}function Iu(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 o3(e){const t=new Set;e.forEach(r=>{r.group&&t.add(r)}),t.forEach(r=>e.delete(r))}function y0(e){const t=e.size();if(0===t)return 0;const r=e.getByIndex(t-1);return void 0===r?0:r.rowTop+r.rowHeight}var E0=class extends Q{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){const e=this.gos;this.setPinnedRowData(e.get("pinnedTopRowData"),"top"),this.setPinnedRowData(e.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",t=>this.setPinnedRowData(t.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",t=>this.setPinnedRowData(t.currentValue,"bottom")),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this)})}reset(){}isEmpty(e){return 0===this.getCache(e).order.length}isRowsToRender(e){return!this.isEmpty(e)}isManual(){return!1}pinRow(e,t){}onGridStylesChanges(e){if(e.rowHeightChanged){const t=r=>{r.setRowHeight(r.rowHeight,!0)};Fa(this.pinnedBottomRows,t),Fa(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0;const r=i=>{if(i.rowHeightEstimated){const s=$s(this.beans,i);i.setRowTop(t),i.setRowHeight(s.height),t+=s.height,e=!0}};return Fa(this.pinnedBottomRows,r),t=0,Fa(this.pinnedTopRows,r),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){const r=this.getCache(t);if(void 0===e)return r.order.length=0,void(r.cache={});const i=Co(this.gos),s="top"===t?"t-":"b-",n=new Set(r.order),o=[],a=new Set;let l=0,c=-1;for(const d of e){const u=i?.({data:d,level:0,rowPinned:t})??s+this.nextId++;if(a.has(u)){ne(96,{id:u,data:d});continue}c++,a.add(u),o.push(u);const h=Ea(r,u);if(void 0!==h)h.data!==d&&h.updateData(d),l+=this.setRowTopAndRowIndex(h,l,c),n.delete(u);else{const f=new Js(this.beans);f.id=u,f.data=d,f.rowPinned=t,l+=this.setRowTopAndRowIndex(f,l,c),r.cache[u]=f,r.order.push(u)}}for(const d of n)Ea(r,d)?.clearRowTopAndRowIndex(),delete r.cache[d];r.order=o}setRowTopAndRowIndex(e,t,r){return e.setRowTop(t),e.setRowHeight($s(this.beans,e).height),e.setRowIndex(r),e.rowHeight}getPinnedTopTotalHeight(){return F0(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return F0(this.pinnedBottomRows)}getPinnedTopRowCount(){return Lu(this.pinnedTopRows)}getPinnedBottomRowCount(){return Lu(this.pinnedBottomRows)}getPinnedTopRow(e){return _u(this.pinnedTopRows,e)}getPinnedBottomRow(e){return _u(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return Ea(this.getCache(t),e)}forEachPinnedRow(e,t){return Fa(this.getCache(e),t)}getCache(e){return"top"===e?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function F0(e){const t=Lu(e);if(0===t)return 0;const r=_u(e,t-1);return void 0===r?0:r.rowTop+r.rowHeight}function Ea(e,t){return e.cache[t]}function _u(e,t){return Ea(e,e.order[t])}function Fa(e,t){e.order.forEach((r,i)=>{const s=Ea(e,r);s&&t(s,i)})}function Lu(e){return e.order.length}function Ra(e){return!(!e.rowPinned||!e.pinnedSibling)}function Pi(e,t,r,i){const s="top"===t;if(!r)return Pi(e,t,s?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),i);if(!i){const l=s?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return Pi(e,t,r,s?e.getPinnedTopRow(l-1):e.getPinnedBottomRow(l-1))}let n=!1,o=!1;const a=[];return e.forEachPinnedRow(t,l=>l!==r||n?n&&l===i?(o=!0,void a.push(l)):void(n&&!o&&a.push(l)):(n=!0,void a.push(l))),a}var u3={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},h3=class extends ft{constructor(){super(u3,[eu]),this.eCheckbox=ge}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:r}=this,i=t.isSelected(),s=Me(e,i),[n,o]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(n,o);r.setValue(i,!0),r.setInputAriaLabel(`${a} (${s})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:Ln,click:i=>{Ln(i),this.beans.selectionSvc?.handleSelectionEvent(i,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:s})=>{("object"==typeof i?Ad(i):void 0)!==("object"==typeof s?Ad(s):void 0)&&this.onSelectableChanged()}),Md(this.gos)||"function"==typeof this.getIsVisible()){const i=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i}),this.addManagedListeners(this.rowNode,{dataChanged:i,cellChanged:i}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:r,gos:i}=this,s=t.selectable,n=this.getIsVisible();let o;if("function"==typeof n){const u=r?.callbackParams;if(e){const h=e.createColumnFunctionCallbackParams(t);o=n({...u,...h})}else o=n({...u,node:t,data:t.data})}else o=n??!1;const a=s&&!o||!s&&o,l=s||o,c=i.get("rowSelection"),d=c&&"string"!=typeof c?!Ad(c):!!e?.getColDef().showDisabledCheckboxes;this.setVisible(l&&(!a||d)),this.setDisplayed(l&&(!a||d)),l&&this.eCheckbox.setDisabled(a),r?.removeHidden&&this.setDisplayed(l)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&"string"!=typeof t?wo(t):this.column?.getColDef()?.checkboxSelection}},f3=class{constructor(e,t){this.rowModel=e,this.pinnedRowModel=t,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(0===this.cachedRange.length){const e=this.getRoot(),t=this.getEnd();if(null==e||null==t)return this.cachedRange;this.cachedRange=this.getNodesInRange(e,t)??[]}return this.cachedRange}isInRange(e){return null!==this.rootId&&this.getRange().some(t=>t.id===e.id)}getRoot(e){return this.rootId?this.getRowNode(this.rootId):e?(this.setRoot(e),e):void 0}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(e){let t;const{rowModel:r,pinnedRowModel:i}=this;return t??(t=r.getRowNode(e)),i?.isManual()&&(t??(t=i.getPinnedRowById(e,"top")),t??(t=i.getPinnedRowById(e,"bottom"))),t}truncate(e){const t=this.getRange();if(0===t.length)return{keep:[],discard:[]};const r=t[0].id===this.rootId,i=t.findIndex(s=>s.id===e.id);if(i>-1){const s=t.slice(0,i),n=t.slice(i+1);return this.setEndRange(e),r?{keep:s,discard:n}:{keep:n,discard:s}}return{keep:t,discard:[]}}extend(e,t=!1){const r=this.getRoot();if(null==r){const s=this.getRange().slice();return t&&e.depthFirstSearch(n=>!n.group&&s.push(n)),s.push(e),this.setRoot(e),{keep:s,discard:[]}}const i=this.getNodesInRange(r,e);if(!i)return this.setRoot(e),{keep:[e],discard:[]};if(i.find(s=>s.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const s=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:s}}}getNodesInRange(e,t){const{pinnedRowModel:r,rowModel:i}=this;if(!r?.isManual())return i.getNodesInRangeForSelection(e,t);if("top"===e.rowPinned&&!t.rowPinned)return Pi(r,"top",e,void 0).concat(i.getNodesInRangeForSelection(i.getRow(0),t)??[]);if("bottom"===e.rowPinned&&!t.rowPinned){const s=Pi(r,"bottom",void 0,e),n=i.getRowCount(),o=i.getRow(n-1);return(i.getNodesInRangeForSelection(t,o)??[]).concat(s)}if(!e.rowPinned&&!t.rowPinned)return i.getNodesInRangeForSelection(e,t);if("top"===e.rowPinned&&"top"===t.rowPinned)return Pi(r,"top",e,t);if("bottom"===e.rowPinned&&"top"===t.rowPinned){const s=Pi(r,"top",t,void 0),n=Pi(r,"bottom",void 0,e),o=i.getRow(0),a=i.getRow(i.getRowCount()-1);return s.concat(i.getNodesInRangeForSelection(o,a)??[]).concat(n)}if(!e.rowPinned&&"top"===t.rowPinned)return Pi(r,"top",t,void 0).concat(i.getNodesInRangeForSelection(i.getRow(0),e)??[]);if("top"===e.rowPinned&&"bottom"===t.rowPinned){const s=Pi(r,"top",e,void 0),n=Pi(r,"bottom",void 0,t),o=i.getRow(0),a=i.getRow(i.getRowCount()-1);return s.concat(i.getNodesInRangeForSelection(o,a)??[]).concat(n)}if("bottom"===e.rowPinned&&"bottom"===t.rowPinned)return Pi(r,"bottom",e,t);if(!e.rowPinned&&"bottom"===t.rowPinned){const s=Pi(r,"bottom",void 0,t),n=i.getRow(i.getRowCount());return(i.getNodesInRangeForSelection(e,n)??[]).concat(s)}return null}},g3=class extends Q{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(mt(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new Wl);this.cbSelectAll=t,t.addCss("ag-header-select-all"),Qi(t.getGui(),"presentation"),this.showOrHideSelectAll();const r=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:r,paginationChanged:r,modelUpdated:r}),this.addManagedPropertyListener("rowSelection",({currentValue:i,previousValue:s})=>{const n=o=>"string"!=typeof o&&o&&"singleRow"!==o.mode?o.selectAll:void 0;n(i)!==n(s)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll("uiColumnMoved"===e.source)}showOrHideSelectAll(e=!1){const t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,r=this.cbSelectAll,i=t.getSelectAllState(e);r.setValue(i);const s=t.hasNodesToSelect(e);r.setDisabled(!s),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:r,cbSelectAll:i,cbSelectAllVisible:s}=this,o=Me(t,i.getValue()),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");r.setAriaDescriptionProperty("selectAll",s?`${a} (${o})`:null),i.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||r.announceAriaDescription()}checkSelectionType(e){return!!fa(this.gos)||(ne(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:r}=this.beans;return!(!rr(t)&&!mo(t)&&(ne(129,{feature:e,rowModel:r.getType()}),1))}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let r="uiSelectAll";"currentPage"===t?r="uiSelectAllCurrentPage":"filtered"===t&&(r="uiSelectAllFiltered");const i={source:r,selectAll:t},s=this.beans.selectionSvc;e?s.selectAllRowNodes(i):s.deselectAllRowNodes(i)}isCheckboxSelection(){const{column:e,gos:t,beans:r}=this,n="object"==typeof t.get("rowSelection")?"headerCheckbox":"headerCheckboxSelection";return R0(r,e)&&this.checkRightRowModelType(n)&&this.checkSelectionType(n)}getSelectAllMode(){const e=Gg(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:r}=this.column.getColDef();return t?"currentPage":r?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}};function R0({gos:e,selectionColSvc:t},r){const i=e.get("rowSelection"),s=r.getColDef(),{headerCheckboxSelection:n}=s;let o=!1;if("object"==typeof i){const l=bs(r),c=Od(r);("autoGroupColumn"===Ml(i)&&c||l&&t?.isSelectionColumnEnabled())&&(o=Al(i))}else o="function"==typeof n?n(_e(e,{column:r,colDef:s})):!!n;return o}var ac,p3=class extends Q{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new f3(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const r=Md(e);r!==this.isRowSelectable&&(this.isRowSelectable=r,this.updateSelectable())}),this.isRowSelectable=Md(e),this.addManagedEventListeners({cellValueChanged:r=>this.updateRowSelectable(r.node),rowNodeDataChanged:r=>this.updateRowSelectable(r.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new h3}createSelectAllFeature(e){if(R0(this.beans,e))return new g3(e)}isMultiSelect(){return fa(this.gos)}onRowCtrlSelected(e,t,r){const i=!!e.rowNode.isSelected();e.forEachGui(r,s=>{s.rowComp.toggleCss("ag-row-selected",i);const n=s.element;Wi(n,i),n.contains(mt(this.beans))&&t(s)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected(),r=this.beans.editSvc?.isEditing({rowNode:e});if(!e.selectable||r)return;const s=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(s,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!Ra(e)||!Rn(this.gos)}updateRowSelectable(e,t){const r=e.rowPinned&&e.pinnedSibling?e.pinnedSibling.selectable:this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,r,t),r}setRowSelectable(e,t,r){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),r)return;if(ga(this.gos)){const s=this.calculateSelectedFromChildren(e);return void this.setNodesSelected({nodes:[e],newValue:s??!1,source:"selectableChanged"})}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,r=!1;if(!e.childrenAfterGroup?.length)return e.selectable?e.__selected:null;for(let i=0;i<e.childrenAfterGroup.length;i++){const s=e.childrenAfterGroup[i];let n=s.isSelected();if(!s.selectable){const o=this.calculateSelectedFromChildren(s);if(null===o)continue;n=o}switch(n){case!0:t=!0;break;case!1:r=!0;break;default:return}}return t&&r?void 0:!!t||!r&&(e.selectable?e.__selected:null)}selectRowNode(e,t,r,i="api"){if(!e.selectable&&t||e.__selected===t)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const o=e.sibling;o&&o.footer&&o.__localEventService&&o.dispatchRowEvent("rowSelected");const a=e.pinnedSibling;return a?.rowPinned&&a.__localEventService&&a.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...bb(e,this.gos,"rowSelected"),event:r||null,source:i}),!0}isCellCheckboxSelection(e,t){const r=this.gos.get("rowSelection");if(r&&"string"!=typeof r){const i=bs(e)&&wo(r);return e.isColumnFunc(t,i)}return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,r,i){const{gos:s,selectionCtx:n}=this,o=e.isSelected(),a=ga(s),l=function Wx(e){const t=Hg(e);return!0===t||"enableSelection"===t}(s),c=function Ux(e){const t=Hg(e);return!0===t||"enableDeselection"===t}(s),d=this.isMultiSelect(),u="rowClicked"===i;if(u&&!l&&!c)return null;if(t&&r&&d){const h=n.getRoot();if(h){if(h.isSelected()){const f=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{deselect:f.discard,select:f.keep,reset:!1}}return{select:[],deselect:n.extend(e,a).keep,reset:!1}}return null}if(t&&d){const h=n.selectAll?this.beans.rowModel.getRow(0):void 0,f=n.getRoot(h),p=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{select:p.keep,deselect:p.discard,reset:n.selectAll||!(!f||f.isSelected())}}if(r){if(u){const h=!o;return h&&!l||!h&&!c?null:(n.setRoot(e),{node:e,newValue:h,clearSelection:!1})}return n.setRoot(e),{node:e,newValue:!o,clearSelection:!d}}{n.setRoot(e);const h=function $x(e){const t=e.get("rowSelection");return"string"==typeof t?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}(s),p=u&&(!h||!l);if("filteredDescendants"===_l(s)&&void 0===o&&rr(s))return{node:e,newValue:!1,checkFilteredNodes:!0,clearSelection:!d||p};if(u){const g=o?!h:l;return g===o&&!p||g&&!l||!g&&!c?null:{node:e,newValue:g,clearSelection:!d||p,keepDescendants:e.group&&a}}return{node:e,newValue:!o,clearSelection:!d||p}}}},m3=class extends Q{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:t,eTopGuard:r,eBottomGuard:i,focusTrapActive:s,forceFocusOutWhenTabGuardsAreEmpty:n,isFocusableContainer:o,focusInnerElement:a,onFocusIn:l,onFocusOut:c,shouldStopEventPropagation:d,onTabKeyDown:u,handleKeyDown:h,isEmpty:f,eFocusableElement:p}=e;this.comp=t,this.eTopGuard=r,this.eBottomGuard=i,this.providedFocusInnerElement=a,this.eFocusableElement=p,this.focusTrapActive=!!s,this.forceFocusOutWhenTabGuardsAreEmpty=!!n,this.isFocusableContainer=!!o,this.providedFocusIn=l,this.providedFocusOut=c,this.providedShouldStopEventPropagation=d,this.providedOnTabKeyDown=u,this.providedHandleKeyDown=h,this.providedIsEmpty=f}postConstruct(){this.createManagedBean(new To(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards();for(const e of[this.eTopGuard,this.eBottomGuard])this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)})}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return!!this.providedShouldStopEventPropagation&&this.providedShouldStopEventPropagation()}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus)return void this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);if(this.skipTabGuardFocus)return void(this.skipTabGuardFocus=!1);if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():0===bo(this.eFocusableElement,".ag-tab-guard").length))return void this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;const t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){const r=bo(It(this.beans).body,null,!0),i=r.indexOf(e?this.eTopGuard:this.eBottomGuard);if(-1===i)return;let s,n;e?(s=0,n=i):(s=i+1,n=r.length);const o=r.slice(s,n),a=this.gos.get("tabIndex");o.sort((l,c)=>{const d=Number.parseInt(l.getAttribute("tabindex")||"0"),u=Number.parseInt(c.getAttribute("tabindex")||"0");return u===a?1:d===a?-1:0===d?1:0===u?-1:d-u}),o[e?o.length-1:0]?.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown)return void this.providedOnTabKeyDown(e);if(this.focusTrapActive||e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const r=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),r&&(r.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=bo(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),!!t.length&&(t[e?t.length-1:0].focus({preventScroll:!0}),!0)}getNextFocusableElement(e){return An(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}},v3=class extends Q{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:r,eFocusableElement:i}=this,s=[t,r],n={setTabIndex:m=>{for(const v of s)null!=m?v.setAttribute("tabindex",m):v.removeAttribute("tabindex")}};this.addTabGuards(t,r);const{focusTrapActive:o=!1,onFocusIn:a,onFocusOut:l,focusInnerElement:c,handleKeyDown:d,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:f,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:g}=e;this.tabGuardCtrl=this.createManagedBean(new m3({comp:n,focusTrapActive:o,eTopGuard:t,eBottomGuard:r,eFocusableElement:i,onFocusIn:a,onFocusOut:l,focusInnerElement:c,handleKeyDown:d,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:f,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:g}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=It(this.beans).createElement("div");return t.classList.add("ag-tab-guard","top"===e?"ag-tab-guard-top":"ag-tab-guard-bottom"),Qi(t,"presentation"),t}addTabGuards(e,t){const r=this.eFocusableElement;r.insertAdjacentElement("afterbegin",e),r.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];Rt(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,r){wd(t)||(t=t.getGui());const{eBottomGuard:i}=this;i?i.insertAdjacentElement("beforebegin",t):e(t,r)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;vr(e),vr(t),super.destroy()}},k0=class extends ft{initialiseTabGuard(e){this.tabGuardFeature=this.createManagedBean(new v3(this)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},Bn=class{constructor(e,t=!1){this.eElement=e,this.preventClick=t,this.startListener=null,this.handlers=[],this.eventSvc=void 0,this.touchStart=null,this.lastTapTime=null,this.longPressTimer=0,this.moved=!1}addEventListener(e,t){let r=this.eventSvc;if(!r){if(null===r)return;this.eventSvc=r=new St;const i=this.onTouchStart.bind(this);this.startListener=i,this.eElement.addEventListener("touchstart",i,{passive:!0})}r.addEventListener(e,t)}removeEventListener(e,t){this.eventSvc?.removeEventListener(e,t)}onTouchStart(e){if(this.touchStart||!(e=>{if(ac){if(ac.has(e))return!1}else ac=new WeakSet;return ac.add(e),!0})(e))return;const t=e.touches[0];this.touchStart=t;const r=this.handlers;if(!r.length){const i=this.eElement,s=i.ownerDocument,n=this.onTouchMove.bind(this),o=this.onTouchEnd.bind(this),a=this.onTouchCancel.bind(this),l={passive:!0},c={passive:!1};Rl(r,[i,"touchmove",n,l],[s,"touchcancel",a,l],[s,"touchend",o,c],[s,"contextmenu",Ws,c])}this.clearLongPress(),this.longPressTimer=window.setTimeout(()=>{this.longPressTimer=0,this.touchStart===t&&!this.moved&&(this.moved=!0,this.eventSvc?.dispatchEvent({type:"longTap",touchStart:t,touchEvent:e}))},550)}onTouchMove(e){const{moved:t,touchStart:r}=this;if(!t&&r){const i=la(r,e.touches);i&&!ug(i,r,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){const t=this.touchStart;!t||!la(t,e.changedTouches)||(this.moved||(this.eventSvc?.dispatchEvent({type:"tap",touchStart:t}),this.checkDoubleTap(t)),this.preventClick&&Ws(e),this.cancel())}onTouchCancel(e){const t=this.touchStart;!t||!la(t,e.changedTouches)||(this.lastTapTime=null,this.cancel())}checkDoubleTap(e){let t=Date.now();const r=this.lastTapTime;r&&t-r>500&&(this.eventSvc?.dispatchEvent({type:"doubleTap",touchStart:e}),t=null),this.lastTapTime=t}cancel(){this.clearLongPress(),bd(this.handlers),this.touchStart=null}clearLongPress(){window.clearTimeout(this.longPressTimer),this.longPressTimer=0,this.moved=!1}destroy(){const e=this.startListener;e&&(this.startListener=null,this.eElement.removeEventListener("touchstart",e)),this.cancel(),this.eElement=null,this.eventSvc=null}},b3=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.includes("x"),this.scrollVertically=e.scrollAxis.includes("y"),this.scrollByTick=null!=e.scrollByTick?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}get scrolling(){return null!==this.tickingInterval}check(e,t=!1){const r=t||this.shouldSkipVerticalScroll();if(r&&this.shouldSkipHorizontalScroll())return;const i=this.scrollContainer.getBoundingClientRect(),s=this.scrollByTick;this.tickLeft=e.clientX<i.left+s,this.tickRight=e.clientX>i.right-s,this.tickUp=e.clientY<i.top+s&&!r,this.tickDown=e.clientY>i.bottom-s&&!r,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){null===this.tickingInterval&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;const e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){const t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){const t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}},T0=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${wg}/${this.frameworkName}-data-grid`,function Ix(e){po=e}(this.baseDocLink)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return this.baseDocLink+(e?"/"+e:"")}};function y3(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var P0=Object.fromEntries(["licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","rowSpanSvc","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"].map((e,t)=>[e,t]));function F3(e,t){return((e.beanName?P0[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER)-((t.beanName?P0[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER)}function R3(e,t){return"gridDestroySvc"===e?.beanName?-1:"gridDestroySvc"===t?.beanName?1:0}var k3={tag:"div",cls:"ag-pinned-left-header",role:"rowgroup"},T3={tag:"div",cls:"ag-pinned-right-header",role:"rowgroup"},P3={tag:"div",cls:"ag-header-viewport",role:"rowgroup",attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eCenterContainer",cls:"ag-header-container",role:"presentation"}]},Bu=class extends ft{constructor(e){super(),this.eCenterContainer=ge,this.headerRowComps={},this.rowCompsList=[],this.pinned=e}postConstruct(){this.selectAndSetTemplate();const e={setDisplayed:r=>this.setDisplayed(r),setCtrls:r=>this.setCtrls(r),setCenterWidth:r=>this.eCenterContainer.style.width=r,setViewportScrollLeft:r=>this.getGui().scrollLeft=r,setPinnedContainerWidth:r=>{const i=this.getGui();i.style.width=r,i.style.maxWidth=r,i.style.minWidth=r}};this.createManagedBean(new Wy(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){this.setTemplate("left"==this.pinned?k3:"right"==this.pinned?T3:P3),this.eRowContainer=this.eCenterContainer!==ge?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),e.getGui().remove()}setCtrls(e){const t=this.headerRowComps;let r;this.headerRowComps={},this.rowCompsList=[];const i=s=>{const n=s.getGui();n.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(n),r&&ng(this.eRowContainer,n,r),r=n};for(const s of e){const n=s.instanceId,o=t[n];delete t[n];const a=o||this.createBean(new Hy(s));this.headerRowComps[n]=a,this.rowCompsList.push(a),i(a)}for(const s of Object.values(t))this.destroyRowComp(s)}},D3={tag:"div",cls:"ag-header",role:"presentation"},M3={selector:"AG-HEADER-ROOT",component:class extends ft{constructor(){super(D3)}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 My).setComp(e,this.getGui(),this.getFocusableElement());const r=i=>{this.createManagedBean(i),this.appendChild(i)};r(new Bu("left")),r(new Bu(null)),r(new Bu("right"))}}},I3=class extends ft{constructor(e,t,r,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=nr({tag:"div",role:t.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":t.column.colIdSanitised}});let o;this.eCell=n,t.isCellSpanning()?(o=nr({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),o.appendChild(n),this.setTemplateFromElement(o)):this.setTemplateFromElement(n),this.cellCssManager=new lp(()=>n),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1),t.setComp({toggleCss:(l,c)=>this.cellCssManager.toggleCss(l,c),setUserStyles:l=>sa(n,l),getFocusableElement:()=>n,setIncludeSelection:l=>this.includeSelection=l,setIncludeRowDrag:l=>this.includeRowDrag=l,setIncludeDndSource:l=>this.includeDndSource=l,setRenderDetails:(l,c,d)=>this.setRenderDetails(l,c,d),setEditDetails:(l,c,d)=>this.setEditDetails(l,c,d),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue(),refreshEditStyles:(l,c)=>this.refreshEditStyles(l,c)},n,o,this.eCellWrapper,r,s,void 0)}getParentOfValue(){return this.eCellValue??this.eCellWrapper??this.eCell}setRenderDetails(e,t,r){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=null==this.firstRender;const s=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(r||s)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t)),this.rowDraggingComp?.refreshVisibility()}setEditDetails(e,t,r){e?this.createCellEditorInstance(e,t,r):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,r=t||this.forceWrapper,i=r&&null==this.eCellWrapper;i&&(this.eCellWrapper=nr({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));const s=!r&&null!=this.eCellWrapper;s&&(vr(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssManager.toggleCss("ag-cell-value",!r);const n=!e&&r,o=n&&null==this.eCellValue;if(o){const c=this.cellCtrl.getCellValueClass();this.eCellValue=nr({tag:"span",cls:c,role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue)}const a=!n&&null!=this.eCellValue;a&&(vr(this.eCellValue),this.eCellValue=void 0);const l=i||s||o||a;return l&&this.removeControls(),!e&&t&&this.addControls(),l}addControls(){const{cellCtrl:e,eCellWrapper:t,eCellValue:r,includeRowDrag:i,includeDndSource:s,includeSelection:n}=this,o=a=>{a&&t.insertBefore(a.getGui(),r)};i&&null==this.rowDraggingComp&&(this.rowDraggingComp=e.createRowDragComp(),o(this.rowDraggingComp)),s&&null==this.dndSourceComp&&(this.dndSourceComp=e.createDndSource(),o(this.dndSourceComp)),n&&null==this.checkboxSelectionComp&&(this.checkboxSelectionComp=e.createSelectionCheckbox(),o(this.checkboxSelectionComp))}createCellEditorInstance(e,t,r){const i=this.editorVersion,s=e.newAgStackInstance(),{params:n}=e;s.then(a=>this.afterCellEditorCreated(i,a,n,t,r)),pt(this.cellEditor)&&n.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();Rt(t);const r=Hs(e);null!=r&&(t.textContent=r)}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),vr(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){const{context:e}=this.beans;(this.cellEditorPopupWrapper?.getGui().contains(mt(this.beans))||this.cellCtrl.hasBrowserFocus())&&this.eCell.focus({preventScroll:!0}),this.hideEditorPopup?.(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),vr(this.cellEditorGui),this.cellCtrl.disableEditorTooltipFeature(),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){if(null==this.cellRenderer?.refresh||this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return!0===t||void 0===t}createCellRendererInstance(e){const t=this.rendererVersion,r=n=>o=>{if(this.rendererVersion!==t||!this.isAlive())return;const l=n.newAgStackInstance(),c=this.afterCellRendererCreated.bind(this,t,n.componentClass);l?.then(c)},{animationFrameSvc:i}=this.beans;let s;if(s=i?.active&&this.firstRender?(n,o=!1)=>{i.createTask(r(n),this.rowNode.rowIndex,"p2",n.componentFromFramework,o)}:n=>r(n)(),e.params?.deferRender&&!this.cellCtrl.rowNode.group){const{loadingComp:n,onReady:o}=this.cellCtrl.getDeferLoadingCellRenderer();n&&(s(n),o.then(()=>s(e,!0)))}else s(e)}afterCellRendererCreated(e,t,r){if(!this.isAlive()||e!==this.rendererVersion)return void this.beans.context.destroyBean(r);this.cellRenderer=r,this.cellRendererClass=t;const s=r.getGui();if(this.cellRendererGui=s,null!=s){const n=this.getParentOfValue();Rt(n),n.appendChild(s)}}afterCellEditorCreated(e,t,r,i,s){const n=e!==this.editorVersion,{context:o}=this.beans;if(n)return void o.destroyBean(t);if(t.isCancelBeforeStart?.())return o.destroyBean(t),void this.cellCtrl.stopEditing(!0);if(!t.getGui)return ne(97,{colId:this.column.getId()}),void o.destroyBean(t);this.cellEditor=t,this.cellEditorGui=t.getGui();const l=i||t.isPopup?.();l?this.addPopupCellEditor(r,s):this.addInCellEditor(),this.refreshEditStyles(!0,l),t.afterGuiAttached?.(),this.cellCtrl.enableEditorTooltipFeature(t),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){const{cellCssManager:r}=this;r.toggleCss("ag-cell-inline-editing",e&&!t),r.toggleCss("ag-cell-popup-editing",e&&!!t),r.toggleCss("ag-cell-not-inline-editing",!e||!!t)}addInCellEditor(){const{eCell:e}=this;e.contains(mt(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),Rt(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){const{gos:r,context:i,popupSvc:s,editSvc:n}=this.beans;"fullRow"===r.get("editType")&&ne(98);const o=this.cellEditorPopupWrapper=i.createBean(n.createPopupEditorWrapper(e)),{cellEditor:a,cellEditorGui:l,eCell:c,rowNode:d,column:u,cellCtrl:h}=this,f=o.getGui();l&&f.appendChild(l);const p=r.get("stopEditingWhenCellsLoseFocus"),g=t??a.getPopupPosition?.()??"over",m=r.get("enableRtl"),w=s.positionPopupByComponent.bind(s,{ePopup:f,column:u,rowNode:d,type:"popupCellEditor",eventSource:c,position:g,alignSide:m?"right":"left",keepWithinBounds:!0}),C=s.addPopup({modal:p,eChild:f,closeOnEsc:!0,closedCallback:()=>{h.onPopupEditorClosed()},anchorToElement:c,positionCallback:w,ariaOwns:c});C&&(this.hideEditorPopup=C.hideFunc)}detach(){this.getGui().remove()}destroy(){this.destroyRenderer(),this.destroyEditor(),this.removeControls(),super.destroy()}},_3=class extends ft{constructor(e,t,r){super(),this.cellComps=new Map,this.beans=t,this.rowCtrl=e;const i=nr({tag:"div",role:"row",attrs:{"comp-id":`${this.getCompId()}`}});this.setInitialStyle(i,r),this.setTemplateFromElement(i);const s=i.style;this.domOrder=this.rowCtrl.getDomOrder(),e.setComp({setDomOrder:o=>this.domOrder=o,setCellCtrls:o=>this.setCellCtrls(o),showFullWidth:o=>this.showFullWidth(o),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,getFullWidthCellRendererParams:()=>this.fullWidthCellRendererParams,toggleCss:(o,a)=>this.toggleCss(o,a),setUserStyles:o=>sa(i,o),setTop:o=>s.top=o,setTransform:o=>s.transform=o,setRowIndex:o=>i.setAttribute("row-index",o),setRowId:o=>i.setAttribute("row-id",o),setRowBusinessKey:o=>i.setAttribute("row-business-key",o),refreshFullWidth:o=>{const a=o();return this.fullWidthCellRendererParams=a,this.fullWidthCellRenderer?.refresh?.(a)??!1}},this.getGui(),r,void 0),this.addDestroyFunc(()=>{e.unsetComp(r)})}setInitialStyle(e,t){const r=this.rowCtrl.getInitialTransform(t);if(r)e.style.setProperty("transform",r);else{const i=this.rowCtrl.getInitialRowTop(t);i&&e.style.setProperty("top",i)}}showFullWidth(e){e.newAgStackInstance().then(i=>{if(this.isAlive()){const s=i.getGui();this.getGui().appendChild(s),this.rowCtrl.setupDetailRowAutoHeight(s),this.setFullWidthRowComp(i,e.params)}else this.beans.context.destroyBean(i)})}setCellCtrls(e){const t=new Map(this.cellComps);for(const r of e){const i=r.instanceId;this.cellComps.has(i)?t.delete(i):this.newCellComp(r)}this.destroyCells(t),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;const t=[];for(const r of e){const i=this.cellComps.get(r.instanceId);i&&t.push(i.getGui())}og(this.getGui(),t)}newCellComp(e){const t=this.beans.editSvc?.isEditing(e,{withOpenEditor:!0})??!1,r=new I3(this.beans,e,this.rowCtrl.printLayout,this.getGui(),t);this.cellComps.set(e.instanceId,r),this.getGui().appendChild(r.getGui())}destroy(){super.destroy(),this.destroyCells(this.cellComps)}setFullWidthRowComp(e,t){this.fullWidthCellRenderer=e,this.fullWidthCellRendererParams=t,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer),this.fullWidthCellRendererParams=void 0})}destroyCells(e){for(const t of e.values()){if(!t)return;const r=t.cellCtrl.instanceId;if(this.cellComps.get(r)!==t)return;t.detach(),t.destroy(),this.cellComps.delete(r)}}},B3={selector:"AG-ROW-CONTAINER",component:class extends ft{constructor(e){super(),this.eViewport=ge,this.eContainer=ge,this.eSpannedContainer=ge,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=e?.name,this.options=ba(this.name)}postConstruct(){this.setTemplate(function L3(e,t,r){const i=!!r.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls,s={tag:"div",ref:"eContainer",cls:sc(e),role:"rowgroup"};if("center"===t.type||i){const n={tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${ry(e)}`,role:"presentation"};return s.role="presentation",{tag:"div",ref:"eViewport",cls:`ag-viewport ${i0(e)}`,role:"rowgroup",children:[s,i?n:null]}}return s}(this.name,this.options,this.beans));const e={setHorizontalScroll:r=>this.eViewport.scrollLeft=r,setViewportHeight:r=>this.eViewport.style.height=r,setRowCtrls:({rowCtrls:r})=>this.setRowCtrls(r),setSpannedRowCtrls:r=>this.setRowCtrls(r,!0),setDomOrder:r=>{this.domOrder=r},setContainerWidth:r=>{this.eContainer.style.width=r,this.eSpannedContainer&&(this.eSpannedContainer.style.width=r)},setOffsetTop:r=>{const i=`translateY(${r})`;this.eContainer.style.transform=i,this.eSpannedContainer&&(this.eSpannedContainer.style.transform=i)}};this.createManagedBean(new hy(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:r,options:i}=this,s=t?this.eSpannedContainer:this.eContainer,n=t?{...this.rowCompsWithSpan}:{...this.rowCompsNoSpan},o={};t?this.rowCompsWithSpan=o:this.rowCompsNoSpan=o,this.lastPlacedElement=null;const a=[];for(const l of e){const c=l.instanceId,d=n[c];let u;if(d)u=d,delete n[c];else{if(!l.rowNode.displayed)continue;u=new _3(l,r,i.type)}o[c]=u,a.push([u,!d])}this.removeOldRows(Object.values(n)),this.addRowNodes(a,s)}addRowNodes(e,t){const{domOrder:r}=this;for(const[i,s]of e){const n=i.getGui();r?this.ensureDomOrder(n,t):s&&t.appendChild(n)}}removeOldRows(e){for(const t of e)t.getGui().remove(),t.destroy()}ensureDomOrder(e,t){ng(t,e,this.lastPlacedElement),this.lastPlacedElement=e}}};function ka(e,t){return t.map(r=>{const i=`e${r[0].toUpperCase()+r.substring(1)}RowContainer`;return e[i]={name:r},{tag:"ag-row-container",ref:i,attrs:{name:r}}})}var G3={selector:"AG-GRID-BODY",component:class extends ft{constructor(){super(...arguments),this.eGridRoot=ge,this.eBodyViewport=ge,this.eStickyTop=ge,this.eStickyBottom=ge,this.eTop=ge,this.eBottom=ge,this.eBody=ge}postConstruct(){const{overlays:e,rangeSvc:t}=this.beans,r=e?.getOverlayWrapperSelector(),{paramsMap:i,elementParams:s}=function N3(e){const t={};return{paramsMap:t,elementParams:{tag:"div",ref:"eGridRoot",cls:"ag-root ag-unselectable",children:[{tag:"ag-header-root"},{tag:"div",ref:"eTop",cls:"ag-floating-top",role:"presentation",children:ka(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:ka(t,["left","center","right","fullWidth"])},{tag:"ag-fake-vertical-scroll"}]},{tag:"div",ref:"eStickyTop",cls:"ag-sticky-top",role:"presentation",children:ka(t,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])},{tag:"div",ref:"eStickyBottom",cls:"ag-sticky-bottom",role:"presentation",children:ka(t,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])},{tag:"div",ref:"eBottom",cls:"ag-floating-bottom",role:"presentation",children:ka(t,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])},{tag:"ag-fake-horizontal-scroll"},e?{tag:"ag-overlay-wrapper"}:null]}}}(!!r);this.setTemplate(s,[...r?[r]:[],wy,by,M3,B3],i);const n=(a,l)=>{const c=`${a}px`;l.style.minHeight=c,l.style.height=c},o={setRowAnimationCssOnBodyViewport:(a,l)=>this.setRowAnimationCssOnBodyViewport(a,l),setColumnCount:a=>function Nt(e,t){Xr(e,"colcount",t)}(this.getGui(),a),setRowCount:a=>function ct(e,t){Xr(e,"rowcount",t)}(this.getGui(),a),setTopHeight:a=>n(a,this.eTop),setBottomHeight:a=>n(a,this.eBottom),setTopInvisible:a=>this.eTop.classList.toggle("ag-invisible",a),setBottomInvisible:a=>this.eBottom.classList.toggle("ag-invisible",a),setStickyTopHeight:a=>this.eStickyTop.style.height=a,setStickyTopTop:a=>this.eStickyTop.style.top=a,setStickyTopWidth:a=>this.eStickyTop.style.width=a,setStickyBottomHeight:a=>{this.eStickyBottom.style.height=a,this.eStickyBottom.classList.toggle("ag-invisible","0px"===a)},setStickyBottomBottom:a=>this.eStickyBottom.style.bottom=a,setStickyBottomWidth:a=>this.eStickyBottom.style.width=a,setColumnMovingCss:(a,l)=>this.toggleCss(a,l),updateLayoutClasses:(a,l)=>{const c=[this.eBodyViewport.classList,this.eBody.classList];for(const d of c)d.toggle(ji.AUTO_HEIGHT,l.autoHeight),d.toggle(ji.NORMAL,l.normal),d.toggle(ji.PRINT,l.print);this.toggleCss(ji.AUTO_HEIGHT,l.autoHeight),this.toggleCss(ji.NORMAL,l.normal),this.toggleCss(ji.PRINT,l.print)},setAlwaysVerticalScrollClass:(a,l)=>this.eBodyViewport.classList.toggle(o0,l),registerBodyViewportResizeListener:a=>{const l=zs(this.beans,this.eBodyViewport,a);this.addDestroyFunc(()=>l())},setPinnedTopBottomOverflowY:a=>this.eTop.style.overflowY=this.eBottom.style.overflowY=a,setCellSelectableCss:(a,l)=>{for(const c of[this.eTop,this.eBodyViewport,this.eBottom])c.classList.toggle(a,l)},setBodyViewportWidth:a=>this.eBodyViewport.style.width=a,setGridRootRole:a=>Qi(this.eGridRoot,a)};this.ctrl=this.createManagedBean(new py),this.ctrl.setComp(o,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(t&&xs(this.gos)||fa(this.gos))&&function Cs(e,t){Xr(e,"multiselectable",t)}(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){const r=this.eBodyViewport.classList;r.toggle("ag-row-animation",t),r.toggle("ag-row-no-animation",!t)}}},V3=class extends Q{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,r){this.view=e,this.eGridHostDiv=t,this.eGui=r,this.eGui.setAttribute("grid-id",this.beans.context.getId());const{dragAndDrop:i,ctrlsSvc:s}=this.beans;i?.registerGridDropTarget(()=>this.eGui,this),this.createManagedBean(new vu(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const n=zs(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>n()),s.register("gridCtrl",this)}isDetailGrid(){return Sp(this.getGui())?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){const e=this.beans;return{paginationSelector:e.pagination?.getPaginationSelector(),gridHeaderDropZonesSelector:e.registry?.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:e.sideBar?.getSelector(),statusBarSelector:e.registry?.getSelector("AG-STATUS-BAR"),watermarkSelector:e.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){const{view:t}=this;t.setCursor(!1===e?null:1===e?"ew-resize":"ns-resize")}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:r,nextIndex:i}=this.getNextFocusableIndex(t,e);if(i<0||i>=t.length)return!1;if(0===i){if(r>0){const{visibleCols:s,focusSvc:n}=this.beans,a=kt(s.allCols);if(n.focusGridView({column:a,backwards:!0}))return!0}return!1}return this.focusContainer(t[i],e)}focusInnerElement(e){if(this.gos.getCallback("focusGridInnerElement")?.({fromBottom:!!e}))return!0;const r=this.getFocusableContainers(),{focusSvc:i,visibleCols:s}=this.beans,n=s.allCols;if(e){if(r.length>1)return this.focusContainer(kt(r),e);const o=kt(n);if(i.focusGridView({column:o,backwards:e}))return!0}if(0===this.gos.get("headerHeight")||On(this.beans)){if(i.focusGridView({column:n[0],backwards:e}))return!0;for(let o=1;o<r.length;o++)if(Dn(r[o].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){const t=this.view.getFocusableContainers(),{nextIndex:r,indexWithFocus:i}=this.getNextFocusableIndex(t,e);if(-1===i||r<0||r>=t.length)return;const s=t[r];s.setAllowFocus?.(!0),setTimeout(()=>{s.setAllowFocus?.(!1)})}isFocusable(){const e=this.beans;return!nc(e)||!On(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){const r=mt(this.beans),i=e.findIndex(n=>n.getGui().contains(r));return{indexWithFocus:i,nextIndex:i+(t?-1:1)}}focusContainer(e,t){e.setAllowFocus?.(!0);const r=Dn(e.getGui(),t,!1,!0);return e.setAllowFocus?.(!1),r}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},z3=class extends k0{constructor(e){super(),this.gridBody=ge,this.sideBar=ge,this.pagination=ge,this.rootWrapperBody=ge,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 V3),r=t.getOptionalSelectors(),i=this.createTemplate(r),s=[G3,...Object.values(r).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(()=>{e.remove(),Us(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){const r=this.rootWrapperBody.classList,{AUTO_HEIGHT:i,NORMAL:s,PRINT:n}=ji,{autoHeight:o,normal:a,print:l}=t;r.toggle(i,o),r.toggle(s,a),r.toggle(n,l),this.toggleCss(i,o),this.toggleCss(s,a),this.toggleCss(n,l)}createTemplate(e){return{tag:"div",cls:"ag-root-wrapper",role:"presentation",children:[e.gridHeaderDropZonesSelector?{tag:"ag-grid-header-drop-zones"}:null,{tag:"div",ref:"rootWrapperBody",cls:"ag-root-wrapper-body",role:"presentation",children:[{tag:"ag-grid-body",ref:"gridBody"},e.sideBarSelector?{tag:"ag-side-bar",ref:"sideBar"}:null]},e.statusBarSelector?{tag:"ag-status-bar"}:null,e.paginationSelector?{tag:"ag-pagination",ref:"pagination"}:null,e.watermarkSelector?{tag:"ag-watermark"}:null]}}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(e=!1){e||!this.pagination?.isDisplayed()?super.forceFocusOutOfContainer(e):this.pagination.forceFocusOutOfContainer(e)}getFocusableContainers(){const e=[this.gridBody];for(const t of[this.sideBar,this.pagination])t&&e.push(t);return e.filter(t=>Ji(t.getGui()))}},Ge=(e,t)=>{for(const r of Object.keys(t))t[r]=e;return t},D0={dispatchEvent:"CommunityCore",...Ge("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...Ge("GridState",{getState:0,setState:0}),...Ge("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...Ge("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...Ge("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...Ge("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...Ge("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...Ge("ValueCache",{expireValueCache:0}),...Ge("CellApi",{getCellValue:0}),...Ge("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...Ge("Sort",{onSortChanged:0}),...Ge("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...Ge("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...Ge("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...Ge("HighlightChanges",{flashCells:0}),...Ge("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...Ge("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}),...Ge("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...Ge("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...Ge("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...Ge("ColumnResize",{setColumnWidths:0}),...Ge("ColumnHover",{isColumnHovered:0}),...Ge("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...Ge("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...Ge("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...Ge("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...Ge("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...Ge("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...Ge("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...Ge("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...Ge("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0}),...Ge("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...Ge("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0,onRowHeightChanged:0,resetRowHeights:0}),...Ge("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...Ge("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...Ge("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...Ge("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...Ge("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...Ge("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...Ge("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...Ge("ContextMenu",{showContextMenu:0}),...Ge("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...Ge("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...Ge("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...Ge("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...Ge("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}),...Ge("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...Ge("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...Ge("StatusBar",{getStatusPanel:0}),...Ge("AiToolkit",{getStructuredSchema:0})},Nu={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},W3=(e,t)=>e.eventSvc.dispatchEvent(t),A0=class{};function I0(e,t){e.gos.updateGridOptions({options:t})}Reflect.defineProperty(A0,"name",{value:"GridApi"});var Y3={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},nE={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},oE=class extends ft{constructor(e,t,r,i,s,n=!1){super(),this.cellValueFn=e,this.rowNode=t,this.column=r,this.customGui=i,this.dragStartPixels=s,this.alwaysVisible=n,this.dragSource=null}isCustomGui(){return null!=this.customGui}postConstruct(){const{beans:e,customGui:t}=this;t?this.setDragElement(t,this.dragStartPixels):(this.setTemplate(nE),this.getGui().appendChild(Ti("rowDrag",e,null)),this.addDragSource()),this.alwaysVisible||this.initCellDrag()}initCellDrag(){const{beans:e,gos:t,rowNode:r}=this,i=this.refreshVisibility.bind(this);this.addManagedPropertyListener("suppressRowDrag",i),this.addManagedListeners(r,{dataChanged:i,cellChanged:i}),this.addManagedListeners(e.eventSvc,t.get("rowDragManaged")?{sortChanged:i,filterChanged:i,columnRowGroupChanged:i,newColumnsLoaded:i}:{newColumnsLoaded:i})}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}refreshVisibility(){if(this.alwaysVisible)return;const e={skipAriaHidden:!0};if(this.isNeverDisplayed())return void this.setDisplayed(!1,e);const t=this.column;let r="function"==typeof t?.getColDef().rowDrag,i=!t||this.isCustomGui()||t.isRowDrag(this.rowNode);i&&this.rowNode.footer&&this.gos.get("rowDragManaged")&&(i=!1,r=!0),this.setDisplayed(r||i,e),this.setVisible(i,e)}isNeverDisplayed(){const{gos:e,beans:t}=this;return!!(e.get("suppressRowDrag")||e.get("rowDragManaged")&&t.rowDragSvc.rowDragFeature?.shouldPreventRowMove()&&!t.dragAndDrop?.hasExternalDropZones())}getSelectedNodes(){const e=this.rowNode;if(!this.gos.get("rowDragMultiRow"))return[e];const r=this.beans.selectionSvc?.getSelectedNodes()??[];return-1!==r.indexOf(e)?r:[e]}getDragItem(){const{column:e,rowNode:t}=this;return{rowNode:t,rowNodes:this.getSelectedNodes(),columns:e?[e]:void 0,defaultTextValue:this.cellValueFn()}}getRowDragText(e){if(e){const t=e.getColDef();if(t.rowDragText)return t.rowDragText}return this.gos.get("rowDragText")}addDragSource(e=4){if(this.dragSource&&this.removeDragSource(),this.gos.get("rowDragManaged")&&this.rowNode.footer)return;const t=this.getGui();this.gos.get("enableCellTextSelection")&&(this.removeMouseDownListener(),this.mouseDownListener=this.addManagedElementListeners(t,{mousedown:i=>{i?.preventDefault()}})[0]);const r=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:i=>{const s=i?.dragItem||this.getDragItem(),n=(i?.dropTarget?.rows.length??s.rowNodes?.length)||1,o=this.getRowDragText(this.column);return o?o(s,n):1===n?this.cellValueFn():`${n} ${r("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},lc=class{constructor(){this.reordered=!1,this.removals=new Set,this.updates=new Set,this.adds=new Set}};function _0(e,t){return e.column===t.column&&e.rowPinned===t.rowPinned&&e.rowIndex===t.rowIndex}function Rs(e,t){switch(t.rowPinned){case"top":return e.pinnedRowModel?.getPinnedTopRow(t.rowIndex);case"bottom":return e.pinnedRowModel?.getPinnedBottomRow(t.rowIndex);default:return e.rowModel.getRow(t.rowIndex)}}function Do(e,t){const r=e.spannedRowRenderer?.getCellByPosition(t);if(r)return r;const i=e.rowRenderer.getRowByPosition(t);return i?i.getCellCtrl(t.column):null}function cc(e,t,r=!1){const{rowIndex:i,rowPinned:s}=t,{pageBounds:n,pinnedRowModel:o,rowModel:a}=e;return 0===i?"top"===s?null:"bottom"===s&&a.isRowsToRender()?{rowIndex:n.getLastRow(),rowPinned:null}:o?.isRowsToRender("top")?{rowIndex:o.getPinnedTopRowCount()-1,rowPinned:"top"}:null:r?O0(e,s?void 0:a.getRow(i),!0)??{rowIndex:i-1,rowPinned:s}:{rowIndex:i-1,rowPinned:s}}function L0(e,t,r=!1){const{rowIndex:i,rowPinned:s}=t,{pageBounds:n,pinnedRowModel:o,rowModel:a}=e;return function fE(e,t){const{rowPinned:r,rowIndex:i}=t,{pinnedRowModel:s,pageBounds:n}=e;return"top"===r?(s?.getPinnedTopRowCount()??0)-1<=i:"bottom"===r?(s?.getPinnedBottomRowCount()??0)-1<=i:n.getLastRow()<=i}(e,t)?"bottom"===s?null:"top"===s&&a.isRowsToRender()?{rowIndex:n.getFirstRow(),rowPinned:null}:o?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null:r?O0(e,s?void 0:a.getRow(i))??{rowIndex:i+1,rowPinned:s}:{rowIndex:i+1,rowPinned:s}}function O0(e,t,r=!1){const{gos:i,rowRenderer:s}=e;if(!t?.sticky||!Lg(i))return;const n=s.getStickyTopRowCtrls(),o=s.getStickyBottomRowCtrls(),a=!o.some(u=>u.rowNode.rowIndex===t.rowIndex),l=a?n:o,c=(r?-1:1)*(a?-1:1);let d;for(let u=0;u<l.length;u++)if(l[u].rowNode.rowIndex===t.rowIndex){d=l[u+c];break}return d?{rowIndex:d.rowNode.rowIndex,rowPinned:null}:void 0}var Ta=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:r,children:i}=e;if(i)for(let s=0;s<i.length;++s)this.depthFirstSearchChangedPath(i[s],t);t(r)}depthFirstSearchEverything(e,t,r){const i=e.childrenAfterGroup;if(i)for(let s=0,n=i.length;s<n;++s){const o=i[s];o.childrenAfterGroup?this.depthFirstSearchEverything(o,t,r):r&&t(o)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,r=!1){this.active&&!r?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,r=0;for(;!this.mapToItems[t.id];)this.mapToItems[t.id]={rowNode:t,children:null},r++,t=t.parent;return r}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let r=e;for(;r;){this.nodeIdsToColumns[r.id]||(this.nodeIdsToColumns[r.id]={});for(const i of t)this.nodeIdsToColumns[r.id][i.getId()]=!0;r=r.parent}}linkPathItems(e,t){let r=e;for(let i=0;i<t;i++){const s=this.mapToItems[r.id],n=this.mapToItems[r.parent.id];n.children||(n.children=[]),n.children.push(s),r=r.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;const r=this.createPathItems(e);this.linkPathItems(e,r),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;const r=this.nodeIdsToColumns[e.id];return t.filter(s=>r[s.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const r=this.nodeIdsToColumns[e.id];return t.filter(s=>!r[s.getId()])}},gE=class{constructor(e,t){this.beans=e,this.groupThrottled=!1,this.scrollChanged=!1,this.scrollChanging=!1,this.oldVScroll=null,this.groupTimer=null,this.groupTarget=null,this.onGroupThrottle=()=>{this.groupTimer=null,this.groupThrottled=!0,this.beans.dragAndDrop?.nudge()};const r=()=>t.scrollFeature.getVScrollPosition().top;this.autoScroll=new b3({scrollContainer:t.eBodyViewport,scrollAxis:"y",getVerticalPosition:r,setVerticalPosition:i=>t.scrollFeature.setVerticalScrollPosition(i),onScrollCallback:()=>{const i=r();if(this.oldVScroll!==i)return this.oldVScroll=i,void(this.scrollChanging=!0);const s=this.scrollChanging;this.scrollChanged=s,this.scrollChanging=!1,s&&(this.beans.dragAndDrop?.nudge(),this.scrollChanged=!1)}})}updateGroup(e,t){this.groupTarget&&this.groupTarget!==e&&this.clearGroup(),e&&(t&&this.groupThrottled&&!e.expanded&&e.childrenAfterSort?.length&&e.isExpandable()&&e.setExpanded(!0,void 0,!0),e.expanded&&e.childrenAfterSort?.length&&(this.groupThrottled=!0,this.groupTarget=e))}startGroup(e){this.groupTarget=e,null===this.groupTimer&&(this.groupTimer=window.setTimeout(this.onGroupThrottle,this.beans.gos.get("rowDragInsertDelay")))}clearGroup(){this.groupThrottled=!1,this.groupTarget=null;const e=this.groupTimer;null!==e&&(this.groupTimer=null,window.clearTimeout(e))}clear(){this.clearGroup(),this.autoScroll.ensureCleared(),this.oldVScroll=null,this.scrollChanged=!1,this.scrollChanging=!1}},pE=class extends Q{constructor(e){super(),this.eContainer=e,this.lastDraggingEvent=null,this.nudger=null}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,t=>{this.nudger=new gE(e,t.gridBodyCtrl)})}destroy(){super.destroy(),this.nudger?.clear(),this.nudger=null,this.lastDraggingEvent=null,this.eContainer=null}getContainer(){return this.eContainer}isInterestedIn(e){return 2===e}getIconName(e){return!1===e?.dropTarget?.allowed||this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?"notAllowed":"move"}shouldPreventRowMove(){const{rowGroupColsSvc:e,filterManager:t,sortSvc:r}=this.beans;return!!((e?.columns??[]).length||t?.isAnyFilterPresent()||r?.isSortActive())}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const r=this.beans.selectionSvc?.getSelectedNodes();if(r&&r.indexOf(t)>=0)return r.slice().sort(CE)}return[t]}onDragEnter(e){this.dragging(e,!0)}onDragging(e){this.dragging(e,!1)}dragging(e,t){const{lastDraggingEvent:r,beans:i}=this;if(t){const o=this.getRowNodes(e);e.dragItem.rowNodes=o,H0(o,!0)}this.lastDraggingEvent=e;const s=e.fromNudge,n=this.makeRowsDrop(r,e,s,!1);i.rowDropHighlightSvc?.fromDrag(e),t&&this.dispatchGridEvent("rowDragEnter",e),this.dispatchGridEvent("rowDragMove",e),n?.rowDragManaged&&n.moved&&n.allowed&&n.sameGrid&&!n.suppressMoveWhenRowDragging&&(!s&&!this.nudger?.autoScroll.scrolling||this.nudger?.scrollChanged)&&this.dropRows(n),this.nudger?.autoScroll.check(e.event)}isFromThisGrid(e){return e.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(e,t,r,i){const{beans:s,gos:n}=this,o=this.newRowsDrop(t,i),a=s.rowModel;if(t.dropTarget=o,t.changed=!1,!o)return null;let{sameGrid:l,rootNode:c,source:d,target:u,rows:h}=o;u??(u=a.getRow(a.getRowCount()-1)??null);const f=!!this.beans.groupStage?.treeData&&l;let p=null;if(u?.footer){const C=dc(a,-1,u)??dc(a,1,u);p=u.sibling??c,u=C??null}u?.detail&&(u=u.parent),o.moved&&(o.moved=d!==u);let g=.5;if(u&&(g=l&&o.moved&&(p||!f)?d.rowIndex>u.rowIndex?-.5:.5:(o.y-u.rowTop-u.rowHeight/2)/u.rowHeight||0),!f&&l&&u&&o.moved&&rr(n)){const C=wE(a,o);C&&(g=d.rowIndex>C.rowIndex?-.5:.5,u=C,o.moved&&(o.moved=d!==u))}const m=this.nudger;m?.updateGroup(u,r),f&&!p&&m&&(!u||g>=.5&&u.rowIndex===s.pageBounds.getLastRow()?p=c:o.moved&&this.targetShouldBeParent(u,g,h)&&(m.groupThrottled&&(p=u),!r&&(!p||u&&!u.expanded&&u.childrenAfterSort?.length)&&m.startGroup(u)),p??(p=u?.parent??c));let v=!1;if(p){if(p===u&&p!==c){const C=p.expanded?dc(a,1,u):null;C?.parent===p?(u=C,g=-.5):v=!0}if(u&&!v){let C=u;for(;C&&C!==c&&C!==p;)u=C,C=C.parent}}o.target=u,o.newParent=p,o.moved&&(o.moved=d!==u);const w=g<0?"above":"below";return o.position=o.moved?v?"inside":w:"none",this.validateRowsDrop(o,f,w,i),t.changed||(t.changed=vE(e?.dropTarget,o)),o}newRowsDrop(e,t){const{beans:r,gos:i}=this,s=r.rowModel.rootNode,n=!!rr(i)&&i.get("rowDragManaged"),o=i.get("suppressMoveWhenRowDragging"),a=this.isFromThisGrid(e);let{rowNode:l,rowNodes:c}=e.dragItem;if(c||(c=l?[l]:[]),l||(l=c[0]),!l||!s)return null;const d=this.beans.dragAndDrop.isDropZoneWithinThisGrid(e);let u=!0;n&&(!c.length||this.shouldPreventRowMove()||(o||!a)&&!d)&&(u=!1);const h=a0(r,e).y,f=this.getOverNode(h);return{api:r.gridApi,context:r.gridOptions.context,draggingEvent:e,rowDragManaged:n,suppressMoveWhenRowDragging:o,sameGrid:a,withinGrid:d,rootNode:s,moved:l!==f,y:h,overNode:f,overIndex:f?.rowIndex??-1,position:"none",source:l,target:f??null,newParent:null,rows:c,allowed:u,highlight:!t&&n&&o&&(d||!a)}}validateRowsDrop(e,t,r,i){const{rowDragManaged:s,suppressMoveWhenRowDragging:n}=e;t||(e.newParent=null),n&&!e.moved&&(e.allowed=!1);const o=(!s||e.allowed)&&this.gos.get("isRowValidDropPosition");if(o){t&&e.newParent&&B0(e.rows,e.newParent)&&(e.newParent=null);const a=o(e);if(a){if("object"==typeof a){void 0!==a.rows&&(e.rows=a.rows??[]),t&&void 0!==a.newParent&&(e.newParent=a.newParent),void 0!==a.target&&(e.target=a.target),a.position&&(e.position=a.position),void 0!==a.allowed?e.allowed=a.allowed:s||(e.allowed=!0);const l=e.draggingEvent;a.changed&&l&&(l.changed=!0),!i&&void 0!==a.highlight&&(e.highlight=a.highlight)}}else e.allowed=!1}s&&(e.rows=this.filterRows(e)),t&&e.newParent&&B0(e.rows,e.newParent)&&(e.newParent=null),n&&(!e.rows.length||"none"===e.position)&&(e.allowed=!1),(!e.allowed||!e.newParent)&&"inside"===e.position&&(e.position=r)}targetShouldBeParent(e,t,r){if(t<-.25)return!1;if(t<.25)return!0;let n,o=e.rowIndex+1;const a=this.beans.rowModel;do{n=a.getRow(o++)}while(n?.footer);const l=e.childrenAfterGroup;if(n&&n.parent===e&&l?.length){const c=new Set(r);for(const d of l)if(null!==d.rowIndex&&!c.has(d))return!0}return!1}addRowDropZone(e){if(!e.getContainer())return void ne(55);const t=this.beans.dragAndDrop;if(t.findExternalZone(e.getContainer()))return void ne(56);const i={isInterestedIn:s=>2===s,getIconName:()=>"move",external:!0,...e.fromGrid?e:{getContainer:e.getContainer,onDragEnter:e.onDragEnter&&(s=>e.onDragEnter(this.rowDragEvent("rowDragEnter",s))),onDragLeave:e.onDragLeave&&(s=>e.onDragLeave(this.rowDragEvent("rowDragLeave",s))),onDragging:e.onDragging&&(s=>e.onDragging(this.rowDragEvent("rowDragMove",s))),onDragStop:e.onDragStop&&(s=>e.onDragStop(this.rowDragEvent("rowDragEnd",s))),onDragCancel:e.onDragCancel&&(s=>e.onDragCancel(this.rowDragEvent("rowDragCancel",s)))}};t.addDropTarget(i),this.addDestroyFunc(()=>t.removeDropTarget(i))}getRowDropZone(e){return{getContainer:this.getContainer.bind(this),onDragEnter:r=>{this.onDragEnter(r),e?.onDragEnter?.(this.rowDragEvent("rowDragEnter",r))},onDragLeave:r=>{this.onDragLeave(r),e?.onDragLeave?.(this.rowDragEvent("rowDragLeave",r))},onDragging:r=>{this.onDragging(r),e?.onDragging?.(this.rowDragEvent("rowDragMove",r))},onDragStop:r=>{this.onDragStop(r),e?.onDragStop?.(this.rowDragEvent("rowDragEnd",r))},onDragCancel:r=>{this.onDragCancel(r),e?.onDragCancel?.(this.rowDragEvent("rowDragCancel",r))},fromGrid:!0}}getOverNode(e){const{pageBounds:t,rowModel:r}=this.beans,s=e>t.getCurrentPagePixelRange().pageLastPixel?-1:r.getRowIndexAtPixel(e);return s>=0?r.getRow(s):void 0}rowDragEvent(e,t){const r=this.beans,{dragItem:i,dropTarget:s,event:n,vDirection:o}=t,a=s?.rootNode===r.rowModel.rootNode,l=a?s.y:a0(r,t).y,c=a?s.overNode:this.getOverNode(l);return{api:r.gridApi,context:r.gridOptions.context,type:e,event:n,node:i.rowNode,nodes:i.rowNodes,overIndex:a?s.overIndex:c?.rowIndex??-1,overNode:c,y:l,vDirection:o,rowsDrop:s}}dispatchGridEvent(e,t){const r=this.rowDragEvent(e,t);this.eventSvc.dispatchEvent(r)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e)}onDragStop(e){const t=this.makeRowsDrop(this.lastDraggingEvent,e,!1,!0);this.dispatchGridEvent("rowDragEnd",e),t?.allowed&&t.rowDragManaged&&(t.suppressMoveWhenRowDragging||!t.sameGrid||this.nudger?.autoScroll.scrolling)&&this.dropRows(t),this.stopDragging(e)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e)}stopDragging(e){this.nudger?.clear(),this.beans.rowDropHighlightSvc?.fromDrag(null),H0(e.dragItem.rowNodes,!1)}dropRows(e){return e.sameGrid?this.csrmMoveRows(e):this.csrmAddRows(e)}csrmAddRows({position:e,target:t,rows:r}){const i=Co(this.gos),s=this.beans.rowModel,n=r.filter(({data:a,rowPinned:l})=>!s.getRowNode(i?.({data:a,level:0,rowPinned:l})??a.id)).map(({data:a})=>a);if(0===n.length)return!1;const o=t?N0(t)+("above"===e?0:1):void 0;return s.updateRowData({add:n,addIndex:o}),!0}filterRows({newParent:e,rows:t}){let r;for(let i=0,s=t.length;i<s;++i){let n=!0;const o=t[i];(!o||o.footer||null===o.rowTop&&o!==this.beans.rowModel.getRowNode(o.id)||e&&o.parent!==e&&mE(o,e)||!Hu(o))&&(n=!1),n?r?.push(o):r??(r=t.slice(0,i))}return r??t}csrmMoveRows({position:e,target:t,rows:r,newParent:i,rootNode:s}){let n=!1;const o=new Set;for(const h of r){i&&h.parent!==i&&(h.treeParent=i,n=!0);const f=Hu(h);f&&o.add(f)}if(!n&&0===o.size)return!1;const a=this.beans.focusSvc,l=a.getFocusedCell(),c=l&&Do(this.beans,l);if(o.size&&this.reorderLeafChildren(o,...this.getMoveRowsBounds(o,t,"above"===e))&&(n=!0),!n)return!1;const d=this.beans.rowModel,u=new lc;return u.reordered=!0,d.refreshModel({step:"group",keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedPath:new Ta(!1,s),changedRowNodes:u}),c?c.focusCell():a.clearFocusedCell(),!0}getMoveRowsBounds(e,t,r){const i=this.beans.rowModel.rootNode?._leafs?.length??0;let s=t?N0(t):-1;s<0||s>=i?s=i:r||++s;let n=s,o=Math.min(s,i-1);for(const a of e){const l=a.sourceRowIndex;l<n&&(n=l),l>o&&(o=l)}return[n,s,o]}reorderLeafChildren(e,t,r,i){let s=!1;const n=this.beans.rowModel.rootNode?._leafs;if(!e.size||!n)return!1;let o=t;for(let l=t;l<r;++l){const c=n[l];e.has(c)||(c.sourceRowIndex!==o&&(c.sourceRowIndex=o,n[o]=c,s=!0),++o)}let a=i;for(let l=i;l>=r;--l){const c=n[l];e.has(c)||(c.sourceRowIndex!==a&&(c.sourceRowIndex=a,n[a]=c,s=!0),--a)}for(const l of e)l.sourceRowIndex!==o&&(l.sourceRowIndex=o,n[o]=l,s=!0),++o;return s}},dc=(e,t,r)=>{if(r){const i=e.getRowCount();let s=r.rowIndex+t;for(;s>=0&&s<i;){const n=e.getRow(s);if(!n||!n.footer&&!n.detail)return n;s+=t}}},mE=(e,t)=>{let r=t;for(;r;){if(r===e)return!0;r=r.parent}return!1},B0=(e,t)=>{for(let r=0,i=e.length;r<i;++r)if(e[r].parent!==t)return!1;return!0},N0=e=>{const t=Hu(e);return void 0!==t?t.sourceRowIndex:-1},Hu=e=>e.data?e:Gp(e.childrenAfterGroup),vE=(e,t)=>!(e===t||e&&e.sameGrid===t.sameGrid&&e.allowed===t.allowed&&e.position===t.position&&e.target===t.target&&e.source===t.source&&e.newParent===t.newParent&&qs(e.rows,t.rows)),CE=({rowIndex:e},{rowIndex:t})=>null!==e&&null!==t?e-t:0,H0=(e,t)=>{for(let r=0,i=e?.length||0;r<i;++r){const s=e[r];s.dragging!==t&&(s.dragging=t,s.dispatchRowEvent("draggingChanged"))}},wE=(e,t)=>{let r=null,i=t.target;if(i&&t.rows.indexOf(i)<0)return null;const s=t.source;if(!i||!s)return null;let n=i.rowIndex-s.rowIndex;const o=n<0?-1:1;n=t.suppressMoveWhenRowDragging?Math.abs(n):1;const a=new Set(t.rows);do{const l=dc(e,o,i);if(!l)break;a.has(l)||(r=l,--n),i=l}while(n>0);return r},G0={moduleName:"Drag",version:he,beans:[class extends vb{shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(e)}}]},bE={moduleName:"DragAndDrop",version:he,dynamicBeans:{dndSourceComp:class extends ft{constructor(e,t,r){super(Y3),this.rowNode=e,this.column=t,this.eCell=r}postConstruct(){this.getGui().appendChild(Ti("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:r,eCell:i,gos:s}=this,n=r.getColDef().dndSourceOnRowDrag,o=e.dataTransfer;if(o.setDragImage(i,0,0),n)n(_e(s,{rowNode:t,dragEvent:e}));else try{const a=JSON.stringify(t.data);o.setData("application/json",a),o.setData("text/plain",a)}catch{}}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}}},icons:{rowDrag:"grip"}},V0={moduleName:"SharedDragAndDrop",version:he,beans:[class extends Cb{createEvent(e){return _e(this.gos,e)}createDragImageComp(e){const{gos:t,beans:r}=this;return function GS(e,t){return e.getCompDetailsFromGridOptions(bS,"agDragAndDropImage",t,!0)}(r.userCompFactory,_e(t,{dragSource:e}))?.newAgStackInstance()}handleEnter(e,t){e?.onGridEnter?.(t)}handleExit(e,t){e?.onGridExit?.(t)}warnNoBody(){ne(54)}isDropZoneWithinThisGrid(e){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(e.dropZoneTarget)}registerGridDropTarget(e,t){const r={getContainer:e,isInterestedIn:i=>1===i||0===i,getIconName:()=>"notAllowed"};this.addDropTarget(r),t.addDestroyFunc(()=>this.removeDropTarget(r))}}],dependsOn:[G0],userComponents:{agDragAndDropImage:class extends ft{constructor(){super(),this.dragSource=null,this.eIcon=ge,this.eLabel=ge,this.eGhost=ge,this.registerCSS(".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}.ag-dnd-ghost-not-allowed{border:var(--ag-drag-and-drop-image-not-allowed-border)}")}postConstruct(){const e=t=>function Xy(e,t,r){const i=Ti(e,t,r);if(i){const{className:n}=i;if("string"==typeof n&&n.includes("ag-icon")||"object"==typeof n&&n["ag-icon"])return i}const s=nr({tag:"span"});return s.appendChild(i),s}(t,this.beans,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(Qy),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eGhost:r,eIcon:i,dragSource:s,dropIconMap:n,gos:o}=this;Rt(i);let a=null;e||(e=s?.getDefaultIconName?s.getDefaultIconName():"notAllowed"),a=n[e],r.classList.toggle("ag-dnd-ghost-not-allowed","notAllowed"===e),i.classList.toggle("ag-shake-left-to-right",t),(a!==n.hide||!o.get("suppressDragLeaveHidesColumns"))&&a&&i.appendChild(a)}setLabel(e){this.eLabel.textContent=e}}},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},yE={moduleName:"RowDrag",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="rowDropHighlightSvc",this.uiLevel=0,this.dragging=!1,this.row=null,this.position="none"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this)})}onModelUpdated(){const e=this.row,t=this.dragging;e&&null!==e?.rowIndex&&"none"!==this.position?this.set(e,this.position):this.clear(),this.dragging=t}destroy(){this.clear(),super.destroy()}clear(){const e=this.row;this.dragging=!1,e&&(this.uiLevel=0,this.position="none",this.row=null,e.dispatchRowEvent("rowHighlightChanged"))}set(e,t){const r=e!==this.row,i=e.uiLevel,s=t!==this.position,n=i!==this.uiLevel;this.dragging=!1,(r||s||n)&&(r&&this.clear(),this.uiLevel=i,this.position=t,this.row=e,e.dispatchRowEvent("rowHighlightChanged"))}fromDrag(e){const t=e?.dropTarget;if(t){const{highlight:r,target:i,position:s}=t;if(r&&i&&"none"!==s)return this.set(i,s),void(this.dragging=!0)}this.dragging&&this.clear()}},class extends Q{constructor(){super(...arguments),this.beanName="rowDragSvc"}setupRowDrag(e,t){const r=t.createManagedBean(new pE(e)),i=this.beans.dragAndDrop;i.addDropTarget(r),t.addDestroyFunc(()=>i.removeDropTarget(r)),this.rowDragFeature=r}createRowDragComp(e,t,r,i,s,n){return new oE(e,t,r,i,s,n)}createRowDragCompForRow(e,t){if(xs(this.gos))return;const r=this.getLocaleTextFunc();return this.createRowDragComp(()=>`1 ${r("rowDragRow","row")}`,e,void 0,t,void 0,!0)}createRowDragCompForCell(e,t,r,i,s,n){const o=this.gos;return!o.get("rowDragManaged")||rr(o)&&!o.get("pagination")?this.createRowDragComp(r,e,t,i,s,n):void 0}}],apiFunctions:{addRowDropZone:function J3(e,t){e.rowDragSvc?.rowDragFeature?.addRowDropZone(t)},removeRowDropZone:function Z3(e,t){const r=e.dragAndDrop?.findExternalZone(t.getContainer());r&&e.dragAndDrop?.removeDropTarget(r)},getRowDropZoneParams:function eE(e,t){return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t)},getRowDropPositionIndicator:function tE(e){const t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:"none"}},setRowDropPositionIndicator:function rE(e,t){const r=e.rowDropHighlightSvc;if(!r)return;const i=t?.row;let s=t?.dropIndicatorPosition;"above"!==s&&"below"!==s&&"inside"!==s&&(s="none");const n=i?.rowIndex;null==n||"none"===s?r.clear():r.set(i,s)}},dependsOn:[V0]},EE={moduleName:"HorizontalResize",version:he,beans:[class extends Q{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:r}=this.beans;return r.addDragSource(t),()=>r.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const r=t instanceof MouseEvent&&!0===t.shiftKey;e.onResizeStart(r)}setResizeIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(1),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}}],dependsOn:[G0]},PE=class extends Q{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;if(t)for(const r of t)r.isPrimary()&&(r.isAnyFunctionActive()||(r.isAllowValue()?this.columnsToAggregate.push(r):r.isAllowRowGroup()?this.columnsToGroup.push(r):r.isAllowPivot()&&this.columnsToPivot.push(r)))}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:r,pivotColsSvc:i}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&r?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&i?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function z0(e){const{isFromHeader:t,fromLeft:r,xPosition:i,fromEnter:s,fakeEvent:n,pinned:o,gos:a,colModel:l,colMoves:c,visibleCols:d}=e;let{allMovingColumns:u}=e;t&&(u=function AE(e){const t=[...e];for(const r of e){let i=null,s=r.getParent();for(;null!=s&&1===s.getDisplayedLeafColumns().length;)i=s,s=s.getParent();if(null!=i){const o=i.getColGroupDef()?.marryChildren?i.getProvidedColumnGroup().getLeafColumns():i.getLeafColumns();for(const a of o)t.includes(a)||t.push(a)}}return t}(u));const h=u.slice();!function DE(e,t){!t||t.length<=1||t.filter(i=>e.indexOf(i)<0).length>0||t.sort((i,s)=>e.indexOf(i)-e.indexOf(s))}(l.getCols(),h);const f=function OE(e){const{movingCols:t,draggingRight:r,xPosition:i,pinned:s,gos:n,colModel:o,visibleCols:a}=e;if(n.get("suppressMovableColumns")||t.some(C=>C.getColDef().suppressMovable))return[];const c=function LE(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}(a,s),d=o.getCols(),u=c.filter(C=>t.includes(C)),h=c.filter(C=>!t.includes(C)),f=d.filter(C=>!t.includes(C));let m,p=0,g=i;if(r){let C=0;for(const y of u)C+=y.getActualWidth();g-=C}if(g>0){for(let C=0;C<h.length&&(g-=h[C].getActualWidth(),!(g<0));C++)p++;r&&p++}p>0?m=f.indexOf(h[p-1])+1:(m=f.indexOf(h[0]),-1===m&&(m=0));const v=[m],w=(C,y)=>C-y;if(r){let C=m+1;const y=d.length-1;for(;C<=y;)v.push(C),C++;v.sort(w)}else{let C=m;const y=d.length-1;let k=d[C];for(;C<=y&&c.indexOf(k)<0;)C++,v.push(C),k=d[C];C=m-1;const E=0;for(;C>=E;)v.push(C),C--;v.sort(w).reverse()}return v}({movingCols:h,draggingRight:r,xPosition:i,pinned:o,gos:a,colModel:l,visibleCols:d}),p=function IE(e,t){const r=t.getCols(),i=e.map(l=>r.indexOf(l)).sort((l,c)=>l-c),s=i[0];return kt(i)-s!==i.length-1?null:s}(h,l);if(0===f.length)return;const g=f[0];if(null!==p&&(t||!s)&&!n&&(!r&&g>=p||r&&g<=p))return;const v=function ME(e,t,r,i){const s=i.allCols;let n=null,o=null;for(let a=0;a<e.length;a++){const l=e[a],c=r.getProposedColumnOrder(t,l);if(!r.doesOrderPassRules(c))continue;const d=c.filter(h=>s.includes(h));if(null===o)o=d;else if(!qs(d,o))break;const u=_E(c);(null===n||u<n.fragCount)&&(n={move:l,fragCount:u})}return n}(f,h,c,d);if(!v)return;const w=v.move;return w>l.getCols().length-h.length?void 0:{columns:h,toIndex:w}}function W0(e){const{columns:t,toIndex:r}=z0(e)||{},{finished:i,colMoves:s}=e;return t&&null!=r?(s.moveColumns(t,r,"uiColumnMoved",i),i?null:{columns:t,toIndex:r}):null}function _E(e){function t(i){const s=[];let n=i.getOriginalParent();for(;null!=n;)s.push(n),n=n.getOriginalParent();return s}let r=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];for(const o of s)-1===n.indexOf(o)&&r++}return r}function Gu(e){const{pinned:t,fromKeyboard:r,gos:i,ctrlsSvc:s,useHeaderRow:n,skipScrollPadding:o}=e;let a=s.getHeaderRowContainerCtrl(t)?.eViewport,{x:l}=e;return a?(r&&(l-=a.getBoundingClientRect().left),i.get("enableRtl")&&(n&&(a=a.querySelector(".ag-header-row")),l=a.clientWidth-l),null==t&&!o&&(l+=s.get("center").getCenterViewportScrollLeft()),l):0}function Vu(e,t){for(const r of e)r.moving=t,r.dispatchColEvent("movingChanged","uiColumnMoved")}var HE=class extends Q{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!le(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,{dragItem:r}=t||{},i=r?.columns??[];for(const s of i){const n=s.getPinned();if(s.getColDef().lockPinned){if(n==e)return"move";continue}const o=r?.containerType;if(o===e||!e)return"move";if(e&&(!n||o!==e))return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem,r=t.columns;if(0===e.dragSource.type)this.setColumnsVisible(r,!0,"uiColumnDragged");else{const s=t.visibleState,n=(r||[]).filter(o=>s[o.getId()]&&!o.isVisible());this.setColumnsVisible(n,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(r,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,r=!1,i=!1){const{gos:s,ctrlsSvc:n}=this.beans,o=s.get("suppressMoveWhenColumnDragging");if(i&&!o)return void this.finishColumnMoving();if(this.lastDraggingEvent=e,!e||!i&&pt(e.hDirection))return;const a=Gu({x:e.x,pinned:this.pinned,gos:s,ctrlsSvc:n});t||this.checkCenterForScrolling(a),o?this.handleColumnDragWhileSuppressingMovement(e,t,r,a,i):this.handleColumnDragWhileAllowingMovement(e,t,r,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,r){if(!e?.length)return;const i=e.filter(s=>!s.getColDef().lockVisible);i.length&&this.beans.colModel.setColsVisible(i,t,r)}finishColumnMoving(){this.clearHighlighted();const e=this.lastMovedInfo;if(!e)return;const{columns:t,toIndex:r}=e;this.beans.colMoves.moveColumns(t,r,"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,r,i,s){const n=this.getAllMovingColumns(e,!0);if(s){const o=this.isAttemptingToPin(n);o&&this.attemptToPinColumns(n,void 0,!0);const{fromLeft:a,xPosition:l}=this.getNormalisedXPositionInfo(n,o)||{};if(null==a||null==l)return void this.finishColumnMoving();this.moveColumnsAfterHighlight({allMovingColumns:n,xPosition:l,fromEnter:t,fakeEvent:r,fromLeft:a})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(n,i)}}handleColumnDragWhileAllowingMovement(e,t,r,i,s){const n=this.getAllMovingColumns(e),o="right"===this.normaliseDirection(e.hDirection),c=W0({...this.getMoveColumnParams({allMovingColumns:n,isFromHeader:1===e.dragSource.type,xPosition:i,fromLeft:o,fromEnter:t,fakeEvent:r}),finished:s});c&&(this.lastMovedInfo=c)}getAllMovingColumns(e,t=!1){const r=e.dragSource.getDragItem();let i=null;return t?(i=r.columnsInSplit,i||(i=r.columns)):i=r.columns,i?i.filter(n=>!n.getColDef().lockPinned||n.getPinned()==this.pinned):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:r,xPosition:i,fromLeft:s,fromEnter:n,fakeEvent:o}=e,{gos:a,colModel:l,colMoves:c,visibleCols:d}=this.beans;return{allMovingColumns:t,isFromHeader:r,fromLeft:s,xPosition:i,pinned:this.pinned,fromEnter:n,fakeEvent:o,gos:a,colModel:l,colMoves:c,visibleCols:d}}highlightHoveredColumn(e,t){const{gos:r,colModel:i}=this.beans,s=r.get("enableRtl"),n=i.getCols().filter(d=>d.isVisible()&&d.getPinned()===this.pinned);let c,o=null,a=null,l=null;for(const d of n){if(a=d.getActualWidth(),o=this.getNormalisedColumnLeft(d,0,s),null!=o&&o<=t&&o+a>=t){l=d;break}o=null,a=null}if(l)-1!==e.indexOf(l)&&(l=null);else{for(let d=n.length-1;d>=0;d--){const u=n[d],h=n[d].getParent();if(!h){l=u;break}const f=h?.getDisplayedLeafColumns();if(f.length){l=kt(f);break}}if(!l)return;o=this.getNormalisedColumnLeft(l,0,s),a=l.getActualWidth()}this.lastHighlightedColumn?.column!==l&&this.clearHighlighted(),null!=l&&null!=o&&null!=a&&(c=t-o<a/2!==s?0:1,$0(l,c),this.lastHighlightedColumn={column:l,position:c})}getNormalisedXPositionInfo(e,t){const{gos:r,visibleCols:i}=this.beans,s=r.get("enableRtl"),{firstMovingCol:n,column:o,position:a}=this.getColumnMoveAndTargetInfo(e,t,s);if(!n||!o||null==a)return;const l=i.allCols,c=l.indexOf(n),d=l.indexOf(o),u=0===a!==s,h=c<d||c===d&&!u;let f=0;if(u?h&&(f-=1):h||(f+=1),d+f===c)return;const p=l[d+f];return p?{fromLeft:h,xPosition:this.getNormalisedColumnLeft(p,20,s)}:void 0}getColumnMoveAndTargetInfo(e,t,r){const i=this.lastHighlightedColumn||{},{firstMovingCol:s,lastMovingCol:n}=function GE(e){const t=e.length;let r,i;for(let s=0;s<t;s++){if(!r){const n=e[s];null!=n.getLeft()&&(r=n)}if(!i){const n=e[t-1-s];null!=n.getLeft()&&(i=n)}if(r&&i)break}return{firstMovingCol:r,lastMovingCol:i}}(e);if(!s||!n||i.column||!t)return{firstMovingCol:s,...i};const a="left"===this.getPinDirection();return{firstMovingCol:s,position:a?1:0,column:a!==r?s:n}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case"left":return"right";case"right":return"left"}return e}getNormalisedColumnLeft(e,t,r){const{gos:i,ctrlsSvc:s}=this.beans,n=e.getLeft();if(null==n)return null;const o=e.getActualWidth();return Gu({x:r?n+o-t:n+t,pinned:e.getPinned(),useHeaderRow:r,skipScrollPadding:!0,gos:i,ctrlsSvc:s})}isAttemptingToPin(e){return(this.needToMoveLeft||this.needToMoveRight)&&this.failedMoveAttempts>7||e.some(i=>i.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:r,fromEnter:i,fakeEvent:s,fromLeft:n}=e,o=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:r,fromLeft:n,fromEnter:i,fakeEvent:s}),{columns:a,toIndex:l}=z0(o)||{};a&&null!=l&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&($0(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.beans.ctrlsSvc.get("center"),r=t.getCenterViewportScrollLeft(),i=r+t.getCenterWidth();let s,n;this.gos.get("enableRtl")?(s=e<r+50,n=e>i-50):(n=e<r+50,s=e>i-50),this.needToMoveRight=s,this.needToMoveLeft=n,n||s?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.beans.dragAndDrop.setDragImageCompIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.setDragImageCompIcon(this.getIconName()))}moveInterval(){let e;this.intervalCount++,e=10+5*this.intervalCount,e>100&&(e=100);let t=null;const r=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=r.scrollHorizontally(-e):this.needToMoveRight&&(t=r.scrollHorizontally(e)),0!==t)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{pinnedCols:i,dragAndDrop:s,gos:n}=this.beans;if(this.failedMoveAttempts<=8||!i)return;if(s.setDragImageCompIcon("pinned"),!n.get("suppressMoveWhenColumnDragging")){const o=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(o,void 0,!0)}}}getPinDirection(){return this.needToMoveLeft||"left"===this.pinned?"left":this.needToMoveRight||"right"===this.pinned?"right":void 0}attemptToPinColumns(e,t,r=!1){const i=(e||[]).filter(o=>!o.getColDef().lockPinned);if(!i.length)return 0;r&&(t=this.getPinDirection());const{pinnedCols:s,dragAndDrop:n}=this.beans;return s?.setColsPinned(i,t,"uiColumnDragged"),r&&n.nudge(),i.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function $0(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}var VE=class extends Q{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans,r=this.pinned;e.whenReady(this,i=>{let s;const n=i.gridBodyCtrl.eBodyViewport;switch(r){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]]}this.eSecondaryContainers=s}),this.moveColumnFeature=this.createManagedBean(new HE(r)),this.bodyDropPivotTarget=this.createManagedBean(new PE(r)),t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return 1===e||0===e&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.beans.colModel.isPivotMode()&&0===e.dragSource.type}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}onDragCancel(){this.currentDropListener.onDragCancel()}},jE={moduleName:"ColumnMove",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,r){const i=this.beans.colModel.getCols();i&&this.moveColumns([i[e]],t,r)}moveColumns(e,t,r,i=!0){const{colModel:s,colAnimation:n,visibleCols:o,eventSvc:a}=this.beans,l=s.getCols();if(!l)return;if(t>l.length-e.length)return void ne(30,{toIndex:t});n?.start();const c=s.getColsForKeys(e);this.doesMovePassRules(c,t)&&(Ug(s.getCols(),c,t),o.refresh(r),a.dispatchEvent({type:"columnMoved",columns:c,column:1===c.length?c[0]:null,toIndex:t,finished:i,source:r})),n?.finish()}doesMovePassRules(e,t){const r=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(r)}doesOrderPassRules(e){const{colModel:t,gos:r}=this.beans;return!(!Zg(e,t.getColTree())||!(s=>{const n=c=>c?"left"===c||!0===c?-1:1:0,o=r.get("enableRtl");let a=o?1:-1,l=!0;for(const c of s){const d=n(c.getColDef().lockPosition);o?d>a&&(l=!1):d<a&&(l=!1),a=d}return l})(e))}getProposedColumnOrder(e,t){const i=this.beans.colModel.getCols().slice();return Ug(i,e,t),i}createBodyDropTarget(e,t){return new VE(e,t)}moveHeader(e,t,r,i,s){const{ctrlsSvc:n,gos:o,colModel:a,visibleCols:l,focusSvc:c}=this.beans,d=t.getBoundingClientRect(),u=d.left,h=sr(r),f=h?d.width:r.getActualWidth(),p="left"===e!==o.get("enableRtl"),g=Gu({x:p?u-20:u+f+20,pinned:i,fromKeyboard:!0,gos:o,ctrlsSvc:n}),m=c.focusedHeader;let v;if(W0({allMovingColumns:h?r.getLeafColumns():[r],isFromHeader:!0,fromLeft:"right"===e,xPosition:g,pinned:i,fromEnter:!1,fakeEvent:!1,gos:o,colModel:a,colMoves:this,visibleCols:l,finished:!0}),h){const w=r.getDisplayedLeafColumns();v=p?w[0]:kt(w)}else v=r;if(n.getScrollFeature().ensureColumnVisible(v,"auto"),(!s.isAlive()||o.get("ensureDomOrder"))&&m){let w;if(h){const C=r.getGroupId(),y=r.getLeafColumns();if(!y.length)return;const k=y[0].getParent();if(!k)return;w=function WE(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}(k,C)}else w=r;w&&c.focusHeaderPosition({headerPosition:{...m,column:w}})}}setDragSourceForHeader(e,t,r){const{gos:i,colModel:s,dragAndDrop:n,visibleCols:o}=this.beans;let a=!i.get("suppressDragLeaveHidesColumns");const l=sr(t),c=l?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:l?()=>function $E(e,t){const r=e.getProvidedColumnGroup().getLeafColumns(),i={};for(const a of r)i[a.getId()]=a.isVisible();const s=[];for(const a of t)r.indexOf(a)>=0&&(s.push(a),ki(r,a));for(const a of r)s.push(a);const n=[],o=e.getLeafColumns();for(const a of s)-1!==o.indexOf(a)&&n.push(a);return{columns:s,columnsInSplit:n,visibleState:i,containerType:n[0]?.pinned}}(t,o.allCols):()=>function UE(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}(t),dragItemName:r,onDragStarted:()=>{a=!i.get("suppressDragLeaveHidesColumns"),Vu(c,!0)},onDragStopped:()=>Vu(c,!1),onDragCancelled:()=>Vu(c,!1),onGridEnter:h=>{if(a){const{columns:f=[],visibleState:p}=h??{},g=l?v=>!p||p[v.getColId()]:()=>!0,m=f.filter(v=>!v.getColDef().lockVisible&&g(v));s.setColsVisible(m,!0,"uiColumnMoved")}},onGridExit:h=>{if(a){const f=h?.columns?.filter(p=>!p.getColDef().lockVisible)||[];s.setColsVisible(f,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}},class extends Q{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:r,executeLaterFuncs:i}=this;if(0===r.length&&0===i.length)return e(),void t();const s=n=>{for(;n.length;){const o=n.pop();o&&o()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),s(r)},0),window.setTimeout(()=>{t(),s(i)},200)})}}],apiFunctions:{moveColumnByIndex:function kE(e,t,r){e.colMoves?.moveColumnByIndex(t,r,"api")},moveColumns:function TE(e,t,r){e.colMoves?.moveColumns(t,r,"api")}},dependsOn:[V0],css:[":where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}"]},j0={moduleName:"AutoWidth",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){const r=this.getHeaderCellForColumn(e);if(!r)return-1;const i=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||i.push(r),this.getPreferredWidthForElements(i)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){const r=document.createElement("form");r.style.position="fixed";const i=this.centerRowContainerCtrl.eContainer;for(const n of e)this.cloneItemIntoDummy(n,r);i.appendChild(r);const s=r.offsetWidth;return r.remove(),s+(t??this.gos.get("autoSizePadding"))}getHeaderCellForColumn(e){let t=null;for(const r of this.beans.ctrlsSvc.getHeaderRowContainerCtrls()){const i=r.getHtmlElementForColumnHeader(e);null!=i&&(t=i)}return t}cloneItemIntoDummy(e,t){const r=e.cloneNode(!0);r.style.width="",r.style.position="static",r.style.left="";const i=document.createElement("div"),s=i.classList;["ag-header-cell","ag-header-group-cell"].some(a=>r.classList.contains(a))?(s.add("ag-header","ag-header-row"),i.style.position="static"):s.add("ag-row");let o=e.parentElement;for(;o;){if(["ag-header-row","ag-row"].some(l=>o.classList.contains(l))){for(let l=0;l<o.classList.length;l++){const c=o.classList[l];"ag-row-position-absolute"!=c&&s.add(c)}break}o=o.parentElement}i.appendChild(r),t.appendChild(i)}}]},XE=class extends Q{constructor(e,t,r,i){super(),this.comp=e,this.eResize=t,this.pinned=r,this.columnGroup=i}postConstruct(){if(!this.columnGroup.isResizable())return void this.comp.setResizableDisplayed(!1);const{horizontalResizeSvc:e,gos:t,colAutosize:r}=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")&&r&&this.addDestroyFunc(r.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:r,resizeRatios:i,groupAfterColumns:s,groupAfterStartWidth:n,groupAfterRatios:o}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=r,this.resizeRatios=i,this.resizeTakeFromCols=s,this.resizeTakeFromStartWidth=n,this.resizeTakeFromRatios=o,this.toggleColumnResizing(!0)}onResizing(e,t,r="uiColumnResized"){const i=this.normaliseDragChange(t);this.resizeColumnsFromLocalValues(this.resizeStartWidth+i,r,e)}getInitialValues(e){const t=l=>l.reduce((c,d)=>c+d.getActualWidth(),0),r=(l,c)=>l.map(d=>d.getActualWidth()/c),i=this.getColumnsToResize(),s=t(i),o={columnsToResize:i,resizeStartWidth:s,resizeRatios:r(i,s)};let a=null;if(e&&(a=this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup,"After")??null),a){const l=a.getDisplayedLeafColumns(),c=o.groupAfterColumns=l.filter(u=>u.isResizable()),d=o.groupAfterStartWidth=t(c);o.groupAfterRatios=r(c,d)}else o.groupAfterColumns=void 0,o.groupAfterStartWidth=void 0,o.groupAfterRatios=void 0;return o}resizeLeafColumnsToFit(e){const t=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),r=this.getInitialValues();t>r.resizeStartWidth&&this.resizeColumns(r,t,e,!0)}resizeColumnsFromLocalValues(e,t,r=!0){this.resizeCols&&this.resizeRatios&&this.resizeColumns({columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios},e,t,r)}resizeColumns(e,t,r,i=!0){const{columnsToResize:s,resizeStartWidth:n,resizeRatios:o,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:c}=e,d=[];d.push({columns:s,ratios:o,width:t}),a&&d.push({columns:a,ratios:c,width:l-(t-n)}),this.beans.colResize?.resizeColumnSets({resizeSets:d,finished:i,source:r}),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")?"left"!==this.pinned&&(t*=-1):"right"===this.pinned&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},YE=class extends Q{constructor(e,t,r,i,s){super(),this.pinned=e,this.column=t,this.eResize=r,this.comp=i,this.ctrl=s}postConstruct(){const e=[];let t,r;const i=()=>{if(at(this.eResize,t),!t)return;const{horizontalResizeSvc:o,colAutosize:a}=this.beans,l=o.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(l),r&&a&&e.push(a.addColumnAutosizeListeners(this.eResize,this.column))},s=()=>{for(const o of e)o();e.length=0},n=()=>{const o=this.column.isResizable(),a=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(o!==t||a!==r)&&(t=o,r=a,s(),i())};n(),this.addDestroyFunc(s),this.ctrl.setRefreshFunction("resize",n)}onResizing(e,t){const{column:r,lastResizeAmount:i,resizeStartWidth:s,beans:n}=this,o=this.normaliseResizeAmount(t),l=[{key:r,newWidth:s+o}],{pinnedCols:c,ctrlsSvc:d,colResize:u}=n;this.column.getPinned()&&(c?.leftWidth??0)+(c?.rightWidth??0)+(o-i)>Ut(d.getGridBodyCtrl().eBodyViewport)-50||(this.lastResizeAmount=o,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 r="left"!==this.pinned,i="right"===this.pinned;return this.gos.get("enableRtl")?r&&(t*=-1):i&&(t*=-1),t}},ZE={moduleName:"ColumnResize",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,r,i){const s=[],{colModel:n,gos:o,visibleCols:a}=this.beans;for(const l of e){const c=n.getColDefCol(l.key)||n.getCol(l.key);if(c&&(s.push({width:l.newWidth,ratios:[1],columns:[c]}),"shift"===o.get("colResizeDefault")&&(t=!t),t)){const u=a.getColAfter(c);if(!u)continue;const h=c.getActualWidth()-l.newWidth,f=u.getActualWidth()+h;s.push({width:f,ratios:[1],columns:[u]})}}0!==s.length&&this.resizeColumnSets({resizeSets:s,finished:r,source:i})}resizeColumnSets(e){const{resizeSets:t,finished:r,source:i}=e;if(t&&!t.every(d=>function JE(e){const{columns:t,width:r}=e;let i=0,s=0,n=!0;for(const l of t){i+=l.getMinWidth()||0;const d=l.getMaxWidth();d>0?s+=d:n=!1}return r>=i&&(!n||r<=s)}(d)))return void(r&&So(this.eventSvc,t&&t.length>0?t[0].columns:null,r,i));const n=[],o=[];for(const d of t){const{width:u,columns:h,ratios:f}=d,p={},g={};for(const w of h)o.push(w);let m=!0,v=0;for(;m;){if(v++,v>1e3){Ct(31);break}m=!1;const w=[];let C=0,y=u;h.forEach((E,S)=>{g[E.getId()]?y-=p[E.getId()]:(w.push(E),C+=f[S])});const k=1/C;w.forEach((E,S)=>{let M;S===w.length-1?M=y:(M=Math.round(f[S]*u*k),y-=M);const H=E.getMinWidth(),V=E.getMaxWidth();M<H?(M=H,g[E.getId()]=!0,m=!0):V>0&&M>V&&(M=V,g[E.getId()]=!0,m=!0),p[E.getId()]=M})}for(const w of h){const C=p[w.getId()];w.getActualWidth()!==C&&(w.setActualWidth(C,i),n.push(w))}}const a=n.length>0;let l=[];if(a){const{colFlex:d,visibleCols:u,colViewport:h}=this.beans;l=d?.refreshFlexedColumns({resizingCols:o,skipSetLeft:!0})??[],u.setLeftValues(i),u.updateBodyWidths(),h.checkViewportColumns()}const c=o.concat(l);(a||r)&&So(this.eventSvc,c,r,i,l)}resizeHeader(e,t,r){if(!e.isResizable())return;const i=e.getActualWidth(),s=e.getMinWidth(),n=e.getMaxWidth(),o=Math.min(Math.max(i+t,s),n);this.setColumnWidths([{key:e,newWidth:o}],r,!0,"uiColumnResized")}createResizeFeature(e,t,r,i,s){return new YE(e,t,r,i,s)}createGroupResizeFeature(e,t,r,i){return new XE(e,t,r,i)}}],apiFunctions:{setColumnWidths:function qE(e,t,r=!0,i="api"){e.colResize?.setColumnWidths(t,!1,r,i)}},dependsOn:[EE,j0]},eF=class extends Q{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);for(const t of this.columnGroup.getLeafColumns())t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)})}removeListenersOnChildrenColumns(){for(const e of this.removeChildListenersFuncs)e();this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.toggleCss("ag-hidden",0===e)}};function fF(e,t){for(let r=0;r<t.length;r++){const i=e.indexOf(t[r]);i>=0&&(e[i]=e[e.length-1],e.pop())}}function Nn(e,t,r){if(e)for(let i=0;i<e.length;i++){const s=e[i];sr(s)&&Nn(t?s.getDisplayedChildren():s.getChildren(),t,r),r(s)}}function Wu(e){const t=[];return Nn(e,!0,r=>{js(r)&&t.push(r)}),t}var mF={moduleName:"ColumnGroup",version:he,dynamicBeans:{headerGroupCellCtrl:class extends Du{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(e,t,r,i,s){const{column:n,beans:o}=this,{context:a,colNames:l,colHover:c,rangeSvc:d,colResize:u}=o;this.comp=e,s=Ca(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,f=n.getProvidedColumnGroup().getLeafColumns();c?.createHoverFeature(s,f,t),d?.createRangeHighlightFeature(s,n,e),s.createManagedBean(new Pu(n,t,o)),s.createManagedBean(new eF(e,n)),u?this.resizeFeature=s.createManagedBean(u.createGroupResizeFeature(e,r,h,n)):e.setResizableDisplayed(!1),s.createManagedBean(new To(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(s,f),s.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(s),s.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){const{column:e,beans:t}=this,r=e.getDefinition();return _e(t.gos,{colDef:r,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,r=e.get("groupHeaderHeight");null!=r?0===r?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(r):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const r of t)e.addManagedListeners(r,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,r)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),r=t[0]===e,i=kt(t)===e;if(!r&&!i)return;const s=e.getHighlighted();let o=!1,a=!1;if(this.rowCtrl.getHeaderCellCtrls().find(l=>l.column.isMoving())){const l=this.beans.gos.get("enableRtl"),c=1===s,d=0===s;r&&(l?a=c:o=d),i&&(l?o=d:a=c)}this.comp.toggleCss("ag-header-highlight-before",o),this.comp.toggleCss("ag-header-highlight-after",a)}resizeHeader(e,t){const{resizeFeature:r}=this;if(!r)return;const i=r.getInitialValues(t);r.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:r,enterpriseMenuFactory:i}=this.beans,s=this.column,n=s.getProvidedColumnGroup(),a=function WS(e,t){const r=t.columnGroup.getColGroupDef();return e.getCompDetails(r,RS,"agColumnGroupHeader",t)}(t,_e(r,{displayName:this.displayName,columnGroup:s,setExpanded:l=>{e.setColumnGroupOpened(n,l,"gridInitializing")},setTooltip:(l,c)=>{r.assertModuleRegistered("Tooltip",3),this.setupTooltip(l,c)},showColumnMenu:(l,c)=>i?.showMenuAfterButtonClick(n,l,"columnMenu",c),showColumnMenuAfterMouseClick:(l,c)=>i?.showMenuAfterMouseEvent(n,l,"columnMenu",c),eGridHeader:this.eGui}));a&&this.comp.setUserCompDetails(a)}addHeaderMouseListeners(e){const t=s=>this.handleMouseOverChange("mouseenter"===s.type);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column.getProvidedColumnGroup()),contextmenu:s=>this.handleContextMenuMouseEvent(s,void 0,this.column.getProvidedColumnGroup())})}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const r=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:r,expandableChanged:r})}refreshExpanded(){const{column:e}=this;this.expandable=e.isExpandable();const t=e.isExpanded();this.comp.setAriaExpanded(this.expandable?t?"true":"false":void 0),this.refreshHeaderStyles()}addClasses(){const{column:e}=this,t=e.getColGroupDef(),r=c0(t,this.gos,null,e);e.isPadding()?(r.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(s=>s.isSpanHeaderHeight())&&r.push("ag-header-span-height")):(r.push("ag-header-group-cell-with-group"),t?.wrapHeaderText&&r.push("ag-header-cell-wrap-text"));for(const i of r)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());for(const n of i)e.addManagedListeners(n,{movingChanged:s});s()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||this.focusThis()}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();if(this.expandable&&t&&"Enter"===e.key){const r=this.column,i=!r.isExpanded();this.beans.colGroupSvc.setColumnGroupOpened(r.getProvidedColumnGroup(),i,"uiColumnExpanded")}}setDragSource(e){!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null))}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some(e=>e.getColDef().suppressMovable||e.getColDef().lockPosition)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}}},beans:[class extends Q{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[];return is(null,this.beans.colModel.getColTree(),r=>{Br(r)&&e.push({groupId:r.getGroupId(),open:r.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const r=[];is(null,t,i=>{if(Br(i)){const s=i.getColGroupDef(),n={groupId:i.getGroupId(),open:s?s.openByDefault:void 0};r.push(n)}}),this.setColumnGroupState(r,e)}setColumnGroupState(e,t){const{colModel:r,colAnimation:i,visibleCols:s,eventSvc:n}=this.beans;if(!r.getColTree().length)return;i?.start();const a=[];for(const l of e){const d=l.open,u=this.getProvidedColGroup(l.groupId);u&&u.isExpanded()!==d&&(u.setExpanded(d),a.push(u))}s.refresh(t,!0),a.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:1===a.length?a[0]:void 0,columnGroups:a}),i?.finish()}setColumnGroupOpened(e,t,r){let i;i=Br(e)?e.getId():e||"",this.setColumnGroupState([{groupId:i,open:t}],r)}getProvidedColGroup(e){let t=null;return is(null,this.beans.colModel.getColTree(),r=>{Br(r)&&r.getId()===e&&(t=r)}),t}getGroupAtDirection(e,t){const r=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),i=e.getDisplayedLeafColumns(),s="After"===t?kt(i):i[0],n=`getCol${t}`;for(;;){const o=this.beans.visibleCols[n](s);if(!o)return null;const a=this.getColGroupAtLevel(o,r);if(a!==e)return a}}getColGroupAtLevel(e,t){let i,s,r=e.getParent();for(;i=r.getProvidedColumnGroup().getLevel(),s=r.getPaddingLevel(),!(i+s<=t);)r=r.getParent();return r}updateOpenClosedVisibility(){Nn(this.beans.visibleCols.getAllTrees(),!1,t=>{sr(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(sr(e))return e;const r=this.beans.visibleCols.getAllTrees(),i="number"==typeof t;let s=null;return Nn(r,!1,n=>{if(sr(n)){const o=n;let a;a=i?e===o.getGroupId()&&t===o.getPartId():e===o.getGroupId(),a&&(s=o)}}),s}createColumnGroups(e){const{columns:t,idCreator:r,pinned:i,oldDisplayedGroups:s,isStandaloneStructure:n}=e,o=this.mapOldGroupsById(s),a=[];let l=t;for(;l.length;){const c=l;l=[];let d=0;const u=h=>{const f=d;d=h;const p=c[f],m=(sr(p)?p.getProvidedColumnGroup():p).getOriginalParent();if(null==m){for(let w=f;w<h;w++)a.push(c[w]);return}const v=this.createColumnGroup(m,r,o,i,n);for(let w=f;w<h;w++)v.addChild(c[w]);l.push(v)};for(let h=1;h<c.length;h++){const f=c[h],g=(sr(f)?f.getProvidedColumnGroup():f).getOriginalParent(),m=c[d];g!==(sr(m)?m.getProvidedColumnGroup():m).getOriginalParent()&&u(h)}d<c.length&&u(c.length)}return n||this.setupParentsIntoCols(a,null),a}createProvidedColumnGroup(e,t,r,i,s,n,o){const a=s.getUniqueKey(t.groupId||null,null),l=Id(this.beans,t,a),c=new pa(l,a,!1,r);this.createBean(c);const d=this.findExistingGroup(t,n);d&&n.splice(d.idx,1);const u=d?.group;u&&c.setExpanded(u.isExpanded());const h=qg(this.beans,l.children,r+1,e,i,s,n,o);return c.setChildren(h),c}balanceColumnTree(e,t,r,i){const s=[];for(let n=0;n<e.length;n++){const o=e[n];if(Br(o)){const a=o,l=this.balanceColumnTree(a.getChildren(),t+1,r,i);a.setChildren(l),s.push(a)}else{let a,l;for(let c=t;c<r;c++){const d=i.getUniqueKey(null,null),u=Id(this.beans,null,d),h=new pa(u,d,!0,c);this.createBean(h),l&&l.setChildren([h]),l=h,a||(a=l)}if(a&&l){if(s.push(a),e.some(d=>Br(d))){l.setChildren([o]);continue}l.setChildren(e);break}s.push(o)}}return s}findDepth(e){let t=0,r=e;for(;r?.[0]&&Br(r[0]);)t++,r=r[0].getChildren();return t}findMaxDepth(e,t){let r=t;for(let i=0;i<e.length;i++){const s=e[i];if(Br(s)){const o=this.findMaxDepth(s.getChildren(),t+1);r<o&&(r=o)}}return r}balanceTreeForAutoCols(e,t){const r=[];for(const i of e){let s=i;for(let n=t-1;n>=0;n--){const o=new pa(null,`FAKE_PATH_${i.getId()}}_${n}`,!0,n);this.createBean(o),o.setChildren([s]),s.originalParent=o,s=o}0===t&&(i.originalParent=null),r.push(s)}return r}findExistingGroup(e,t){if(null!=e.groupId)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,r,i,s){const n=e.getGroupId(),o=t.getInstanceIdForKey(n);let l=r[Hp(n,o)];return l&&l.getProvidedColumnGroup()!==e&&(l=null),le(l)?l.reset():(l=new Sa(e,n,o,i),s||this.createBean(l)),l}mapOldGroupsById(e){const t={},r=i=>{for(const s of i)if(sr(s)){const n=s;t[s.getUniqueId()]=n,r(n.getChildren())}};return e&&r(e),t}setupParentsIntoCols(e,t){for(const r of e??[])if(r.parent!==t&&(this.beans.colViewport.colsWithinViewportHash=""),r.parent=t,sr(r)){const i=r;this.setupParentsIntoCols(i.getChildren(),i)}}}],apiFunctions:{getAllDisplayedColumnGroups:function hF(e){return e.visibleCols.getAllTrees()},getCenterDisplayedColumnGroups:function dF(e){return e.visibleCols.treeCenter},getColumnGroup:function iF(e,t,r){return e.colGroupSvc?.getColumnGroup(t,r)??null},getColumnGroupState:function oF(e){return e.colGroupSvc?.getColumnGroupState()??[]},getDisplayNameForColumnGroup:function nF(e,t,r){return e.colNames.getDisplayNameForColumnGroup(t,r)||""},getLeftDisplayedColumnGroups:function cF(e){return e.visibleCols.treeLeft},getProvidedColumnGroup:function sF(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null},getRightDisplayedColumnGroups:function uF(e){return e.visibleCols.treeRight},resetColumnGroupState:function lF(e){e.colGroupSvc?.resetColumnGroupState("api")},setColumnGroupOpened:function rF(e,t,r){e.colGroupSvc?.setColumnGroupOpened(t,r,"api")},setColumnGroupState:function aF(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}}},vF={tag:"div",cls:"ag-skeleton-container"},wF={moduleName:"CheckboxCellRenderer",version:he,userComponents:{agCheckboxCellRenderer:class extends ft{constructor(){super(e3,[eu]),this.eCheckbox=ge,this.registerCSS(".ag-checkbox-cell{height:100%}")}init(e){this.refresh(e);const{eCheckbox:t,beans:r}=this,i=t.getInputElement();i.setAttribute("tabindex","-1"),Te(i,"polite"),this.addManagedListeners(i,{click:s=>{if(Ln(s),t.isDisabled())return;const n=t.getValue();this.onCheckboxChanged(n)},dblclick:s=>{Ln(s)}}),this.addManagedElementListeners(e.eGridCell,{keydown:s=>{if(" "===s.key&&!t.isDisabled()){e.eGridCell===mt(r)&&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,r=!0;const{value:i,column:s,node:n}=e;if(n.group&&s)if("boolean"==typeof i)t=i;else{const u=s.getColId();u.startsWith(Xs)?t=null==i||""===i?void 0:"true"===i:n.aggData&&void 0!==n.aggData[u]||n.sourceRowIndex>=0?t=i??void 0:r=!1}else t=i??void 0;const{eCheckbox:o}=this;if(!r)return void o.setDisplayed(!1);o.setValue(t);const a=e.disabled??!s?.isCellEditable(n);o.setDisabled(a);const l=this.getLocaleTextFunc(),c=Me(l,t),d=a?c:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${c})`;o.setInputAriaLabel(d)}onCheckboxChanged(e){const{params:t}=this,{column:r,node:i,value:s}=t;this.beans?.editSvc?.setEditingCells([{column:r,colId:r.getColId(),rowIndex:i.rowIndex,rowPinned:i.rowPinned,state:"changed",oldValue:s,newValue:s}],{update:!0,forceRefreshOfEditCellsOnly:!0});const n=i.setDataValue(r,e,"renderer");this.beans.editSvc?.stopEditing({rowNode:i,column:r},{source:this.beans.editSvc?.isBatchEditing()?"ui":"api"}),n||this.updateCheckbox(t)}}}},xF={moduleName:"SkeletonCellRenderer",version:he,userComponents:{agSkeletonCellRenderer:class extends ft{constructor(){super(vF)}init(e){const t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>W(e.eParentOfValue)),W(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");z(this.getGui(),t)}setupLoading(e){const t=nr({tag:"div",cls:"ag-skeleton-effect"}),r=e.node.rowIndex;if(null!=r){const n=75+25*(r%2==0?Math.sin(r):Math.cos(r));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");z(this.getGui(),s)}refresh(e){return!1}}}};function Uu(e,t){if(!e)return;const r=e,i={};for(const s of Object.keys(r)){if(t&&t.indexOf(s)>=0||pg.has(s))continue;const n=r[s];i[s]="object"==typeof n&&null!==n&&n.constructor===Object?Uu(n):n}return i}function Pa(e,t,r){if(!t||!e)return;if(!r)return e[t];const i=t.split(".");let s=e;for(let n=0;n<i.length;n++){if(null==s)return;s=s[i[n]]}return s}var UF=["dateTimeString","dateString","text","number","boolean","date"];function K0(e,t){const r={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(r.columnTypes=[...Ol(e.columnTypes),...Ol(t.columnTypes)]),r}function q0(e,t,r){return t?t.baseDataType===e.baseDataType||(ne(46),!1):(ne(45,{parentCellDataType:r}),!1)}function X0(e,t){if(e.valueFormatter)return r=>{if(r.node?.group){const i=(r.colDef.pivotValueColumn??r.column).getAggFunc();if(i){if("first"===i||"last"===i)return e.valueFormatter(r);if("number"===e.baseDataType&&"count"!==i){if("number"==typeof r.value)return e.valueFormatter(r);if("object"==typeof r.value){if(!r.value)return;if("toNumber"in r.value)return e.valueFormatter({...r,value:r.value.toNumber()});if("value"in r.value)return e.valueFormatter({...r,value:r.value.value})}}return}}else if(t.get("groupHideOpenParents")&&r.column.isRowGroupActive()&&"string"==typeof r.value&&!e.dataTypeMatcher?.(r.value))return;return e.valueFormatter(r)}}function $u(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([r,i])=>function jF(e,t,r,i){if(!t[r])return!1;const s=e[r];return null===s?(t[r]=!1,!1):void 0===i?!!s:s===i}(e,t,r,i))}function KF(e,t){const r=sp(e);for(const i of t)delete r[i],"rowGroup"===i?delete r.rowGroupIndex:"pivot"===i&&delete r.pivotIndex;return r}var qF={moduleName:"DataType",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[],this.columnDefinitionPropsPerDataType={number:()=>({cellEditor:"agNumberCellEditor"}),boolean:()=>({cellEditor:"agCheckboxCellEditor",cellRenderer:"agCheckboxCellRenderer",getFindText:()=>null,suppressKeyboardEvent:e=>!!e.colDef.editable&&" "===e.event.key}),date:({formatValue:e})=>({cellEditor:"agDateCellEditor",keyCreator:e}),dateString:({formatValue:e})=>({cellEditor:"agDateStringCellEditor",keyCreator:e}),dateTime(e){return this.date(e)},dateTimeString(e){return this.dateString(e)},object:({formatValue:e,colModel:t,colId:r})=>({cellEditorParams:{useFormatter:!0},comparator:(i,s)=>{const n=t.getColDefCol(r),o=n?.getColDef();if(!n||!o)return 0;const a=null==i?"":e({column:n,node:null,value:i}),l=null==s?"":e({column:n,node:null,value:s});return a===l?0:a>l?1:-1},keyCreator:e}),text:()=>({})}}wireBeans(e){this.colModel=e.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(e)})}processDataTypeDefinitions(){const e=this.getDefaultDataTypes(),t={},r={},i=d=>u=>{const{column:h,node:f,value:p}=u;let g=h.getColDef().valueFormatter;return g===d.groupSafeValueFormatter&&(g=d.valueFormatter),this.beans.valueSvc.formatValue(h,f,p,g)};for(const d of Object.keys(e)){const u=e[d],h={...u,groupSafeValueFormatter:X0(u,this.gos)};t[d]=h,r[d]=i(h)}const s=this.gos.get("dataTypeDefinitions")??{},n={};for(const d of Object.keys(s)){const u=s[d],h=this.processDataTypeDefinition(u,s,[d],e);h&&(t[d]=h,u.dataTypeMatcher&&(n[d]=u.dataTypeMatcher),r[d]=i(h))}const{valueParser:o,valueFormatter:a}=e.object,{valueParser:l,valueFormatter:c}=t.object;this.hasObjectValueParser=l!==o,this.hasObjectValueFormatter=c!==a,this.formatValueFuncs=r,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(n,e)}sortKeysInMatchers(e,t){const r={...e};for(const i of UF)delete r[i],r[i]=e[i]??t[i].dataTypeMatcher;return r}processDataTypeDefinition(e,t,r,i){let s;const n=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let o=i[n];const a=t[n];if(o&&a&&(o=a),!q0(e,o,n))return;s=K0(o,e)}else{if(r.includes(n))return void ne(44);const o=t[n];if(!q0(e,o,n))return;const a=this.processDataTypeDefinition(o,t,[...r,n],i);if(!a)return;s=K0(a,e)}return{...s,groupSafeValueFormatter:X0(s,this.gos)}}updateColDefAndGetColumnType(e,t,r){let{cellDataType:i}=t;const{field:s}=t;if(void 0===i&&(i=e.cellDataType),(null==i||!0===i)&&(i=!!this.canInferCellDataType(e,t)&&this.inferCellDataType(s,r)),!i)return void(e.cellDataType=!1);const n=this.dataTypeDefinitions[i];if(n)return e.cellDataType=i,n.groupSafeValueFormatter&&(e.valueFormatter=n.groupSafeValueFormatter),n.valueParser&&(e.valueParser=n.valueParser),n.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,i,n,r),n.columnTypes;ne(47,{cellDataType:i})}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const r=i=>{t.add(i.key)};e.__addEventListener("columnStateUpdated",r),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",r))}canInferCellDataType(e,t){const{gos:r}=this;if(!rr(r))return!1;const i={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if($u(t,i))return!1;const s=null===t.type?e.type:t.type;if(s){const n=r.get("columnTypes")??{};if(Ol(s).some(a=>{const l=n[a.trim()];return l&&$u(l,i)}))return!1}return!$u(e,i)}inferCellDataType(e,t){if(!e)return;let r;const i=this.getInitialData();if(i){const n=e.includes(".")&&!this.gos.get("suppressFieldDotNotation");r=Pa(i,e,n)}else this.initWaitForRowData(t);return null==r?void 0:Object.keys(this.dataTypeMatchers).find(n=>this.dataTypeMatchers[n](r))??"object"}getInitialData(){const e=this.gos.get("rowData");if(e?.length)return e[0];if(this.initialData)return this.initialData;{const t=this.beans.rowModel.rootNode?._leafs;if(t?.length)return t[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:r,eventSvc:i}=this.beans;t&&r&&(r.shouldQueueResizeOperations=!0);const[s]=this.addManagedEventListeners({rowDataUpdateStarted:n=>{const{firstRowData:o}=n;o&&(s?.(),this.isPendingInference=!1,this.processColumnsPendingInference(o,t),this.columnStateUpdatesPendingInference={},t&&r?.processResizeOperations(),i.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const r=[];this.destroyColumnStateUpdateListeners();const i={},s={};for(const n of Object.keys(this.columnStateUpdatesPendingInference)){const o=this.columnStateUpdatesPendingInference[n],a=this.colModel.getCol(n);if(!a)return;const l=a.getColDef();if(!this.resetColDefIntoCol(a,"cellDataTypeInferred"))return;const c=a.getColDef();if(t&&c.type&&c.type!==l.type){const d=KF(a,o);d.rowGroup&&null==d.rowGroupIndex&&(i[n]=d),d.pivot&&null==d.pivotIndex&&(s[n]=d),r.push(d)}}t&&r.push(...this.generateColumnStateForRowGroupAndPivotIndexes(i,s)),r.length&&$i(this.beans,{state:r},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const r={},{rowGroupColsSvc:i,pivotColsSvc:s}=this.beans;return i?.restoreColumnOrder(r,e),s?.restoreColumnOrder(r,t),Object.values(r)}resetColDefIntoCol(e,t){const r=e.getUserProvidedColDef();if(!r)return!1;const i=Bl(this.beans,r,e.getColId());return e.setColDef(i,r,t),!0}getDateStringTypeDefinition(e){const{dateString:t}=this.dataTypeDefinitions;return e?this.getDataTypeDefinition(e)??t:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDateIncludesTimeFlag(e){return"dateTime"===e||"dateTimeString"===e}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){return this.getDataTypeDefinition(e)?.baseDataType}checkType(e,t){if(null==t)return!0;const r=this.getDataTypeDefinition(e)?.dataTypeMatcher;return!r||r(t)}validateColDef(e){const t=r=>ne(48,{property:r});if("object"===e.cellDataType){const{object:r}=this.dataTypeDefinitions;e.valueFormatter===r.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&t("Formatter"),e.editable&&e.valueParser===r.valueParser&&!this.hasObjectValueParser&&t("Parser")}}postProcess(e){const t=e.cellDataType;if(!t||"string"!=typeof t)return;const{dataTypeDefinitions:r,beans:i,formatValueFuncs:s}=this,n=r[t];n&&i.colFilter?.setColDefPropsForDataType(e,n,s[t])}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,r,i){const n=this.columnDefinitionPropsPerDataType[r.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:r,colId:i,formatValue:this.formatValueFuncs[t]});Object.assign(e,n)}getDateObjectTypeDef(e){const t=this.getLocaleTextFunc(),r=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:i=>ni(i.newValue&&String(i.newValue)),valueFormatter:i=>null==i.value?"":i.value instanceof Date&&!isNaN(i.value.getTime())?gi(i.value,r)??"":t("invalidDate","Invalid Date"),dataTypeMatcher:i=>i instanceof Date}}getDateStringTypeDef(e){const t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:r=>ni(r)??void 0,dateFormatter:r=>gi(r??null,t)??void 0,valueParser:r=>Gl(String(r.newValue))?r.newValue:null,valueFormatter:r=>Gl(String(r.value))?String(r.value):"",dataTypeMatcher:r=>"string"==typeof r&&Gl(r)}}getDefaultDataTypes(){const e=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:t=>""===t.newValue?.trim?.()?null:Number(t.newValue),valueFormatter:t=>null==t.value?"":"number"!=typeof t.value||isNaN(t.value)?e("invalidNumber","Invalid Number"):String(t.value),dataTypeMatcher:t=>"number"==typeof t},text:{baseDataType:"text",valueParser:t=>""===t.newValue?null:Ns(t.newValue),dataTypeMatcher:t=>"string"==typeof t},boolean:{baseDataType:"boolean",valueParser:t=>null==t.newValue?t.newValue:""===t.newValue?.trim?.()?null:"true"===String(t.newValue).toLowerCase(),valueFormatter:t=>null==t.value?"":String(t.value),dataTypeMatcher:t=>"boolean"==typeof t},date:this.getDateObjectTypeDef("date"),dateString:this.getDateStringTypeDef("dateString"),dateTime:this.getDateObjectTypeDef("dateTime"),dateTimeString:{...this.getDateStringTypeDef("dateTimeString"),dataTypeMatcher:t=>"string"==typeof t&&function o2(e){return Gl(e,!0)}(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>Ns(t.value)??""}}}destroyColumnStateUpdateListeners(){for(const e of this.columnStateUpdateListenerDestroyFuncs)e();this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}}],dependsOn:[wF]},XF={moduleName:"ColumnFlex",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="colFlex",this.columnsHidden=!1}refreshFlexedColumns(e={}){const t=e.source??"flex";null!=e.viewportWidth&&(this.flexViewportWidth=e.viewportWidth);const r=this.flexViewportWidth,{visibleCols:i,colDelayRenderSvc:s}=this.beans,n=i.centerCols;let o=-1;if(e.resizingCols){const g=new Set(e.resizingCols);for(let m=n.length-1;m>=0;m--)if(g.has(n[m])){o=m;break}}let a=!1;const l=n.map((g,m)=>{const v=g.getFlex(),w=null!=v&&v>0&&m>o;return a||(a=w),{col:g,isFlex:w,flex:Math.max(0,v??0),initialSize:g.getActualWidth(),min:g.getMinWidth(),max:g.getMaxWidth(),targetSize:0}});if(a?(s?.hideColumns("colFlex"),this.columnsHidden=!0):this.columnsHidden&&this.revealColumns(s),!r||!a)return[];let c=l.length,d=l.reduce((g,m)=>g+m.flex,0),u=r;const h=(g,m)=>{g.frozenSize=m,g.col.setActualWidth(m,t),u-=m,d-=g.flex,c-=1},f=g=>null!=g.frozenSize;for(const g of l)g.isFlex||h(g,g.initialSize);for(;c>0;){const g=Math.round(d<1?u*d:u);let m,v=0,w=0;for(const k of l){if(f(k))continue;m=k,w+=g*(k.flex/d);const S=Math.round(w-v);k.targetSize=S,v+=S}m&&(m.targetSize+=g-v);let C=0;for(const k of l){if(f(k))continue;const E=k.targetSize,S=Math.min(Math.max(E,k.min),k.max);C+=S-E,k.violationType=S===E?void 0:S<E?"max":"min",k.targetSize=S}const y=0===C?"all":C>0?"min":"max";for(const k of l)f(k)||("all"===y||k.violationType===y)&&h(k,k.targetSize)}e.skipSetLeft||i.setLeftValues(t),e.updateBodyWidths&&i.updateBodyWidths();const p=l.filter(g=>g.isFlex&&!g.violationType).map(g=>g.col);if(e.fireResizedEvent){const g=l.filter(v=>v.initialSize!==v.frozenSize).map(v=>v.col),m=l.filter(v=>v.flex).map(v=>v.col);So(this.eventSvc,g,!0,t,m)}return this.revealColumns(s),p}revealColumns(e){this.columnsHidden&&(e?.revealColumns("colFlex"),this.columnsHidden=!1)}initCol(e){const{flex:t,initialFlex:r}=e.colDef;void 0!==t?e.flex=t:void 0!==r&&(e.flex=r)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}}]},Y0={moduleName:"ColumnApi",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,r,i,s=!1){const n=e.slice();t?n.sort((l,c)=>r.indexOf(l)-r.indexOf(c)):(r||s)&&n.sort((l,c)=>i.indexOf(l)-i.indexOf(c));const o=this.rowGroupColsSvc?.columns,a=this.pivotColsSvc?.columns;return this.buildColumnDefs(n,o,a)}buildColumnDefs(e,t=[],r=[]){const i=[],s={};for(const n of e){let a=!0,l=this.createDefFromColumn(n,t,r),c=n.getOriginalParent(),d=null;for(;c;){let u=null;if(c.isPadding()){c=c.getOriginalParent();continue}const h=s[c.getGroupId()];if(h){h.children.push(l),a=!1;break}if(u=this.createDefFromGroup(c),u&&(u.children=[l],s[u.groupId]=u,l=u,c=c.getOriginalParent()),null!=c&&d===c){a=!1;break}d=c}a&&i.push(l)}return i}createDefFromGroup(e){const t=Uu(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,r){const i=Uu(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()?r.indexOf(e):null,i.aggFunc=e.isValueActive()?e.getAggFunc():null,i.hide=!e.isVisible()||void 0,i.pinned=e.isPinned()?e.getPinned():null,i.sort=e.getSort()?e.getSort():null,i.sortIndex=null!=e.getSortIndex()?e.getSortIndex():null,i}}],apiFunctions:{getColumnDef:function SF(e,t){const r=e.colModel.getColDefCol(t);return r?r.getColDef():null},getDisplayNameForColumn:function yF(e,t,r){return e.colNames.getDisplayNameForColumn(t,r)||""},getColumn:function EF(e,t){return e.colModel.getColDefCol(t)},getColumns:function FF(e){return e.colModel.getColDefCols()},applyColumnState:function RF(e,t){return $i(e,t,"api")},getColumnState:function kF(e){return Nl(e)},resetColumnState:function TF(e){!function hS(e,t){const{colModel:r,autoColSvc:i,selectionColSvc:s,eventSvc:n,gos:o}=e,a=r.getColDefCols();if(!a?.length)return;const c=$g(r.getColDefColTree()),d=[];let u=1e3,h=1e3;const f=w=>{const C=sp(w);pt(C.rowGroupIndex)&&C.rowGroup&&(C.rowGroupIndex=u++),pt(C.pivotIndex)&&C.pivot&&(C.pivotIndex=h++),d.push(C)};i?.getColumns()?.forEach(f),s?.getColumns()?.forEach(f),c?.forEach(f),$i(e,{state:d},t);const p=i?.getColumns()??[];$i(e,{state:[...s?.getColumns()??[],...p,...a].map(w=>({colId:w.colId})),applyOrder:!0},t),n.dispatchEvent(_e(o,{type:"columnsReset",source:t}))}(e,"api")},isPinning:function PF(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()},isPinningLeft:function DF(e){return e.visibleCols.isPinningLeft()},isPinningRight:function AF(e){return e.visibleCols.isPinningRight()},getDisplayedColAfter:function MF(e,t){return e.visibleCols.getColAfter(t)},getDisplayedColBefore:function IF(e,t){return e.visibleCols.getColBefore(t)},setColumnsVisible:function _F(e,t,r){e.colModel.setColsVisible(t,r,"api")},setColumnsPinned:function LF(e,t,r){e.pinnedCols?.setColsPinned(t,r,"api")},getAllGridColumns:function OF(e){return e.colModel.getCols()},getDisplayedLeftColumns:function BF(e){return e.visibleCols.leftCols},getDisplayedCenterColumns:function NF(e){return e.visibleCols.centerCols},getDisplayedRightColumns:function HF(e){return e.visibleCols.rightCols},getAllDisplayedColumns:function GF(e){return e.visibleCols.allCols},getAllDisplayedVirtualColumns:function VF(e){return e.colViewport.getViewportColumns()},getColumnDefs:function bF(e){return e.colModel.getColumnDefs(!0)}}},tR={moduleName:"CellRendererFunction",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){return e.cellRenderer?class r{refresh(){return!1}getGui(){return this.eGui}init(s){const n=t(s),o=typeof n;this.eGui="string"!==o&&"number"!==o&&"boolean"!==o?null!=n?n:nr({tag:"span"}):md("<span>"+n+"</span>")}}:null}}]},oR={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:jt,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},cellFontFamily:{ref:"fontFamily"},headerFontWeight:500,headerFontSize:{ref:"fontSize"},dataFontSize:{ref:"fontSize"},headerTextColor:{ref:"textColor"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:Yt,rangeSelectionBackgroundColor:pi(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:pi(.5),rangeHeaderHighlightColor:{ref:"foregroundColor",mix:.08,onto:"headerBackgroundColor"},rowNumbersSelectedColor:pi(.5),rowHoverColor:pi(.08),columnHoverColor:pi(.05),selectedRowBackgroundColor:pi(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},dataBackgroundColor:jt,oddRowBackgroundColor:{ref:"dataBackgroundColor"},wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,paginationPanelHeight:{ref:"rowHeight",calc:"max(rowHeight, 22px)"},dragHandleColor:ir(.7),headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:ir(.1),iconButtonActiveColor:Yt,iconButtonActiveBackgroundColor:pi(.28),iconButtonActiveIndicatorColor:Yt,menuBorder:{color:ir(.2)},menuBackgroundColor:Vt(.03),menuTextColor:Vt(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"},setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:ir(.8),dialogShadow:{ref:"popupShadow"},cellEditingBorder:{color:Yt},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.25},dialogBorder:{color:ir(.2)},panelBackgroundColor:jt,panelTitleBarHeight:{ref:"headerHeight"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,columnDropCellBackgroundColor:ir(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:ir(.13)},selectCellBackgroundColor:ir(.07),selectCellBorder:{color:ir(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:jt,filterPanelApplyButtonBackgroundColor:Yt,filterPanelCardSubtleColor:{ref:"textColor",mix:.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:mi,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:mi,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:ir(.15),statusBarLabelColor:mi,statusBarLabelFontWeight:500,statusBarValueColor:mi,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedRowTextColor:{ref:"textColor"}},Q0={cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"}},lR={...Q0,cellBatchEditTextColor:"#f3d0b3"},dR=(()=>gt({feature:"batchEditStyle",params:Q0,css:".ag-cell-batch-edit{background-color:var(--ag-cell-batch-edit-background-color);color:var(--ag-cell-batch-edit-text-color);display:inherit}.ag-row-batch-edit{background-color:var(--ag-row-batch-edit-background-color);color:var(--ag-row-batch-edit-text-color)}"}))(),hc=":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)}}",fc={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"}},fR=(()=>gt({feature:"buttonStyle",params:{...fc,buttonBackgroundColor:jt,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:Yt}},css:hc}))(),pR=(()=>gt({feature:"buttonStyle",params:{...fc,buttonBackgroundColor:jt,buttonBorder:{color:Yt},buttonFontWeight:600,buttonTextColor:Yt,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBackgroundColor:Yt,buttonActiveTextColor:jt},css:hc}))(),ju=(()=>gt({feature:"columnDropStyle",css:".ag-column-drop-vertical-empty-message{align-items:center;border:dashed var(--ag-border-width);border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}"}))(),xR={warn:(...e)=>{ne(e[0],e[1])},error:(...e)=>{Ct(e[0],e[1])},preInitErr:(...e)=>{ha(e[0],e[2],e[1])}},gc=()=>(e=>new lu(e))(xR).withParams(oR).withPart(fR).withPart(ju).withPart(dR),pc=(()=>gt({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:jt,checkboxUncheckedBorderColor:Vt(.3),checkboxCheckedBackgroundColor:Yt,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:jt,checkboxIndeterminateBackgroundColor:Vt(.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:jt,radioCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'}},css:'.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);:where(input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}&:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color);&:after{background-color:var(--ag-checkbox-checked-shape-color)}}&:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color);&:after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}}.ag-cell-editing-error .ag-checkbox-input-wrapper:focus-within{box-shadow:var(--ag-focus-error-shadow)}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}'}))(),Ku=()=>({..._n,...lR,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:Vt(.05),rowHoverColor:pi(.15),selectedRowBackgroundColor:pi(.2),menuBackgroundColor:Vt(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:mi,findMatchColor:jt,findActiveMatchColor:jt,checkboxUncheckedBorderColor:Vt(.4),toggleButtonOffBackgroundColor:Vt(.4),rowBatchEditBackgroundColor:Vt(.1)}),mc=(()=>gt({feature:"colorScheme",params:_n,modeParams:{light:_n,dark:Ku(),"dark-blue":{...Ku(),backgroundColor:"#1f2836"}}}))(),kR=gt({feature:"iconSet",css:".ag-icon-aggregation:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24 6H8v2l8 8-8 8v2h16v-2H11l8-8-8-8h13z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-arrows:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 11.171 2.687 16l4.828 4.829-1.414 1.414L-.142 16l6.243-6.243zm16.97 0 1.414-1.414L32.142 16l-6.243 6.243-1.414-1.414L29.313 16zM16.028 13.2l2.829 2.828-2.829 2.829-2.828-2.829zm-4.857 11.285L16 29.313l4.829-4.828 1.414 1.414L16 32.142l-6.243-6.243zm0-16.97L9.757 6.101 16-.142l6.243 6.243-1.414 1.414L16 2.687z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-asc:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333 5.332 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-cancel:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16 2.667A13.32 13.32 0 0 0 2.667 16c0 7.373 5.96 13.333 13.333 13.333S29.333 23.373 29.333 16 23.373 2.667 16 2.667m6.667 18.12-1.88 1.88L16 17.88l-4.787 4.787-1.88-1.88L14.12 16l-4.787-4.787 1.88-1.88L16 14.12l4.787-4.787 1.88 1.88L17.88 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-chart:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cg fill='%23000' fill-rule='nonzero'%3E%3Cpath d='M14 7h4v18h-4zM8 17h4v8H8zM20 13h4v12h-4z'/%3E%3C/g%3E%3C/svg%3E\")}.ag-icon-color-picker:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-columns:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M26 25H6V7h20zM12 11H8v12h4zm6 0h-4v12h4zm6 12V11h-4v12z' style='fill-rule:nonzero' transform='translate(0 -1)'/%3E%3C/svg%3E\")}.ag-icon-contracted:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m12 6 10 10-10 10-2-2 8-8-8-8z'/%3E%3C/svg%3E\")}.ag-icon-copy:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M22 1.333H6A2.675 2.675 0 0 0 3.333 4v18.667H6V4h16zm4 5.334H11.333a2.675 2.675 0 0 0-2.667 2.667v18.667c0 1.467 1.2 2.667 2.667 2.667H26c1.467 0 2.667-1.2 2.667-2.667V9.334c0-1.467-1.2-2.667-2.667-2.667M26 28H11.333V9.333H26z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-cross:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M15.984 13.894 27.05 2.828l2.122 2.122-11.066 11.066 11.066 11.066-2.122 2.12-11.066-11.066L4.918 29.202l-2.12-2.12 11.066-11.066L2.798 4.95l2.12-2.122z'/%3E%3C/svg%3E\")}.ag-icon-csv:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E\")}.ag-icon-cut:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M13.775 15.198 3.835 2.945a1.501 1.501 0 0 1 2.33-1.89l14.997 18.488A6.003 6.003 0 0 1 29.657 25c0 3.311-2.688 6-6 6s-6-2.689-6-6c0-1.335.437-2.569 1.176-3.566l-3.127-3.855-3.001 3.7A5.97 5.97 0 0 1 14 25c0 3.311-2.689 6-6 6s-6-2.689-6-6a6.003 6.003 0 0 1 8.315-5.536zm9.882 6.702a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1M8 21.95a3.05 3.05 0 1 0 .001 6.101A3.05 3.05 0 0 0 8 21.95m9.63-11.505 1.932 2.381 8.015-9.881a1.5 1.5 0 0 0-2.329-1.89z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-desc:before,.ag-icon-down:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-excel:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E\")}.ag-icon-expanded:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M20 26 10 16 20 6l2 2-8 8 8 8z'/%3E%3C/svg%3E\")}.ag-icon-eye-slash:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath fill='%23000' fill-rule='nonzero' d='M8.95 10.364 7 8.414 8.414 7l2.32 2.32A13.2 13.2 0 0 1 16.5 8c5.608 0 10.542 3.515 12.381 8.667L29 17l-.119.333a13 13 0 0 1-4.255 5.879l1.466 1.466-1.414 1.414-1.754-1.753A13.2 13.2 0 0 1 16.5 26c-5.608 0-10.542-3.515-12.381-8.667L4 17l.119-.333a13 13 0 0 1 4.83-6.303m1.445 1.445A11.02 11.02 0 0 0 6.148 17c1.646 4.177 5.728 7 10.352 7 1.76 0 3.441-.409 4.94-1.146l-1.878-1.878A5.06 5.06 0 0 1 16.5 22c-2.789 0-5.05-2.239-5.05-5 0-1.158.398-2.223 1.065-3.07zm1.855-.974 1.794 1.795A5.07 5.07 0 0 1 16.5 12c2.789 0 5.05 2.239 5.05 5 0 .9-.24 1.745-.661 2.474l2.305 2.306A11 11 0 0 0 26.852 17c-1.646-4.177-5.728-7-10.352-7-1.495 0-2.933.295-4.25.835'/%3E%3C/svg%3E\")}.ag-icon-eye:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16.5 23c4.624 0 8.706-2.823 10.352-7-1.646-4.177-5.728-7-10.352-7s-8.706 2.823-10.352 7c1.646 4.177 5.728 7 10.352 7M4.119 15.667C5.958 10.515 10.892 7 16.5 7s10.542 3.515 12.381 8.667L29 16l-.119.333C27.042 21.485 22.108 25 16.5 25S5.958 21.485 4.119 16.333L4 16zM16.5 21c2.789 0 5.049-2.239 5.049-5s-2.26-5-5.049-5-5.049 2.239-5.049 5 2.26 5 5.049 5' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-filter:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m28 8-8 8v5l-6 6V16L6 8V6h22zM9 8l7 7v7l2-2v-5l7-7z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-first:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24.273 22.12 18.153 16l6.12-6.12L22.393 8l-8 8 8 8zM7.727 8h2.667v16H7.727z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-group:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14 7v1H9V7zm0-3v1H5.001V4zm-7 7H5v-1h2zm0-3H5V7h2zM3 5H1V4h2zm11 5v1H9v-1zm-7 4H5v-1h2zm7-1v1H9v-1z' style='fill-rule:nonzero' transform='matrix(2 0 0 2 0 -2)'/%3E%3C/svg%3E\")}.ag-icon-last:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m7.727 9.88 6.12 6.12-6.12 6.12L9.607 24l8-8-8-8zM21.607 8h2.667v16h-2.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-left:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M26.667 14.667H10.44l7.453-7.453L16 5.334 5.333 16.001 16 26.668l1.88-1.88-7.44-7.453h16.227z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-linked:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M5.2 16a4.136 4.136 0 0 1 4.133-4.133h5.333V9.334H9.333a6.67 6.67 0 0 0-6.667 6.667 6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.333A4.136 4.136 0 0 1 5.2 16.002zm5.467 1.333h10.667v-2.667H10.667zm12-8h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133 4.136 4.136 0 0 1-4.133 4.133h-5.333v2.533h5.333a6.67 6.67 0 0 0 6.667-6.667 6.67 6.67 0 0 0-6.667-6.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-loading:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M17 29h-2v-8h2zm-3.586-9L7 26.414 5.586 25 12 18.586zm13 5L25 26.414 18.586 20 20 18.586zM29 17h-8v-2h8zm-18 0H3v-2h8zm2.414-5L12 13.414 5.586 7 7 5.586zm13-5L20 13.414 18.586 12 25 5.586zM17 11h-2V3h2z' style='fill-rule:nonzero' transform='translate(-3.692 -3.692)scale(1.23077)'/%3E%3C/svg%3E\")}.ag-icon-maximize:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14 30H2V18h2.828v7.05l8.254-8.252 2.12 2.12-8.252 8.254H14zm4-28h12v12h-2.828V6.95l-8.254 8.252-2.12-2.12 8.252-8.254H18z'/%3E%3C/svg%3E\")}.ag-icon-menu:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M20 13H0v-2h20zm0-6H0V5h20zm0-6H0v-2h20z' style='fill-rule:nonzero' transform='translate(6 9)'/%3E%3C/svg%3E\")}.ag-icon-menu-alt:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 19a3 3 0 1 0 0-6 3 3 0 0 0 0 6M16 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6M16 27a3 3 0 1 0 0-6 3 3 0 0 0 0 6'/%3E%3C/svg%3E\")}.ag-icon-minimize:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M2 18h12v12h-2.828v-7.05l-8.254 8.252-2.12-2.12 8.252-8.254H2zm28-4H18V2h2.828v7.05L29.082.798l2.12 2.12-8.252 8.254H30z'/%3E%3C/svg%3E\")}.ag-icon-minus:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658H7.901v-2.658z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-next:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M10.94 6 9.06 7.88 17.167 16 9.06 24.12 10.94 26l10-10z' style='fill-rule:nonzero' transform='translate(1)'/%3E%3C/svg%3E\")}.ag-icon-none:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cg fill='%23000' fill-rule='nonzero'%3E%3Cpath d='M23.708 14.645 16 6.939l-7.708 7.706 1.416 1.416L16 9.767l6.292 6.294zM23.708 20.355 16 28.061l-7.708-7.706 1.416-1.416L16 25.233l6.292-6.294z'/%3E%3C/g%3E%3C/svg%3E\")}.ag-icon-not-allowed:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16 2.667C8.64 2.667 2.667 8.64 2.667 16S8.64 29.333 16 29.333 29.333 23.36 29.333 16 23.36 2.667 16 2.667M5.333 16c0-5.893 4.773-10.667 10.667-10.667 2.467 0 4.733.84 6.533 2.253L7.586 22.533A10.54 10.54 0 0 1 5.333 16M16 26.667c-2.467 0-4.733-.84-6.533-2.253L24.414 9.467A10.54 10.54 0 0 1 26.667 16c0 5.893-4.773 10.667-10.667 10.667' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-paste:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M25.334 4H19.76C19.2 2.453 17.733 1.333 16 1.333S12.8 2.453 12.24 4H6.667A2.675 2.675 0 0 0 4 6.667V28c0 1.467 1.2 2.667 2.667 2.667h18.667c1.467 0 2.667-1.2 2.667-2.667V6.667C28.001 5.2 26.801 4 25.334 4M16 4c.733 0 1.333.6 1.333 1.333s-.6 1.333-1.333 1.333-1.333-.6-1.333-1.333S15.267 4 16 4m9.333 24H6.666V6.667h2.667v4h13.333v-4h2.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-pin:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m10.78 19.777-4.668-4.666s.032-1 .67-1.87c1.366-1.86 4.052-1.96 6.056-1.572l3.158-3.108c-.7-2.342 3.352-5.046 3.352-5.046l9.166 9.168q-.334.447-.67.894c-1.074 1.426-2.538 2.63-4.272 2.338l-3.32 3.218c.046.344.042.03.118 1.152.144 2.13-.64 4.324-2.632 5.34l-.746.364-4.798-4.798-7.292 7.294-1.416-1.416zm8.24-13.672c-.688.568-1.416 1.45-1.024 2.072l.49.722-4.986 4.988c-1.988-.506-4.346-.636-5.156.614l9.02 9.032q.14-.099.272-.21c1.226-1.08.764-3.04.498-4.9l4.79-4.79s1.47.938 2.936-.776l-6.79-6.79q-.026.019-.05.038' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-pivot:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0m2.966 7.954H9.892v18.136c5.086.13 10.18.098 15.264-.096 1.48-.094 2.746-1.35 2.84-2.84.192-5.064.226-10.134.098-15.2M3.968 24.1q.015.528.036 1.056c.094 1.484 1.354 2.746 2.84 2.84l1.012.036V24.1zM22 15.414l-.292.294-1.416-1.416L23 11.586l2.708 2.706-1.416 1.416-.292-.294v3.592c-.032 2.604-2.246 4.892-4.872 4.992L15.414 24l.294.292-1.416 1.416L11.586 23l2.706-2.708 1.416 1.416-.322.32c3.372.03 6.578-.164 6.614-3.034zM3.88 18.038c.002 1.346.012 2.694.038 4.04h3.938v-4.04zm.05-6.062a681 681 0 0 0-.044 4.042h3.97v-4.042zm5.962-7.99Q8.449 3.999 7.006 4c-1.57.02-2.946 1.348-3.004 2.922q-.02 1.517-.042 3.034h3.896v-2.02h2.036zm14.244-.016v3.966h3.898q-.017-.546-.038-1.092c-.094-1.48-1.35-2.746-2.84-2.84q-.51-.019-1.02-.034m-8.14-.054q-2.035.022-4.07.048v3.972h4.07zm6.106.008a213 213 0 0 0-4.07-.022v4.034h4.07z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-plus:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658h-6.77v6.77h-2.658v-6.77h-6.77v-2.658h6.77v-6.77h2.658v6.77z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-previous:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M21.94 7.88 20.06 6l-10 10 10 10 1.88-1.88L13.833 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-right:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m16 5.333-1.88 1.88 7.44 7.453H5.333v2.667H21.56l-7.44 7.453 1.88 1.88 10.667-10.667L16 5.332z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-save:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M15.708 2.355 8 10.061.292 2.355 1.708.939 8 7.233 14.292.939z' style='fill-rule:nonzero' transform='translate(8 14)'/%3E%3Cpath d='M5 26h22v2H5zM15 4h2v18h-2z'/%3E%3C/svg%3E\")}.ag-icon-small-down:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.334 10.667 16 21.334l8.667-10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-small-left:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M21.333 7.334 10.666 16l10.667 8.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-small-right:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M10.667 24.666 21.334 16 10.667 7.333z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-small-up:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.334 21.333 16 10.666l8.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-tick:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M11.586 22.96 27.718 6.828 29.84 8.95 11.586 27.202 2.4 18.016l2.12-2.122z'/%3E%3C/svg%3E\")}.ag-icon-tree-closed:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m11.94 6-1.88 1.88L18.167 16l-8.107 8.12L11.94 26l10-10z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-tree-indeterminate:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6 13.5h20v3H6z'/%3E%3C/svg%3E\")}.ag-icon-tree-open:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24.12 9.06 16 17.167 7.88 9.06 6 10.94l10 10 10-10z' style='fill-rule:nonzero' transform='translate(0 1)'/%3E%3C/svg%3E\")}.ag-icon-unlinked:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M22.667 9.333h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133c0 1.907-1.307 3.507-3.08 3.973l1.947 1.947c2.173-1.107 3.667-3.32 3.667-5.92a6.67 6.67 0 0 0-6.667-6.667zm-1.334 5.334h-2.92l2.667 2.667h.253zM2.667 5.693 6.814 9.84A6.65 6.65 0 0 0 2.667 16a6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.334a4.136 4.136 0 0 1-4.133-4.133c0-2.12 1.613-3.867 3.68-4.093l2.76 2.76h-.973v2.667h3.64l3.027 3.027v2.307h2.307l5.347 5.333 1.68-1.68L4.362 4.002 2.669 5.695z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-up:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333 5.332 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-grip:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M8 24H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 18H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 12H6V8h2zm6 0h-2V8h2zm6 0h-2V8h2zm6 0h-2V8h2z' style='fill-rule:nonzero'/%3E%3C/svg%3E\")}.ag-icon-settings:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E\")}.ag-icon-column-arrow:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11 4a1 1 0 0 1 1 1v22a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 13a1 1 0 0 1 1-1h23.5a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 4h18v24H2zm2 2v20h14V6zM26.793 13 23 9.207l1.414-1.414L29.621 13l-5.207 5.207L23 16.793z' clip-rule='evenodd'/%3E%3C/svg%3E\")}.ag-icon-un-pin:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m6.112 15.111 3.272 3.271 1.436-1.402-2.476-2.479c.81-1.25 3.168-1.12 5.156-.614l4.986-4.988-.49-.722c-.392-.622.336-1.504 1.024-2.072l.008-.007.01-.006.032-.025 1.447 1.447 1.432-1.397-2.601-2.602s-4.052 2.704-3.352 5.046l-3.158 3.108c-2.004-.388-4.69-.288-6.056 1.572-.638.87-.67 1.87-.67 1.87m.581 11.582.014.014 5.502-5.501 4.783 4.783.746-.364c1.992-1.016 2.776-3.21 2.632-5.34-.055-.805-.068-.87-.088-.97-.008-.04-.017-.085-.03-.182l3.32-3.218c1.734.292 3.198-.912 4.272-2.338q.337-.447.67-.894l-.001-.001-.007-.007-.007-.007-.007-.007-3.87-3.87 1.585-1.584-1.414-1.414-14.381 14.38-1.237 1.209-5.69 5.687 1.417 1.416zM23.21 10.206l2.65 2.651c-1.465 1.714-2.935.776-2.935.776l-4.79 4.79q.041.291.087.583c.257 1.676.513 3.35-.585 4.317a4 4 0 0 1-.272.21l-3.739-3.744z' clip-rule='evenodd'/%3E%3C/svg%3E\")}.ag-icon-pinned-top:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='m16.708 10.878 8.708 8.706L24 21l-6.292-6.294V27h-2V14.706L9.416 21 8 19.584q4.348-4.344 8.691-8.69zM25 6H8v2h17z'/%3E%3C/svg%3E\")}.ag-icon-pinned-bottom:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M16.708 22.122 8 13.416 9.416 12l6.292 6.294V6h2v12.294L24 12l1.416 1.416-8.691 8.69zM7.416 28h17v-2h-17z'/%3E%3C/svg%3E\")}.ag-icon-chevron-up:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3.479 10.521a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1-1.06 1.06l-3.47-3.47-3.47 3.47a.75.75 0 0 1-1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E\")}.ag-icon-chevron-down:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.521 5.461a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 1.06-1.06l3.47 3.47 3.47-3.47a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E\")}.ag-icon-chevron-left:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.53 12.512a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 1.06l-3.47 3.47 3.47 3.47a.75.75 0 0 1 0 1.06' clip-rule='evenodd'/%3E%3C/svg%3E\")}.ag-icon-chevron-right:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.47 3.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06L8.94 8 5.47 4.53a.75.75 0 0 1 0-1.06' clip-rule='evenodd'/%3E%3C/svg%3E\")}.ag-icon-filter-add:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M19.834 8H8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.056-2.267 2.968-4.417 5.49-6.75v3.087c-1.081.974-2.245 1.968-3.232 3.005a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h13.834z'/%3E%3Cpath fill='currentColor' d='M26 6h2.946v2.002H26v3.313h-2.002V8.002h-2.946V6h2.946V3.04H26z'/%3E%3C/svg%3E\")}.ag-icon-edit:before{mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M6.222 25.778h1.611l14.834-14.811-1.611-1.611-14.834 14.81zM4 28v-4.733L22.644 4.656a2.26 2.26 0 0 1 1.567-.634q.423 0 .833.167.412.166.734.478l1.589 1.6q.333.322.483.733t.15.822q0 .423-.161.839-.162.416-.472.728L8.733 28zm17.856-17.833-.8-.811 1.61 1.61z'/%3E%3C/svg%3E\")}"}),em="background-color: unset; mask-image: unset; -webkit-mask-image: unset;",tm={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"/>'},rm={"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>'},MR=(e,t=1.5)=>{const r=rm[e];if(r)return r;const i=tm[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>"},qu=(e={})=>gt({feature:"iconSet",css:()=>((e={})=>{let t="";for(const r of[...Object.keys(tm),...Object.keys(rm)]){const i=MR(r,e.strokeWidth);t+=`.ag-icon-${r}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(i)}'); }\n`}return t})(e)}),IR=qu(),Yu={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},Qu=(()=>gt({feature:"inputStyle",params:{...Yu,inputBackgroundColor:jt,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:Yt},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:Vt(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-right:var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){&:focus{box-shadow:var(--ag-focus-shadow);&:where(.invalid),&:where(:invalid){box-shadow:var(--ag-focus-error-shadow)}}}'}))(),Da='.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)}}}',Aa={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},GR=(()=>gt({feature:"tabStyle",params:{...Aa,tabBarBorder:!0,tabBarBackgroundColor:ir(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:jt},css:Da}))(),WR=(()=>gt({feature:"tabStyle",params:{...Aa,tabBarBorder:!0,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabHoverTextColor:Yt,tabSelectedTextColor:Yt,tabSelectedUnderlineColor:Yt,tabSelectedUnderlineWidth:2,tabSelectedUnderlineTransitionDuration:"0.3s"},css:Da}))(),KR=(()=>gc().withPart(pc).withPart(mc).withPart(IR).withPart(GR).withPart(Qu).withPart(ju).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}))(),XR=(()=>gc().withPart(pR).withPart(pc).withPart(mc).withPart(kR).withPart(WR).withPart(Qu).withPart(ju).withParams({accentColor:"#2196f3",selectedRowBackgroundColor:pi(.3),inputFocusBorder:{color:pi(.4)},focusShadow:{radius:2,spread:1.6,color:pi(.4)},iconButtonHoverBackgroundColor:"transparent",iconButtonActiveBackgroundColor:"transparent",checkboxUncheckedBorderColor:Vt(.45),checkboxIndeterminateBackgroundColor:Vt(.45),checkboxIndeterminateBorderColor:Vt(.45),checkboxBorderWidth:2,checkboxBorderRadius:2,fontSize:13,dataFontSize:14,headerFontWeight:700,borderRadius:3,wrapperBorderRadius:3,tabSelectedUnderlineColor:Yt,tabSelectedBorderWidth:0,tabSelectedUnderlineTransitionDuration:.3,sideButtonSelectedUnderlineColor:Yt,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineTransitionDuration:.3,sideButtonBorder:!1,sideButtonSelectedBorder:!1,sideButtonBarTopPadding:{calc:"spacing * 3"},sideButtonSelectedBackgroundColor:"transparent",sideButtonHoverTextColor:Yt,iconButtonHoverColor:Yt,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonSwitchInset:1,toggleButtonOffBackgroundColor:Vt(.45),colorPickerThumbSize:13,colorPickerTrackSize:11,colorPickerThumbBorderWidth:2,colorPickerTrackBorderRadius:2,colorPickerColorBorderRadius:2}))(),QR={cssName:"--ag-cell-horizontal-padding",changeKey:"cellHorizontalPaddingChanged",defaultValue:16},JR={cssName:"--ag-indentation-level",changeKey:"indentationLevelChanged",defaultValue:0,noWarn:!0,cacheDefault:!0},ZR={cssName:"--ag-row-group-indent-size",changeKey:"rowGroupIndentSizeChanged",defaultValue:0},im={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42},sm={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},nm={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},Ju={cssName:"--ag-row-border",changeKey:"rowBorderWidthChanged",defaultValue:1,border:!0},om={cssName:"--ag-pinned-row-border",changeKey:"pinnedRowBorderWidthChanged",defaultValue:1,border:!0};function am(e,t,r){const i=e.visibleCols.headerGroupRowCount;if(r>=i)return{column:t,headerRowIndex:r};let s=t.getParent();for(;s&&s.getProvidedColumnGroup().getLevel()>r;)s=s.getParent();const n=t.isSpanHeaderHeight();return!s||n&&s.isPadding()?{column:t,headerRowIndex:i}:{column:s,headerRowIndex:s.getProvidedColumnGroup().getLevel()}}var vc=new Set(["gridPreDestroyed","fillStart","pasteStart"]),eh=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","pinnedRowsChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterUiChanged","filterOpened","floatingFilterUiChanged","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel","findChanged","rowResizeStarted","rowResizeEnded","columnsReset","bulkEditingStarted","bulkEditingStopped","batchEditingStarted","batchEditingStopped"].reduce((e,t)=>(e[t]=function Xx(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}(t),e),{}),Ma=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),dk={tag:"span",cls:"ag-sort-indicator-container",children:[Ma("Order","order"),Ma("Asc","ascending-icon"),Ma("Desc","descending-icon"),Ma("Mixed","mixed-icon"),Ma("None","none-icon")]},th=class extends ft{constructor(e){super(),this.eSortOrder=ge,this.eSortAsc=ge,this.eSortDesc=ge,this.eSortMixed=ge,this.eSortNone=ge,e||this.setTemplate(dk)}attachCustomElements(e,t,r,i,s){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=r,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 r=this.updateIcons.bind(this),i=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",r),this.addManagedEventListeners({newColumnsLoaded:r,sortChanged:i,columnRowGroupChanged:i}),this.onSortChanged()}addInIcon(e,t,r){if(null==t)return;const i=Ti(e,this.beans,r);i&&t.appendChild(i)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortNone:r,column:i,gos:s,beans:n}=this,o=n.sortSvc.getDisplaySortForColumn(i);e&&at(e,"asc"===o,{skipAriaHidden:!0}),t&&at(t,"desc"===o,{skipAriaHidden:!0}),r&&at(r,!(!i.getColDef().unSortIcon&&!s.get("unSortIcon"))&&null==o,{skipAriaHidden:!0})}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:r}=this;this.addInIcon("sortUnSort",e,t);const i=t.getColDef().showRowGroup;rs(r)&&i&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:r}=this;e&&at(e,"mixed"===t.sortSvc.getDisplaySortForColumn(r),{skipAriaHidden:!0})}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:r}}=this;if(!e)return;const i=r.getColumnsWithSortingOrdered(),s=r.getDisplaySortIndexForColumn(t)??-1,n=i.some(a=>r.getDisplaySortIndexForColumn(a)??!1);at(e,s>=0&&n,{skipAriaHidden:!0}),s>=0?e.textContent=(s+1).toString():Rt(e)}},uk={selector:"AG-SORT-INDICATOR",component:th},Ia=["asc","desc",null],Ao={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agDateColumnFloatingFilter:"DateFilter",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agNewFiltersToolPanel:"NewFiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"};function cm(e){return`"${e}"`}var gk={aggFunc:"SharedAggregation",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:e,editable:t})=>t?"string"==typeof e?Ao[e]??"CustomEditor":"CustomEditor":null,cellRenderer:({cellRenderer:e})=>"string"!=typeof e?null:Ao[e],cellStyle:"CellStyle",columnChooserParams:"ColumnMenu",contextMenuItems:"ContextMenu",dndSource:"DragAndDrop",dndSourceOnRowDrag:"DragAndDrop",editable:({editable:e,cellEditor:t})=>e&&!t?"TextEditor":null,enableCellChangeFlash:"HighlightChanges",enablePivot:"SharedPivot",enableRowGroup:"SharedRowGrouping",enableValue:"SharedAggregation",filter:({filter:e})=>e&&"string"!=typeof e&&"boolean"!=typeof e?"CustomFilter":"string"==typeof e?Ao[e]??"ColumnFilter":"ColumnFilter",floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",headerTooltipValueGetter:"Tooltip",mainMenuItems:"ColumnMenu",menuTabs:e=>{const t=["columnsMenuTab","generalMenuTab"];return e.menuTabs?.some(r=>t.includes(r))?"ColumnMenu":null},pivot:"SharedPivot",pivotIndex:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",tooltipComponentSelector:"Tooltip",spanRows:"CellSpan",groupHierarchy:"SharedRowGrouping"},mk={headerName:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,headerTooltipValueGetter:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,tooltipComponentSelector:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0,rowGroupingHierarchy:void 0,groupHierarchy:void 0},wk=["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"],xk=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","advancedFilterParams","initialState","autoSizeStrategy","selectionColumnDef","findOptions","filterHandlers","groupHierarchyConfig"],Sk=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],dm=["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"],bk=["theme","rowSelection"],um=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],hm=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault","enableFilterHandlers","suppressStartEditOnTab","hidePaddedHeaderRows","ssrmExpandAllAffectsAllRows"],yk=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getFullRowEditValidationErrors","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter","isRowPinnable","isRowPinned","isRowValidDropPosition"];function as(e,t,r){return"number"==typeof t||null==t?null==t||t>=r?null:`${e}: value should be greater than or equal to ${r}`:`${e}: value should be a number`}var Rk={alignedGrids:"AlignedGrids",allowContextMenuWithControlKey:"ContextMenu",autoSizeStrategy:"ColumnAutoSize",cellSelection:"CellSelection",columnHoverHighlight:"ColumnHover",datasource:"InfiniteRowModel",doesExternalFilterPass:"ExternalFilter",editType:"EditCore",invalidEditValueMode:"EditCore",enableAdvancedFilter:"AdvancedFilter",enableCellSpan:"CellSpan",enableCharts:"IntegratedCharts",enableRangeSelection:"CellSelection",enableRowPinning:"PinnedRow",findSearchValue:"Find",getFullRowEditValidationErrors:"EditCore",getContextMenuItems:"ContextMenu",getLocaleText:"Locale",getMainMenuItems:"ColumnMenu",getRowClass:"RowStyle",getRowStyle:"RowStyle",groupTotalRow:"SharedRowGrouping",grandTotalRow:"ClientSideRowModelHierarchy",initialState:"GridState",isExternalFilterPresent:"ExternalFilter",isRowPinnable:"PinnedRow",isRowPinned:"PinnedRow",localeText:"Locale",masterDetail:"SharedMasterDetail",pagination:"Pagination",pinnedBottomRowData:"PinnedRow",pinnedTopRowData:"PinnedRow",pivotMode:"SharedPivot",pivotPanelShow:"RowGroupingPanel",quickFilterText:"QuickFilter",rowClass:"RowStyle",rowClassRules:"RowStyle",rowData:"ClientSideRowModel",rowDragManaged:"RowDrag",rowGroupPanelShow:"RowGroupingPanel",rowNumbers:"RowNumbers",rowSelection:"SharedRowSelection",rowStyle:"RowStyle",serverSideDatasource:"ServerSideRowModel",sideBar:"SideBar",statusBar:"StatusBar",treeData:"SharedTreeData",undoRedoCellEditing:"UndoRedoEdit",valueCache:"ValueCache",viewportDatasource:"ViewportRowModel"},kk=()=>{const e={autoSizePadding:{validate:({autoSizePadding:r})=>as("autoSizePadding",r,0)},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate:({cacheBlockSize:r})=>as("cacheBlockSize",r,1)},cacheOverflowSize:{validate:({cacheOverflowSize:r})=>as("cacheOverflowSize",r,1)},datasource:{supportedRowModels:["infinite"]},domLayout:{validate:r=>{const i=r.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:r,pinnedTopRowData:i,pinnedBottomRowData:s})=>r&&(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:r,isRowPinnable:i,pinnedTopRowData:s,pinnedBottomRowData:n})=>i&&(s||n)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!r&&i?"`isRowPinnable` requires `enableRowPinning` to be set.":null},isRowPinned:{supportedRowModels:["clientSide"],validate:({enableRowPinning:r,isRowPinned:i,pinnedTopRowData:s,pinnedBottomRowData:n})=>i&&(s||n)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!r&&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"]}}},groupHierarchyConfig:{validate({groupHierarchyConfig:r={}},i,s){for(const n of Object.keys(r))s.validation?.validateColDef(r[n]);return null}},icons:{validate:({icons:r})=>{if(r){if(r.smallDown)return ts(262);if(r.smallLeft)return ts(263);if(r.smallRight)return ts(264)}return null}},infiniteInitialRowCount:{validate:({infiniteInitialRowCount:r})=>as("infiniteInitialRowCount",r,1)},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},ssrmExpandAllAffectsAllRows:{validate:r=>{if("boolean"==typeof r.ssrmExpandAllAffectsAllRows){if("serverSide"!==r.rowModelType)return"'ssrmExpandAllAffectsAllRows' is only supported with the Server Side Row Model.";if(r.ssrmExpandAllAffectsAllRows&&"function"!=typeof r.getRowId)return"'getRowId' callback must be provided for Server Side Row Model grouping to work correctly."}return null}},keepDetailRowsCount:{validate:({keepDetailRowsCount:r})=>as("keepDetailRowsCount",r,1)},paginationPageSize:{validate:({paginationPageSize:r})=>as("paginationPageSize",r,1)},paginationPageSizeSelector:{validate:r=>{const i=r.paginationPageSizeSelector;return"boolean"==typeof i||null==i||i.length?null:"'paginationPageSizeSelector' cannot be an empty array.\n If you want to hide the page size selector, set paginationPageSizeSelector to false."}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}}},quickFilterText:{supportedRowModels:["clientSide"]},rowBuffer:{validate:({rowBuffer:r})=>as("rowBuffer",r,0)},rowClass:{validate:r=>"function"==typeof r.rowClass?"rowClass should not be a function, please use getRowClass instead":null},rowData:{supportedRowModels:["clientSide"]},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{pagination:{required:[!1,void 0]}}},rowSelection:{validate:({rowSelection:r})=>r&&"string"==typeof r?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':r&&"object"!=typeof r?"Expected `RowSelectionOptions` object for the `rowSelection` property.":r&&"multiRow"!==r.mode&&"singleRow"!==r.mode?`Selection mode "${r.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null},rowStyle:{validate:r=>{const i=r.rowStyle;return i&&"function"==typeof i?"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:r})=>as("serverSideInitialRowCount",r,1)},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:r=>{const i=r.sortingOrder;if(Array.isArray(i)&&i.length>0){const s=i.filter(n=>!Ia.includes(n));if(s.length>0)return`sortingOrder must be an array with elements from [${Ia.map(Dl).join()}], currently it includes [${s.map(Dl).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:r=>r.tooltipHideDelay&&r.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:r=>r.tooltipShowDelay&&r.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],validate:r=>{const i=r.rowModelType??"clientSide";switch(i){case"clientSide":{const{treeDataChildrenField:s,treeDataParentIdField:n,getDataPath:o,getRowId:a}=r;if(!s&&!n&&!o)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(s){if(o)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(o)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":return r.isServerSideGroup&&r.getServerSideGroupKey?null:`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${i} row model.`}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate:({viewportRowModelBufferSize:r})=>as("viewportRowModelBufferSize",r,0)},viewportRowModelPageSize:{validate:({viewportRowModelPageSize:r})=>as("viewportRowModelPageSize",r,1)},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate:({autoGroupColumnDef:r,showOpenedGroup:i})=>r?.field&&i?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":r?.valueGetter&&i?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null},renderingMode:{validate:r=>{const i=r.renderingMode,s=["default","legacy"];return i&&!s.includes(i)?`renderingMode must be one of [${s.join()}], currently it's ${i}`:null}},autoSizeStrategy:{validate:({autoSizeStrategy:r})=>{if(!r)return null;const s=r.type;return"fitCellContents"!==s&&"fitGridWidth"!==s&&"fitProvidedWidth"!==s?`Invalid Auto-size strategy. \`autoSizeStrategy\` must be one of ${["fitCellContents","fitGridWidth","fitProvidedWidth"].map(n=>'"'+n+'"').join(", ")}, currently it's ${s}`:"fitProvidedWidth"===s&&"number"!=typeof r.width?`When using the 'fitProvidedWidth' auto-size strategy, must provide a numeric \`width\`. You provided ${r.width}`:null}}},t={};for(const r of hm)t[r]={expectedType:"boolean"};for(const r of dm)t[r]={expectedType:"number"};return Jr(t,e),t},Pk=0,Dk=0,fm="__ag_grid_instance";function gm(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 Ik=gm(!0),_k=gm(!1),Ok={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"}]},Nk={moduleName:"ColumnHeaderComp",version:he,userComponents:{agColumnHeader:class extends ft{constructor(){super(...arguments),this.eFilter=ge,this.eFilterButton=ge,this.eSortIndicator=ge,this.eMenu=ge,this.eLabel=ge,this.eText=ge,this.eSortOrder=ge,this.eSortAsc=ge,this.eSortDesc=ge,this.eSortMixed=ge,this.eSortNone=ge,this.isLoadingInnerComponent=!1}refresh(e){const t=this.params;if(this.params=e,this.workOutTemplate(e,!!this.beans?.sortSvc)!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||null!=this.currentSuppressMenuHide&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){const r={...e};Jr(r,e.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(r)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){const r=e.template;return r?r?.trim?r.trim():r:t?Ik:_k}init(e){this.params=e;const{sortSvc:t,touchSvc:r,rowNumbersSvc:i,userCompFactory:s}=this.beans,n=t?.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!n),this.setTemplate(this.currentTemplate,n?[n]:void 0),r?.setupForHeader(this),this.setMenu(),this.setupSort(),i?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(s,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const r=function zS(e,t,r){return e.getCompDetails(t,ES,void 0,r)}(e,t,t);r&&(this.isLoadingInnerComponent=!0,r.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,r=this.currentDisplayName;this.currentDisplayName=t,this.eText&&r!==t&&!this.innerHeaderComponent&&!this.isLoadingInnerComponent&&(this.eText.textContent=Hs(t))}addInIcon(e,t,r){const i=Ti(e,this.beans,r);i&&t.appendChild(i)}workOutShowMenu(){return this.params.enableMenu&&!!this.beans.menuSvc?.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return!!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu)return vr(this.eMenu),void(this.eMenu=void 0);const{gos:e,eMenu:t,params:r}=this,i=fi(e);this.addInIcon(i?"menu":"menuAlt",t,r.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){this.eMenu?.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){const{currentSuppressMenuHide:t,params:r}=this;t||this.toggleMenuAlwaysShow(!0),r.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){const{params:t,gos:r,beans:i,eMenu:s,eFilterButton:n}=this,o=t.column,a=fi(r);if(e&&!a){if(i.menuSvc?.isFilterMenuInHeaderEnabled(o))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:r}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));const{eSortIndicator:i,eSortOrder:s,eSortAsc:n,eSortDesc:o,eSortMixed:a,eSortNone:l}=this;i.attachCustomElements(s,n,o,a,l)}this.eSortIndicator.setupSort(r),this.currentSort&&e.setupHeader(this,r,this.eLabel)}setupFilterIcon(){const{eFilter:e,params:t}=this;e&&this.configureFilter(t.enableFilterIcon,e,()=>{const i=t.column.isFilterActive();at(e,i,{skipAriaHidden:!0})},"filterActive")}setupFilterButton(){const{eFilterButton:e,params:t}=this;e&&(this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0)}configureFilter(e,t,r,i){if(!e)return vr(t),!1;const s=this.params.column;return this.addInIcon(i,t,s),this.addManagedListeners(s,{filterChanged:r}),r(),!0}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){const{eFilterButton:t,eMenu:r}=this;return e?t??r??this.getGui():r??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent&&(this.destroyBean(this.innerHeaderComponent),this.innerHeaderComponent=void 0)}}},icons:{menu:"menu",menuAlt:"menu-alt"}},Hk={moduleName:"ColumnGroupHeaderComp",version:he,userComponents:{agColumnGroupHeader:class extends ft{constructor(){super(Ok),this.agOpened=ge,this.agClosed=ge,this.agLabel=ge,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t,touchSvc:r}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons(),r?.setupForHeaderGroup(this)}checkWarnings(){this.params.template&&ne(89)}workOutInnerHeaderGroupComponent(e,t){const r=function US(e,t,r){return e.getCompDetails(t,FS,void 0,r)}(e,t,t);r&&(this.isLoadingInnerComponent=!0,r.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:r},beans:i}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const s=l=>{if(Fs(l))return;const c=!r.isExpanded();i.colGroupSvc.setColumnGroupOpened(r.getProvidedColumnGroup(),c,"uiColumnExpanded")};this.addTouchAndClickListeners(i,t,s),this.addTouchAndClickListeners(i,e,s);const n=l=>{Ln(l)};this.addManagedElementListeners(t,{dblclick:n}),this.addManagedElementListeners(e,{dblclick:n}),this.addManagedElementListeners(this.getGui(),{dblclick:s}),this.updateIconVisibility();const o=r.getProvidedColumnGroup(),a=this.updateIconVisibility.bind(this);this.addManagedListeners(o,{expandedChanged:a,expandableChanged:a})}addTouchAndClickListeners(e,t,r){e.touchSvc?.setupForHeaderGroupElement(this,t,r),this.addManagedElementListeners(t,{click:r})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:r}}=this;if(r.isExpandable()){const i=r.isExpanded();at(e,i),at(t,!i)}else at(e,!1),at(t,!1)}addInIcon(e,t){const r=Ti(e,this.beans,null);r&&t.appendChild(r)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:r}=this;at(t,!1),at(r,!1)}}setupLabel(e){const{displayName:t,columnGroup:r}=e,i=this.innerHeaderGroupComponent||this.isLoadingInnerComponent;le(t)&&!i&&(this.agLabel.textContent=Hs(t)),this.toggleCss("ag-sticky-label",!r.getColGroupDef()?.suppressStickyLabel)}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}}},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},Vk={moduleName:"AnimationFrame",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(e){this.scrollGoingDown=e>=this.lastScrollTop,0===e&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){!1===this.active&&ne(92)}createTask(e,t,r,i,s=!1){this.verify();let n=r;i&&this.batchFrameworkComps&&(n="f1");const o={task:e,index:t,createOrder:++this.taskCount,deferred:s};this.addTaskToList(this[n],o),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((r,i)=>r.deferred!==i.deferred?r.deferred?-1:1:r.index!==i.index?t*(i.index-r.index):i.createOrder-r.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){const{p1:t,p2:r,f1:i,destroyTasks:s,beans:n}=this,{ctrlsSvc:o,frameworkOverrides:a}=n,l=t.list,c=r.list,d=i.list,u=Date.now();let h=0;const f=e<=0,p=o.getScrollFeature();for(;f||h<e;){if(!p.scrollGridIfNeeded()){let m;if(l.length)this.sortTaskList(t),m=l.pop().task;else if(c.length)this.sortTaskList(r),m=c.pop().task;else if(d.length)a.wrapOutgoing(()=>{for(;(f||h<e)&&!p.scrollGridIfNeeded()&&d.length;)this.sortTaskList(i),m=d.pop().task,m(),h=Date.now()-u}),m=()=>{};else{if(!s.length)break;m=s.pop()}m()}h=Date.now()-u}l.length||c.length||d.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);ws(this.beans,e)}isQueueEmpty(){return!this.ticking}}]},Uk={moduleName:"Touch",version:he,beans:[class extends Q{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){Pn()&&this.mockContextMenu(e,e.element,(r,i,s)=>{const{rowCtrl:n,cellCtrl:o}=e.getControlsForEventTarget(s?.target??null);o?.column&&o.dispatchCellContextMenuEvent(s??null),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,s,n,o)})}handleCellDoubleClick(e,t){return!!(()=>{if(!Pn()||dg("dblclick"))return!1;const i=Date.now(),s=i-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=i,s})()&&(e.onCellDoubleClicked(t),t.preventDefault(),!0)}setupForHeader(e){const{gos:t,sortSvc:r,menuSvc:i}=this.beans;if(t.get("suppressTouch"))return;const{params:s,eMenu:n,eFilterButton:o}=e,a=new Bn(e.getGui(),!0);e.addDestroyFunc(()=>a.destroy());const l=e.shouldSuppressMenuHide(),c=l&&le(n)&&s.enableMenu;let d=a;if(c&&(d=new Bn(n,!0),e.addDestroyFunc(()=>d.destroy())),s.enableMenu||i?.isHeaderContextMenuEnabled(s.column)){const u=c?"tap":"longTap",h=f=>s.showColumnMenuAfterMouseClick(f.touchStart);e.addManagedListeners(d,{[u]:h}),e.addManagedListeners(a,{longTap:h})}if(s.enableSorting&&e.addManagedListeners(a,{tap:h=>{const f=h.touchStart.target;l&&(n?.contains(f)||o?.contains(f))||r?.progressSort(s.column,!1,"uiColumnSorted")}}),s.enableFilterButton&&o){const u=new Bn(o,!0);e.addManagedListeners(u,{tap:()=>s.showFilter(o)}),e.addDestroyFunc(()=>u.destroy())}}setupForHeaderGroup(e){const t=e.params;if(this.beans.menuSvc?.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){const r=new Bn(t.eGridHeader,!0);e.addManagedListeners(r,{longTap:s=>t.showColumnMenuAfterMouseClick(s.touchStart)}),e.addDestroyFunc(()=>r.destroy())}}setupForHeaderGroupElement(e,t,r){const i=new Bn(t,!0);e.addManagedListeners(i,{tap:r}),e.addDestroyFunc(()=>i.destroy())}mockContextMenu(e,t,r){if(!Pn())return;const i=new Bn(t);e.addManagedListeners(i,{longTap:n=>{ca(this.beans,n.touchEvent)&&r(void 0,n.touchStart,n.touchEvent)}}),e.addDestroyFunc(()=>i.destroy())}}]},pm=class{constructor(){this.cellValidations=new Map}getCellValidation(e){const{rowNode:t,column:r}=e||{};return this.cellValidations?.get(t)?.get(r)}hasCellValidation(e){return e?.rowNode&&e.column?!!this.getCellValidation(e):this.cellValidations.size>0}setCellValidation(e,t){const{rowNode:r,column:i}=e;this.cellValidations.has(r)||this.cellValidations.set(r,new Map),this.cellValidations.get(r).set(i,t)}clearCellValidation(e){const{rowNode:t,column:r}=e;this.cellValidations.get(t)?.delete(r)}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},mm=class{constructor(){this.rowValidations=new Map}getRowValidation(e){const{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return e?.rowNode?!!this.getRowValidation(e):this.rowValidations.size>0}setRowValidation({rowNode:e},t){this.rowValidations.set(e,t)}clearRowValidation({rowNode:e}){this.rowValidations.delete(e)}setRowValidationMap(e){this.rowValidations=e}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}};function rh(e,t={}){const{rowIndex:r,rowId:i,rowCtrl:s,rowPinned:n}=t;if(s)return s;const{rowModel:o,rowRenderer:a}=e;let{rowNode:l}=t;return l||(i?l=function hE(e,t,r){const{rowModel:i,pinnedRowModel:s}=e;let n;return n??(n=i?.getRowNode(t)),r?n??(n=s?.getPinnedRowById(t,r)):(n??(n=s?.getPinnedRowById(t,"top")),n??(n=s?.getPinnedRowById(t,"bottom"))),n}(e,i,n):null!=r&&(l=o.getRow(r))),a.getRowCtrls(l?[l]:[])?.[0]}function zt(e,t={}){const{cellCtrl:r,colId:i,columnId:s,column:n}=t;if(r)return r;const o=e.colModel.getCol(i??s??ih(n)),a=t.rowCtrl??rh(e,t),l=a?.getCellCtrl(o)??void 0;if(l)return l;const c=t.rowNode??a?.rowNode;return c?e.rowRenderer.getCellCtrls([c],[o])?.[0]:void 0}function vm(e){const{editSvc:t}=e;t?.isBatchEditing()?Io(e):t?.stopEditing(void 0,{source:"api"})}function ih(e){if(e)return"string"==typeof e?e:e.getColId()}var Di=Symbol("unedited");function Cm(e,t={}){const r=[],i=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns);for(const s of i){const n=s.comp?.getCellEditor();n&&r.push({ctrl:s,editor:xa(n)})}return r}function ks({pendingValue:e,sourceValue:t}){return e===Di&&(e=t),e!==t}function Mo(e,t,r){const i=e.gos.get("enableGroupEdit"),{key:s,event:n,cellStartedEdit:o,silent:a}=r??{},l=zt(e,t),c=l?.comp?.getCellEditor(),d=xm(e,t,s,o&&!a),u=e.editModelSvc?.getEdit(t);let h=d.value;if(void 0===h&&(h=u?.sourceValue),e.editModelSvc?.setEdit(t,{editorValue:h,state:"editing"}),c)return void c.refresh?.(d);const f=t.column.getColDef(),p=fp(e.userCompFactory,f,d),g=null!=p?.popupFromSelector?p.popupFromSelector:!!f.cellEditorPopup,m=null!=p?.popupPositionFromSelector?p.popupPositionFromSelector:f.cellEditorPopupPosition;if(Sm(p.params,n),l){l.editCompDetails=p,l.onEditorAttachedFuncs.push(()=>l.rangeFeature?.unsetComp()),l.comp?.setEditDetails(p,g,m,e.gos.get("reactiveCustomComponents")),l?.rowCtrl?.refreshRow({suppressFlash:!0});const v=e.editModelSvc?.getEdit(t,!0);!a&&!v?.editorState?.cellStartedEditing&&(e.editSvc?.dispatchCellEvent(t,n,"cellEditingStarted",i?{value:h}:{}),e.editModelSvc?.setEdit(t,{editorState:{cellStartedEditing:!0}}))}}function wm(e,t,r){const i={editorValueExists:!1};if(nh(e)&&(t.getValidationErrors?.()?.length??0)>0||r?.isCancelling)return i;if(r?.isStopping){const n=t?.isCancelAfterEnd?.();if(n)return{...i,isCancelAfterEnd:n}}return{editorValue:t.getValue(),editorValueExists:!0}}function xm(e,t,r,i){const{valueSvc:s,gos:n,editSvc:o}=e,a=e.gos.get("enableGroupEdit"),l=zt(e,t),c=t.rowNode?.rowIndex??void 0,d=o?.isBatchEditing(),u=e.colModel.getCol(t.column.getId()),{rowNode:h,column:f}=t,p=l.comp?.getCellEditor(),g=o?.getCellDataValue(t,!1),m=void 0===g?p?wm(e,p)?.editorValue:void 0:g,v=m===Di?s.getValueForDisplay(u,h)?.value:m;return _e(n,{value:a?m:v,eventKey:r??null,column:f,colDef:f.getColDef(),rowIndex:c,node:h,data:h.data,cellStartedEdit:i??!1,onKeyDown:l?.onKeyDown.bind(l),stopEditing:w=>{o.stopEditing(t,{source:d?"ui":"api",suppressNavigateAfterEdit:w}),wc(e,t)},eGridCell:l?.eGui,parseValue:w=>s.parseValue(u,h,w,l?.value),formatValue:l?.formatValue.bind(l),validate:()=>{o?.validateEdit()}})}function sh(e,t){const{editModelSvc:r}=e;r?.getEditMap().forEach((i,s)=>{i.forEach((n,o)=>{!t&&("editing"===n.state||n.pendingValue===Di)||!ks(n)&&("editing"!==n.state||t)&&r?.removeEdits({rowNode:s,column:o})})})}function Sm(e,t){return t instanceof KeyboardEvent&&"agNumberCellEditor"===e.column.getColDef().cellEditor?e.suppressPreventDefault=["-","+",".","e"].includes(t?.key??"")||e.suppressPreventDefault:t?.preventDefault?.(),e}function Hn(e,t){for(const r of e.editModelSvc?.getEditPositions()??[]){const i=zt(e,r);if(!i)continue;const s=i.comp?.getCellEditor();if(!s)continue;const{editorValue:n,editorValueExists:o,isCancelAfterEnd:a}=wm(e,s,t);a&&e.editModelSvc?.setEdit(r,{editorState:{isCancelAfterEnd:a}}),Cc(e,r,n,0,!o,t)}}function Cc(e,t,r,i,s,n){const{editModelSvc:o,valueSvc:a}=e;if(!o)return;const{rowNode:l,column:c}=t;if(!l||!c)return;let d=o.getEdit(t,!0);d?.sourceValue||(d=o.setEdit(t,{sourceValue:a.getValue(c,l,void 0,"api"),pendingValue:d?d.editorValue:Di})),o.setEdit(t,{editorValue:s?d.sourceValue:r}),n?.persist&&function iT(e,t){const{editModelSvc:r}=e,i=r?.getEdit(t,!0);r?.setEdit(t,{pendingValue:i?.editorValue})}(e,t)}function Io(e,t,r){t||(t=e.editModelSvc?.getEditPositions());for(const i of t??[])wc(e,i,r)}function wc(e,t,r){const i=e.gos.get("enableGroupEdit"),{editModelSvc:s}=e,n=zt(e,t),o=s?.getEdit(t,!0);if(!n)return void(o&&s?.setEdit(t,{state:"changed"}));const{comp:a}=n;if(a&&!a.getCellEditor())return n?.refreshCell(),void(o&&(s?.setEdit(t,{state:"changed"}),ym(e,t,i?bm(r,o):{valueChanged:!1,newValue:void 0,oldValue:o.sourceValue},r)));if(nh(e)){const c=a?.getCellEditor()?.getValidationErrors?.(),d=s?.getCellValidationModel();c?.length?d?.setCellValidation(t,{errorMessages:c}):d?.clearCellValidation(t)}s?.setEdit(t,{state:"changed"}),a?.setEditDetails(),a?.refreshEditStyles(!1,!1),n?.refreshCell({force:!0,suppressFlash:!0});const l=s?.getEdit(t);l&&"changed"===l.state&&ym(e,t,i?bm(r,l):{valueChanged:ks(l)&&!r?.cancel,newValue:r?.cancel||l.editorState.isCancelAfterEnd?void 0:l?.editorValue??o?.pendingValue,oldValue:l?.sourceValue},r)}function bm(e,t){return e?.cancel?{valueChanged:!1,oldValue:t.sourceValue,newValue:void 0,value:t.sourceValue}:{valueChanged:!1,oldValue:t.sourceValue,newValue:t.pendingValue,value:t.sourceValue}}function ym(e,t,r,{silent:i,event:s}={}){const{editSvc:n,editModelSvc:o}=e,a=o?.getEdit(t),{editorState:l}=a||{},{isCancelBeforeStart:c}=l||{};!i&&!c&&(n?.dispatchCellEvent(t,s,"cellEditingStopped",r),o?.setEdit(t,{editorState:{cellStoppedEditing:!0}}))}function nh(e){const{gos:t,colModel:r}=e,i=!!t.get("getFullRowEditValidationErrors"),s=r.getColumnDefs()?.filter(o=>o.editable).some(({cellEditorParams:o})=>{const{minLength:a,maxLength:l,getValidationErrors:c,min:d,max:u}=o||{};return void 0!==a||void 0!==l||void 0!==c||void 0!==d||void 0!==u}),n=e.gridApi.getCellEditorInstances().some(o=>o.getValidationElement||o.getValidationErrors);return s||i||n}function Gn(e,t){if(!t&&!nh(e))return;const r=Cm(e),i=new pm,{ariaAnnounce:s,localeSvc:n,editModelSvc:o,gos:a}=e,l="fullRow"===a.get("editType"),d=hg(n)("ariaValidationErrorPrefix","Cell Editor Validation");for(const h of r){const{ctrl:f,editor:p}=h,{rowNode:g,column:m}=f,v=p.getValidationErrors?.()??[],w=p.getValidationElement?.(!1)||!p.isPopup?.()&&f.eGui;if(w){const C=null!=v&&v.length>0,y=C?v.join(". "):"";Oe(w,C),C&&s.announceValue(`${d} ${v}`,"editorValidation"),w instanceof HTMLInputElement?w.setCustomValidity(y):w.classList.toggle("invalid",C)}v?.length>0&&i.setCellValidation({rowNode:g,column:m},{errorMessages:v})}Hn(e,{persist:!1}),o?.setCellValidationModel(i);const u=new Set;for(const{ctrl:h}of r)u.add(h.rowCtrl);if(l){const h=sT(e);o?.setRowValidationModel(h)}for(const h of u.values()){h.rowEditStyleFeature?.applyRowStyles();for(const f of h.getAllCellCtrls())f.tooltipFeature?.refreshTooltip(!0),f.editorTooltipFeature?.refreshTooltip(!0),f.editStyleFeature?.applyCellStyles?.()}}var sT=e=>{const t=new mm,r=e.gos.get("getFullRowEditValidationErrors"),i=e.editModelSvc?.getEditMap();if(!i)return t;for(const s of i.keys()){const n=i.get(s);if(!n)continue;const o=[],{rowIndex:a,rowPinned:l}=s;for(const d of n.keys()){const u=n.get(d);if(!u)continue;const{editorValue:h,pendingValue:f,sourceValue:p}=u,g=h??(f===Di?void 0:f)??p;o.push({column:d,colId:d.getColId(),rowIndex:a,rowPinned:l,oldValue:p,newValue:g})}const c=r?.({editorsState:o})??[];c.length>0&&t.setRowValidation({rowNode:s},{errorMessages:c})}return t},lT=class extends Q{constructor(e,t,r,i){super(),this.cellCtrl=e,this.rowNode=r,this.rowCtrl=i,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){const t=e.key;switch(t){case"Enter":this.onEnterKeyDown(e);break;case"F2":this.onF2KeyDown(e);break;case"Escape":this.onEscapeKeyDown(e);break;case"Tab":this.onTabKeyDown(e);break;case"Backspace":case"Delete":this.onBackspaceOrDeleteKeyDown(t,e);break;case U_DOWN:case U_UP:case U_RIGHT:case U_LEFT:this.onNavigationKeyDown(e,t)}}onNavigationKeyDown(e,t){const{cellCtrl:r,beans:i}=this;if(!i.editSvc?.isEditing(r,{withOpenEditor:!0})){if(e.shiftKey&&r.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const s=r.getFocusedCellPosition();i.navigation?.navigateToNextCell(e,t,s,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:r}=this.beans;if(!t)return;const i=t.extendLatestRangeInDirection(e);i&&(e.key===U_LEFT||e.key===U_RIGHT?r?.ensureColumnVisible(i.column):r?.ensureRowVisible(i.rowIndex))}onTabKeyDown(e){this.beans.navigation?.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){const{cellCtrl:r,beans:i,rowNode:s}=this,{gos:n,rangeSvc:o,eventSvc:a,editSvc:l}=i;if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),function aT(e,t=!1){return"Delete"===e||!t&&"Backspace"===e&&mp()}(e,n.get("enableCellEditingOnBackspace"))&&!l?.isEditing(r,{withOpenEditor:!0})){if(o&&xs(n))o.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(r.isCellEditable()){const{column:c}=r,d=this.beans.valueSvc.getDeleteValue(c,s);s.setDataValue(c,d,"cellClear")}}else l?.isEditing(r,{withOpenEditor:!0})||i.editSvc?.startEditing(r,{startedEdit:!0,event:t});a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(e){const{cellCtrl:t,beans:r}=this,{editSvc:i,navigation:s}=r,n=i?.isEditing(t,{withOpenEditor:!0}),o=t.rowNode,a=i?.isRowEditing(o,{withOpenEditor:!0}),l=c=>{i?.startEditing(c,{startedEdit:!0,event:e,source:"edit"})&&e.preventDefault()};if(n||a){if(this.isCtrlEnter(e))return void i?.applyBulkEdit(t,r?.rangeSvc?.getCellRanges()||[]);if(Gn(r),"block-stop"===i?.checkNavWithValidation(void 0,e))return;i?.isEditing(t,{withOpenEditor:!0})?i?.stopEditing(t,{event:e,source:"edit"}):a&&!t.isCellEditable()?i?.stopEditing({rowNode:o},{event:e,source:"edit"}):l(t)}else if(r.gos.get("enterNavigatesVertically")){const c=e.shiftKey?U_UP:U_DOWN;s?.navigateToNextCell(null,c,t.cellPosition,!1)}else{if(i?.hasValidationErrors())return;i?.hasValidationErrors(t)&&i.revertSingleCellEdit(t,!0),l(t)}}isCtrlEnter(e){return(e.ctrlKey||e.metaKey)&&"Enter"===e.key}onF2KeyDown(e){const{cellCtrl:t,beans:{editSvc:r}}=this;r?.isEditing()&&(Gn(this.beans),"block-stop"===r?.checkNavWithValidation(void 0,e))||r?.startEditing(t,{startedEdit:!0,event:e})}onEscapeKeyDown(e){const{cellCtrl:t,beans:{editSvc:r}}=this;"block-stop"===r?.checkNavWithValidation(t,e)&&r.revertSingleCellEdit(t),r?.stopEditing(t,{event:e,cancel:!0})}processCharacter(e){const r=e.target!==this.eGui,{beans:{editSvc:i},cellCtrl:s}=this;if(!r&&!i?.isEditing(s,{withOpenEditor:!0}))if(" "===e.key)this.onSpaceKeyDown(e);else if(i?.isCellEditable(s,"ui")){if(i?.hasValidationErrors()&&!i?.hasValidationErrors(s))return;i?.startEditing(s,{startedEdit:!0,event:e,source:"api"}),!s.editCompDetails?.params?.suppressPreventDefault&&e.preventDefault()}}onSpaceKeyDown(e){const{gos:t,editSvc:r}=this.beans,{rowNode:i}=this.cellCtrl;!r?.isEditing(this.cellCtrl,{withOpenEditor:!0})&&Rn(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,i,"spaceKey"),e.preventDefault()}},cT=class extends Q{constructor(e,t,r){super(),this.cellCtrl=e,this.column=r,this.beans=t}onMouseEvent(e,t){if(!Fs(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t)}}onCellClicked(e){if(this.beans.touchSvc?.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:r,editSvc:i,editModelSvc:s,frameworkOverrides:n,gos:o}=this.beans,a=e.ctrlKey||e.metaKey,{cellCtrl:l}=this,{column:c,cellPosition:d,rowNode:u}=l,h=Yl(o,c,u,e);r&&a&&!h&&r.getCellRangeCount(d)>1&&r.intersectLastRange(!0);const f=l.createEvent(e,"cellClicked");f.isEventHandlingSuppressed=h,t.dispatchEvent(f);const p=c.getColDef();if(p.onCellClicked&&window.setTimeout(()=>{n.wrapOutgoing(()=>{p.onCellClicked(f)})},0),!h&&"editing"!==s?.getState(l)){const g=i?.isEditing(),m=s?.getCellValidationModel().getCellValidationMap().size??0,v=s?.getRowValidationModel().getRowValidationMap().size??0;if(g&&(m>0||v>0))return;i?.shouldStartEditing(l,e)?i?.startEditing(l,{event:e}):i?.shouldStopEditing(l,e)&&("fullRow"===this.beans.gos.get("editType")?i?.stopEditing(l,{event:e,source:"edit"}):i?.stopEditing(void 0,{event:e,source:"edit"}))}}onCellDoubleClicked(e){const{column:t,beans:r,cellCtrl:i}=this,{eventSvc:s,frameworkOverrides:n,editSvc:o,editModelSvc:a,gos:l}=r,c=Yl(l,i.column,i.rowNode,e),d=t.getColDef(),u=i.createEvent(e,"cellDoubleClicked");if(u.isEventHandlingSuppressed=c,s.dispatchEvent(u),"function"==typeof d.onCellDoubleClicked&&window.setTimeout(()=>{n.wrapOutgoing(()=>{d.onCellDoubleClicked(u)})},0),!c&&o?.shouldStartEditing(i,e)&&"editing"!==a?.getState(i)){const h=o?.isEditing(),f=a?.getCellValidationModel().getCellValidationMap().size??0,p=a?.getRowValidationModel().getRowValidationMap().size??0;if(h&&(f>0||p>0))return;o?.startEditing(i,{event:e})}}onMouseDown(e){const{ctrlKey:t,metaKey:r,shiftKey:i}=e,s=e.target,{cellCtrl:n,beans:o}=this,{eventSvc:a,rangeSvc:l,rowNumbersSvc:c,focusSvc:d,gos:u,editSvc:h}=o,{column:f,rowNode:p,cellPosition:g}=n,m=Yl(u,f,p,e),v=()=>{const k=n.createEvent(e,"cellMouseDown");k.isEventHandlingSuppressed=m,a.dispatchEvent(k)};if(m)return void v();if(this.isRightClickInExistingRange(e))return;const w=l&&!l.isEmpty(),C=this.containsWidget(s),y=ys(f);if(c&&y&&!c.handleMouseDownOnCell(g,e))return l&&e.preventDefault(),void e.stopImmediatePropagation();if(!i||!w){const k=h?.isEditing(n),S=u.get("enableCellTextSelection")&&e.defaultPrevented,_=(Ys()||S)&&!k&&!ci(s)&&!C;n.focusCell(_,e)}if(i&&w&&!d.isCellFocused(g)){e.preventDefault();const k=d.getFocusedCell();if(k){const{column:E,rowIndex:S,rowPinned:_}=k;h?.isEditing(k)&&h?.stopEditing(k),d.setFocusedCell({column:E,rowIndex:S,rowPinned:_,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}if(!C){if(l){y&&e.preventDefault();const k=zg(o,e)&&y;i?l.extendLatestRangeToCell(g):k||l.setRangeToCell(g,t||r)}v()}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const r=t.isCellInAnyRange(this.cellCtrl.cellPosition),i=zg(this.beans,e);if(r&&i)return!0}return!1}containsWidget(e){return Or(e,"ag-selection-checkbox",3)||Or(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:r}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),r?.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:r}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),r?.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.eGui,r=t.contains(e.target),i=t.contains(e.relatedTarget);return r&&i}},dT=class extends Q{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.column,this.rowNode=e.rowNode}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}init(){this.eSetLeft=this.cellCtrl.getRootElement(),this.eContent=this.cellCtrl.eGui;const e=this.cellCtrl.getCellSpan();if(e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e){const t=this.refreshSpanHeight.bind(this,e);t(),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:t,recalculateRowBounds:t,pinnedHeightChanged:t})}}refreshSpanHeight(e){const t=e.getCellHeight();null!=t&&(this.eContent.style.height=`${t}px`)}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();qs(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){null!=this.column.getColDef().colSpan&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eContent)return;const e=this.getCellWidth();this.eContent.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){const{column:e,rowNode:t}=this,r=e.getColSpan(t),i=[];if(1===r)i.push(e);else{let s=e;const n=e.getPinned();for(let o=0;s&&o<r&&(i.push(s),s=this.beans.visibleCols.getColAfter(s),s&&!pt(s)&&n===s.getPinned());o++);}return i}onLeftChanged(){if(!this.eSetLeft)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eSetLeft.style.left=e+"px"}getCellLeft(){let e;return e=this.beans.gos.get("enableRtl")&&this.colsSpanning?kt(this.colsSpanning):this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||"left"===this.column.getPinned())return e;const{visibleCols:t}=this.beans,r=t.getColsLeftWidth();return"right"===this.column.getPinned()?r+t.bodyWidth+(e||0):r+(e||0)}_legacyApplyRowSpan(e){if(1===this.rowSpan&&!e)return;const r=kn(this.beans)*this.rowSpan;this.eContent.style.height=`${r}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},wT=0,_o=class extends Q{constructor(e,t,r,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=r,this.gos=r.gos,this.editSvc=r.editSvc,this.hasEdit=!!r.editSvc;const{colId:s}=e;this.instanceId=s+"-"+wT++,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){const{beans:e}=this;this.positionFeature=new dT(this,e),this.customStyleFeature=e.cellStyles?.createCellCustomStyleFeature(this,e),this.editStyleFeature=e.editSvc?.createCellStyleFeature(this,e),this.mouseListener=new cT(this,e,this.column),this.keyboardListener=new lT(this,e,this.rowNode,this.rowCtrl),this.enableTooltipFeature();const{rangeSvc:t}=e;t&&xs(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(e,this)),ys(this.column)&&(this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(e,this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.editorTooltipFeature=e.destroyBean(this.editorTooltipFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.editStyleFeature=e.destroyBean(this.editStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.rowResizeFeature=e.destroyBean(this.rowResizeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}enableEditorTooltipFeature(e){this.editorTooltipFeature&&this.disableEditorTooltipFeature(),this.editorTooltipFeature=this.beans.tooltipSvc?.setupCellEditorTooltip(this,e),Gn(this.beans)}disableEditorTooltipFeature(){this.editorTooltipFeature=this.beans.context.destroyBean(this.editorTooltipFeature)}setComp(e,t,r,i,s,n,o){if(this.comp=e,this.eGui=t,this.printLayout=s,o??(o=this),this.addDomData(o),this.addFeatures(),o.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,o),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(e),this.editStyleFeature?.setComp(e),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(e),this.rowResizeFeature?.refreshRowResizer(),n&&this.isCellEditable()||this.hasEdit&&this.editSvc?.isEditing(this,{withOpenEditor:!0})?this.editSvc?.startEditing(this,{startedEdit:!1,source:"api",silent:!0,continueEditing:!0}):this.showValue(!1,!0),this.onCompAttachedFuncs.length){for(const a of this.onCompAttachedFuncs)a();this.onCompAttachedFuncs=[]}}setupAutoHeight(e,t){this.isAutoHeight=this.beans.rowAutoHeight?.setupCellAutoHeight(this,e,t)??!1}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.getColDef();return null!=e.cellRenderer||null!=e.cellRendererSelector}getValueToDisplay(){return this.valueFormatted??this.value}getDeferLoadingCellRenderer(){const{beans:e,column:t}=this,{userCompFactory:r,ctrlsSvc:i,eventSvc:s}=e,n=t.getColDef(),o=this.createCellRendererParams();o.deferRender=!0;const a=hp(r,n,o);if(i.getGridBodyCtrl()?.scrollFeature?.isScrolling()){let l;const c=new $t(u=>{l=u}),[d]=this.addManagedListeners(s,{bodyScrollEnd:()=>{l(),d()}});return{loadingComp:a,onReady:c}}return{loadingComp:a,onReady:$t.resolve()}}showValue(e,t){const{beans:r,column:i,rowNode:s,rangeFeature:n}=this,{userCompFactory:o}=r;let l,a=this.getValueToDisplay();const c=s.stub&&null==s.groupData?.[i.getId()],d=i.getColDef();if(c||this.isCellRenderer()){const u=this.createCellRendererParams();l=!c||ys(i)?up(o,d,u):hp(o,d,u)}if(!l&&!c&&r.findSvc?.isMatch(s,i)){const u=this.createCellRendererParams();l=up(o,{...i.getColDef(),cellRenderer:"agFindCellRenderer"},u)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(s,{checkSiblings:!0})){const u=this.editSvc.prepDetailsDuringBatch(this,{compDetails:l,valueToDisplay:a});u&&(u.compDetails?l=u.compDetails:u.valueToDisplay&&(a=u.valueToDisplay))}this.comp.setRenderDetails(l,a,e),this.customRowDragComp?.refreshVisibility(),!t&&n&&ws(r,()=>n?.refreshHandle()),this.rowResizeFeature?.refreshRowResizer()}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e),!0),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}getCellValueClass(){let r="";return"agCheckboxCellRenderer"===this.column.getColDef().cellRenderer&&(r=" ag-allow-overflow"),`ag-cell-value${r}`}isIncludeControl(e,t=!1){return(null==this.rowNode.rowPinned||t&&Ra(this.rowNode))&&!!e}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:r}=this.beans.gridOptions,i=Ml(t),s=bs(this.column);return("custom"!==r||"selectionColumn"===i||!s)&&(e.checkboxSelection||s&&"object"==typeof t&&wo(t))}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),r=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),i=this.includeDndSource!=this.isIncludeControl(e.dndSource),s=this.isAutoHeight!=this.column.isAutoHeight();return t||r||i||s}onPopupEditorClosed(){const{editSvc:e}=this.beans;e?.isEditing(this,{withOpenEditor:!0})&&e?.stopEditing(this,{source:e?.isBatchEditing()?"ui":"api"})}stopEditing(e=!1){const{editSvc:t}=this.beans;return t?.stopEditing(this,{cancel:e,source:t?.isBatchEditing()?"ui":"api"})??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:r,rowNode:i,comp:s,eGui:n,beans:{valueSvc:o,gos:a,editSvc:l}}=this;return _e(a,{value:e,valueFormatted:t,getValue:()=>o.getValueForDisplay(r,i).value,setValue:d=>l?.setDataValue({rowNode:i,column:r},d)||i.setDataValue(r,d),formatValue:this.formatValue.bind(this),data:i.data,node:i,pinned:r.getPinned(),colDef:r.getColDef(),column:r,refreshCell:this.refreshCell.bind(this),eGridCell:n,eParentOfValue:s.getParentOfValue(),registerRowDragger:(d,u,h,f)=>this.registerRowDragger(d,u,f),setTooltip:(d,u)=>{a.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(d,u),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){if(this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e),this.hasEdit&&this.editCompDetails){const{editSvc:t,comp:r}=this;!r?.getCellEditor()&&t.isEditing(this,{withOpenEditor:!0})&&t.startEditing(this,{startedEdit:!1,source:"api",silent:!0})}}refreshCell({force:e,suppressFlash:t,newData:r}={}){const{editStyleFeature:i,customStyleFeature:s,rowCtrl:{rowEditStyleFeature:n},beans:{cellFlashSvc:o,filterManager:a},column:l,comp:c,suppressRefreshCell:d,tooltipFeature:u}=this;if(d)return;const{field:h,valueGetter:f,showRowGroup:p,enableCellChangeFlash:g}=l.getColDef(),v=e||null==h&&null==f&&null==p||r,w=!!c,C=this.updateAndFormatValue(w);if(w){if(v||C){this.showValue(!!r,!1);const k=a?.isSuppressFlashingCellsBecauseFiltering();!t&&!k&&g&&o?.flashCell(this),i?.applyCellStyles?.(),s?.applyUserStyles(),s?.applyClassesFromColDef(),n?.applyRowStyles()}u?.refreshTooltip(),s?.applyCellClassRules()}}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){return this.callValueFormatter(e)??e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){const t=this.value,r=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!=r}valuesAreEqual(e,t){const r=this.column.getColDef();return r.equals?r.equals(e,t):e===t}addDomData(e){const t=this.eGui;Tn(this.beans.gos,t,Ql,this),e.addDestroyFunc(()=>Tn(this.beans.gos,t,Ql,null))}createEvent(e,t){const{rowNode:r,column:i,value:s,beans:n}=this;return function oT(e,t,r,{rowNode:i,column:s},n){return _e(e.gos,{type:r,node:i,data:i.data,value:n,column:s,colDef:s.getColDef(),rowPinned:i.rowPinned,event:t,rowIndex:i.rowIndex})}(n,e,t,{rowNode:r,column:i},s)}processCharacter(e){this.keyboardListener?.processCharacter(e)}onKeyDown(e){this.keyboardListener?.onKeyDown(e)}onMouseEvent(e,t){this.mouseListener?.onMouseEvent(e,t)}getColSpanningList(){return this.positionFeature?.getColSpanningList()??[]}onLeftChanged(){this.comp&&this.positionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:r}=this;d0(e,t,r.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);Lr(this.eGui,e)}onWidthChanged(){return this.positionFeature?.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){this.comp&&this.rangeFeature?.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.comp&&this.rangeFeature?.onCellSelectionChanged()}isRangeSelectionEnabled(){return null!=this.rangeFeature}focusCell(e=!1,t){const r=this.editSvc?.allowedFocusTargetOnValidation(this);r&&r!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e,sourceEvent:t})}restoreFocus(e=!1){const{beans:{editSvc:t,focusSvc:r},comp:i}=this;if(!i||t?.isEditing(this)||!this.isCellFocused()||!r.shouldTakeFocus())return;const s=()=>{if(!this.isAlive())return;const n=i.getFocusableElement();this.isCellFocused()&&n.focus({preventScroll:!0})};e?setTimeout(s,0):s()}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged(),this.rowResizeFeature?.refreshRowResizer()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&(ys(this.column)&&(e=!0),hi(t,"tabindex",e?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.toggleCss("ag-cell-first-right-pinned",e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.toggleCss("ag-cell-last-left-pinned",e)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){const e=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=e),e}setupFocus(){this.restoreFocus(!0),this.onCellFocused(this.focusEventWhileNotReady??void 0)}onCellFocused(e){const{beans:t}=this;if(nc(t))return;if(!this.comp)return void(e&&(this.focusEventWhileNotReady=e));const r=this.isCellFocused(),i=t.editSvc?.isEditing(this)??!1;if(this.comp.toggleCss("ag-cell-focus",r),r&&e?.forceBrowserFocus){let s=this.comp.getFocusableElement();if(i){const n=bo(s,null,!0);n.length&&(s=n[0])}s.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}r&&e&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:zi(t),column:this.column}}applyStaticCssClasses(){const{comp:e}=this;e.toggleCss("ag-cell",!0),e.toggleCss("ag-cell-not-inline-editing",!0);const t=1==this.column.isAutoHeight();e.toggleCss("ag-cell-auto-height",t),e.toggleCss("ag-cell-normal-height",!t)}onColumnHover(){this.beans.colHover?.onCellColumnHover(this.column,this.comp)}onColDefChanged(){this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editSvc?.isEditing(this)?this.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){const e=1==this.column.getColDef().wrapText;this.comp.toggleCss("ag-cell-wrap-text",e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),r=this.createEvent(e,"cellContextMenu"),{beans:i}=this;i.eventSvc.dispatchEvent(r),t.onCellContextMenu&&window.setTimeout(()=>{i.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(r)})},0)}getCellRenderer(){return this.comp?.getCellRenderer()??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){return this.eGui?.contains(mt(this.beans))??!1}createSelectionCheckbox(){const e=this.beans.selectionSvc?.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,r){if(this.customRowDragComp)return void this.customRowDragComp.setDragElement(e,t);const i=this.createRowDragComp(e,t,r);i&&(this.customRowDragComp=i,this.addDestroyFunc(()=>{this.beans.context.destroyBean(i),this.customRowDragComp=null}),i.refreshVisibility())}createRowDragComp(e,t,r){const i=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,r);if(i)return this.beans.context.createBean(i),i}cellEditorAttached(){for(const e of this.onEditorAttachedFuncs)e();this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){}getRootElement(){return this.eGui}};function oh(e,t,r,i,s,n){if(null==r&&null==t)return;const o={},a={},l=(c,d)=>{for(const u of c.split(" "))""!=u.trim()&&d(u)};if(r){const c=Object.keys(r);for(let d=0;d<c.length;d++){const u=c[d],h=r[u];let f;"string"==typeof h?f=!e||e.evaluate(h,i):"function"==typeof h&&(f=h(i)),l(u,p=>{f?o[p]=!0:a[p]=!0})}}if(t&&n)for(const c of Object.keys(t))l(c,d=>{o[d]||(a[d]=!0)});n&&Object.keys(a).forEach(n),Object.keys(o).forEach(s)}function Em(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var ST=0,xc=class extends Q{constructor(e,t,r,i,s){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=t.pagination?.getCurrentPage()??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+ST++,this.rowId=Rr(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=Em(this.rowNode),this.setRowType(),this.setAnimateFlags(r),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=t.editSvc?.createRowStyleFeature(this,t),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if("function"!=typeof this.businessKeyForNodeFunc)return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=Rr(e)}updateGui(e,t){"left"===e?this.leftGui=t:"right"===e?this.rightGui=t:"fullWidth"===e?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,r,i){const{context:s,focusSvc:n}=this.beans,o={rowComp:e,element:t,containerType:r,compBean:i=Ca(this,s,i)};this.allRowGuis.push(o),this.updateGui(r,o),this.initialiseRowComp(o);const a=this.rowNode,l="FullWidthLoading"===this.rowType||a.stub,c=!a.data&&"infinite"===this.beans.rowModel.getType();!l&&!c&&!a.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent();const d=this.fullWidthGui?.element;d&&!this.beans.editSvc?.isEditing(this)&&n.isRowFocused(a.rowIndex,a.rowPinned)&&n.shouldTakeFocus()&&setTimeout(()=>d.focus({preventScroll:!0}),0)}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return"FullWidthDetail"===this.rowType&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";for(const r of this.allRowGuis)r.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),Rn(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const r=e.rowComp,i=this.getInitialRowClasses(e.containerType);for(const s of i)r.toggleCss(s,!0);this.executeSlideAndFadeAnimations(e),this.rowNode.group&&$e(e.element,1==this.rowNode.expanded),this.setRowCompRowId(r),this.setRowCompRowBusinessKey(r),Tn(t,e.element,Jl,this),e.compBean.addDestroyFunc(()=>Tn(t,e.element,Jl,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"p2",!1):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&e.rowComp.toggleCss("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){null!=this.businessKey&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=Rr(this.rowNode.id);this.rowId=t,null!=t&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(Ed(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(Ed(()=>{e.rowComp.toggleCss("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){const t=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const r=this.createBean(t,this.beans.context);this.rowDragComps.push(r),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(i=>i!==r),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),this.destroyBean(r,this.beans.context)})}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),r=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(r)}getFullWidthCellRenderers(){return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(e=>e?.rowComp?.getFullWidthCellRenderer()):[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");e&&this.areAllContainersReady()&&e({eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)})}areAllContainersReady(){const{leftGui:e,centerGui:t,rightGui:r,beans:{visibleCols:i}}=this,s=!!e||!i.isPinningLeft(),n=!!t,o=!!r||!i.isPinningRight();return s&&n&&o}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return!!e&&e({rowNode:this.rowNode})}setRowType(){const e=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow")&&!this.gos.get("groupHideOpenParents"),t=this.isNodeFullWidthCell(),r=this.gos.get("masterDetail")&&this.rowNode.detail,i=this.beans.colModel.isPivotMode(),s=Ng(this.gos,this.rowNode,i);this.rowType=e?"FullWidthLoading":r?"FullWidthDetail":t?"FullWidth":s?"FullWidthGroup":"Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:r}=this.beans;!r?.active||e||this.printLayout?this.updateColumnListsImpl(t):this.updateColumnListsPending||(r.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(e){if(!this.beans.rowSpanSvc?.isCellSpanning(e,this.rowNode))return new _o(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){return!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}createCellCtrls(e,t,r=null){const i={list:[],map:{}},s=(c,d,u)=>{null!=u?i.list.splice(u,0,d):i.list.push(d),i.map[c]=d},n=[];for(const c of t){const d=c.getInstanceId();let u=e.map[d];u&&!this.isCorrectCtrlForSpan(u)&&(u.destroy(),u=void 0),u||(u=this.getNewCellCtrl(c)),u&&s(d,u)}for(const c of e.list){const d=c.column.getInstanceId();null==i.map[d]&&(this.isCellEligibleToBeRemoved(c,r)?c.destroy():n.push([d,c]))}if(n.length)for(const[c,d]of n){const u=i.list.findIndex(f=>f.column.getLeft()>d.column.getLeft()),h=-1===u?void 0:Math.max(u-1,0);s(c,d,h)}const{focusSvc:o,visibleCols:a}=this.beans,l=o.getFocusedCell();if(l&&l.column.getPinned()==r){const c=l.column.getInstanceId();if(!i.map[c]&&a.allCols.includes(l.column)){const u=this.createFocusedCellCtrl();if(u){const h=i.list.findIndex(p=>p.column.getLeft()>u.column.getLeft()),f=-1===h?void 0:Math.max(h-1,0);s(c,u,f)}}}return i}createFocusedCellCtrl(){const{focusSvc:e,rowSpanSvc:t}=this.beans,r=e.getFocusedCell();if(!r)return;const i=t?.getCellSpan(r.column,this.rowNode);if(i){if(i.firstNode!==this.rowNode||!i.doesSpanContain(r))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(r.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){for(const t of this.allRowGuis){const r=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(r,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 r=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,r);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:o}=this.beans,a=o?.isEditing(e),l=e.isCellFocused();return!a&&!l||!(n.allCols.indexOf(s)>=0)}getDomOrder(){return this.gos.get("ensureDomOrder")||Dr(this.gos,"print")}listenOnDomOrder(e){e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],()=>{e.rowComp.setDomOrder(this.getDomOrder())})}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;const t=le(this.rowNode.oldRowTop),{visibleCols:r}=this.beans,i=r.isPinningLeft(),s=r.isPinningRight();if(t){const{slideInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows"))return void(n.fullWidth=!0);n.center=!0,n.left=i,n.right=s}else{const{fadeInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows"))return void(n.fullWidth=!0);n.center=!0,n.left=i,n.right=s}}isFullWidth(){return"Normal"!==this.rowType}refreshFullWidth(){const e=(o,a)=>!o||o.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(o.element,a).params),t=e(this.fullWidthGui,null),r=e(this.centerGui,null),i=e(this.leftGui,"left"),s=e(this.rightGui,"right");return t&&r&&i&&s}addListeners(){const{beans:e,gos:t,rowNode:r}=this,{expansionSvc:i,eventSvc:s,context:n,rowSpanSvc:o}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...i?.getRowExpandedListeners(this)??{}}),r.detail&&this.addManagedListeners(r.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(r,{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()}),o&&this.addManagedListeners(o,{spannedCellsUpdated:({pinned:a})=>{a&&!r.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,n),this.tooltipFeature=this.destroyBean(this.tooltipFeature,n),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,n)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(t.get("rowDragEntireRow"))for(const l of this.allRowGuis)this.addRowDraggerToRow(l);else this.rowDragComps=this.destroyBeans(this.rowDragComps,n)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{for(const e of this.getAllCellCtrls())e.onRowIndexChanged()},cellChanged:e=>{for(const t of this.getAllCellCtrls())t.onCellChanged(e)}})}onRowPinned(){for(const e of this.allRowGuis)e.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(e){this.refreshRow({suppressFlash:!e.update,newData:!e.update})}refreshRow(e){if(this.isFullWidth()===!!this.isNodeFullWidthCell())if(this.isFullWidth())this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);else{for(const r of this.getAllCellCtrls())r.refreshCell(e);for(const r of this.allRowGuis)this.setRowCompRowId(r.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(r.rowComp);this.onRowSelected(),this.postProcessCss()}else this.beans.rowRenderer.redrawRow(this.rowNode)}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.rowEditStyleFeature?.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.beans.rowDropHighlightSvc,t=e?.row===this.rowNode?e.position:"none",r="above"===t,i="inside"===t,s="below"===t,o=this.gos.get("treeData")&&(s||r),a=this.rowNode.uiLevel.toString();for(const l of this.allRowGuis){const c=l.rowComp;c.toggleCss("ag-row-highlight-above",r),c.toggleCss("ag-row-highlight-inside",i),c.toggleCss("ag-row-highlight-below",s),c.toggleCss("ag-row-highlight-indent",o),o?l.element.style.setProperty("--ag-row-highlight-level",a):l.element.style.removeProperty("--ag-row-highlight-level")}}postProcessRowDragging(){const e=this.rowNode.dragging;for(const t of this.allRowGuis)t.rowComp.toggleCss("ag-row-dragging",e)}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:zi(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.findFullWidthInfoForEvent(e);if(!t)return;const{rowGui:r,column:i}=t;if(r.element!==e.target)return;const o=this.rowNode,{focusSvc:a,navigation:l}=this.beans,c=a.getFocusedCell(),d={rowIndex:o.rowIndex,rowPinned:o.rowPinned,column:c?.column??i};l?.navigateToNextCell(e,e.key,d,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||Fs(e))return;const t=this.allRowGuis.find(a=>a.element.contains(e.target)),r=t?t.element:null,i=r===e.target,s=mt(this.beans);let n=!1;r&&s&&(n=r.contains(s)&&s.classList.contains("ag-cell"));let o=null;!i&&!n&&(o=An(this.beans,r,!1,e.shiftKey)),(this.isFullWidth()&&i||!o)&&this.beans.navigation?.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){const e=this.allRowGuis.find(t=>Ji(t.element))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:this.gos.get("tabIndex");for(const r of this.allRowGuis)hi(r.element,"tabindex",t)}onFullWidthRowFocused(e){const t=this.rowNode,r=!!e&&this.isFullWidth()&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned;let i;if(this.fullWidthGui)i=this.fullWidthGui.element;else{const n=this.beans.colModel.getCol(e?.column)?.pinned;i=n?"right"===n?this.rightGui?.element:this.leftGui?.element:this.centerGui?.element}i&&(i.classList.toggle("ag-full-width-focus",r),r&&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 r={list:[],map:{}};for(const i of e.list)i!==t&&(r.list.push(i),r.map[i.column.getInstanceId()]=i);return r}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t)}}createRowEvent(e,t){const{rowNode:r}=this;return _e(this.gos,{type:e,node:r,data:r.data,rowIndex:r.rowIndex,rowPinned:r.rowPinned,event:t})}createRowEventWithSource(e,t){const r=this.createRowEvent(e,t);return r.source=this,r}onRowDblClick(e){if(Fs(e))return;const t=this.createRowEventWithSource("rowDoubleClicked",e);t.isEventHandlingSuppressed=this.isSuppressMouseEvent(e),this.beans.eventSvc.dispatchEvent(t)}findFullWidthInfoForEvent(e){if(!e)return;const t=this.findFullWidthRowGui(e.target),r=this.getColumnForFullWidth(t);return t&&r?{rowGui:t,column:r}:void 0}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){const{visibleCols:t}=this.beans;switch(e?.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=Or(e.target,"ag-row-drag",3),!this.isFullWidth()||this.isSuppressMouseEvent(e))return;const{rangeSvc:t,focusSvc:r}=this.beans;t?.removeAllCellRanges();const i=this.findFullWidthInfoForEvent(e);if(!i)return;const{rowGui:s,column:n}=i,o=s.element,a=e.target,l=this.rowNode;let c=e.defaultPrevented||Ys();o&&o.contains(a)&&ci(a)&&(c=!1),r.setFocusedCell({rowIndex:l.rowIndex,column:n,rowPinned:l.rowPinned,forceBrowserFocus:c})}isSuppressMouseEvent(e){const{gos:t,rowNode:r}=this;if(this.isFullWidth()){const s=this.findFullWidthRowGui(e.target);return function Ub(e,t,r,i){const s=t?.suppressMouseEventHandling;return e0(e,void 0,r,i,s)}(t,s?.rowComp.getFullWidthCellRendererParams(),r,e)}const i=Su(t,e.target);return null!=i&&Yl(t,i.column,r,e)}onRowClick(e){if(Fs(e)||this.lastMouseDownOnDragger)return;const r=this.isSuppressMouseEvent(e),{eventSvc:i,selectionSvc:s}=this.beans,n=this.createRowEventWithSource("rowClicked",e);n.isEventHandlingSuppressed=r,i.dispatchEvent(n),!r&&s?.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){"FullWidthDetail"===this.rowType&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,e)}createFullWidthCompDetails(e,t){const{gos:r,rowNode:i}=this,s=_e(r,{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:(o,a,l,c)=>this.addFullWidthRowDragging(o,a,l,c),setTooltip:(o,a)=>{r.assertModuleRegistered("Tooltip",3),this.setupFullWidthRowTooltip(o,a)}}),n=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return function qS(e,t){return e.getCompDetailsFromGridOptions(HS,"agDetailCellRenderer",t,!0)}(n,s);case"FullWidthGroup":{const{value:o,valueFormatted:a}=this.beans.valueSvc.getValueForDisplay(void 0,this.rowNode,!0);return s.value=o,s.valueFormatted=a,function KS(e,t){return e.getCompDetailsFromGridOptions(NS,"agGroupRowRenderer",t,!0)}(n,s)}case"FullWidthLoading":return function jS(e,t){return e.getCompDetailsFromGridOptions(BS,"agLoadingCellRenderer",t,!0)}(n,s);default:return function $S(e,t){return e.getCompDetailsFromGridOptions(OS,void 0,t,!0)}(n,s)}}setupFullWidthRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.setupFullWidthRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,r="",i){const{rowDragSvc:s,context:n}=this.beans;if(!s||!this.isFullWidth())return;const o=s.createRowDragComp(()=>r,this.rowNode,void 0,e,t,i);this.createBean(o,n),this.addDestroyFunc(()=>{this.destroyBean(o,n)})}onUiLevelChanged(){const e=Em(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,r="ag-row-level-"+this.rowLevel;for(const i of this.allRowGuis)i.rowComp.toggleCss(t,!0),i.rowComp.toggleCss(r,!1)}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();if(this.firstRowOnPage!==e){this.firstRowOnPage=e;for(const r of this.allRowGuis)r.rowComp.toggleCss("ag-row-first",e)}if(this.lastRowOnPage!==t){this.lastRowOnPage=t;for(const r of this.allRowGuis)r.rowComp.toggleCss("ag-row-last",t)}}getAllCellCtrls(){return 0===this.leftCellCtrls.list.length&&0===this.rightCellCtrls.list.length?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const e=[];if(this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),e.length)for(const t of e)for(const r of this.allRowGuis)r.rowComp.toggleCss(t,!0)}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!0)},e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!1)})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,r=>r.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return"left"===e||"right"===e?e:null}getInitialRowClasses(e){const t=this.getPinnedForContainer(e),r=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"),s.pinnedRowModel?.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"),r&&n.push("ag-full-width-row"),s.expansionSvc?.addExpandedCss(n,i),i.dragging&&n.push("ag-row-dragging");const{rowStyleSvc:o}=s;return o&&(o.processClassesFromGridOptions(n,i),o.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"),r&&("left"===t&&n.push("ag-cell-last-left-pinned"),"right"===t&&n.push("ag-cell-first-right-pinned")),n}processStylesFromGridOptions(){return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??this.emptyStyle}onRowSelected(e){this.beans.selectionSvc?.onRowCtrlSelected(this,t=>{(t===this.centerGui||t===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:r}=e,{rowNode:i,beans:s,gos:n}=this;r.addManagedListeners(t,{pointerenter:o=>{"mouse"===o.pointerType&&i.dispatchRowEvent("mouseEnter")},pointerleave:o=>{"mouse"===o.pointerType&&i.dispatchRowEvent("mouseLeave")}}),r.addManagedListeners(i,{mouseEnter:()=>{!s.dragSvc?.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(r=>r.element);for(const r of t)r.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),r=this.applyPaginationOffset(t.top,!0)-100,i=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(r,e),i)}forEachGui(e,t){if(e)t(e);else for(const r of this.allRowGuis)t(r)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(null==this.rowNode.rowHeight)return;const t=this.rowNode.rowHeight,r=this.beans.environment.getDefaultRowHeight(),s=Ig(this.gos)?$s(this.beans,this.rowNode).height:void 0,n=s?Math.min(r,s)-2+"px":void 0;this.forEachGui(e,o=>{o.element.style.height=`${t}px`,n&&o.element.style.setProperty("--ag-line-height",n)})}destroyFirstPass(e=!1){this.active=!1;const{rowNode:t}=this;if(!e&&vo(this.gos)&&!t.sticky)if(null!=t.rowTop){const s=this.roundRowTopToBounds(t.rowTop);this.setRowTop(s)}else for(const s of this.allRowGuis)s.rowComp.toggleCss("ag-opacity-zero",!0);this.fullWidthGui?.element.contains(mt(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);const r=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(r),this.beans.eventSvc.dispatchEvent(r),super.destroy()}destroySecondPass(){this.allRowGuis.length=0;const e=t=>{for(const r of t.list)r.destroy();return{list:[],map:{}}};this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.toggleCss("ag-row-focus",this.rowFocused),t.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e}=this.beans,t=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses())}onPaginationChanged(){const e=this.beans.pagination?.getCurrentPage()??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){return this.rowNode.isRowPinned()||this.rowNode.sticky?e:e+this.beans.pageBounds.getPixelOffset()*(t?1:-1)}setRowTop(e){if(!this.printLayout&&le(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 r;if(t.sticky)r=t.stickyRowTop;else{const i=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,s=this.applyPaginationOffset(i);r=t.isRowPinned()?s:this.beans.rowContainerHeight.getRealPixelPosition(s)}return r+"px"}setRowTopStyle(e){for(const t of this.allRowGuis)this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`)}getCellCtrl(e,t=!1){let r=null;for(const i of this.getAllCellCtrls())i.column==e&&(r=i);if(null!=r||t)return r;for(const i of this.getAllCellCtrls())i?.getColSpanningList().indexOf(e)>=0&&(r=i);return r}onRowIndexChanged(){null!=this.rowNode.rowIndex&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){const t=this.rowNode.getRowIndexString();if(null===t)return;const r=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),i=this.rowNode.rowIndex%2==0,s=r+this.rowNode.rowIndex+1;this.forEachGui(e,n=>{n.rowComp.setRowIndex(t),n.rowComp.toggleCss("ag-row-even",i),n.rowComp.toggleCss("ag-row-odd",!i),dt(n.element,s)})}};function ah(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var yT={moduleName:"KeyboardNavigation",version:he,beans:[class extends Q{constructor(){super(),this.beanName="navigation",this.onPageDown=gg(this.onPageDown,100),this.onPageUp=gg(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const r=e.key,i=e.altKey,s=e.ctrlKey||e.metaKey,n=!!this.beans.rangeSvc&&e.shiftKey,o=function my(e,t){return Su(e,t.target)?.getFocusedCellPosition()??null}(this.gos,e);let a=!1;switch(r){case"Home":case"End":!s&&!i&&(this.onHomeOrEndKey(r),a=!0);break;case U_LEFT:case U_RIGHT:case U_UP:case U_DOWN:if(!o)return!1;s&&!i&&!n&&(this.onCtrlUpDownLeftRight(r,o),a=!0);break;case"PageDown":case"PageUp":!s&&!i&&(a=this.handlePageUpDown(r,o,t))}return a&&e.preventDefault(),a}handlePageUpDown(e,t,r){return r&&(t=this.beans.focusSvc.getFocusedCell()),!!t&&("PageUp"===e?this.onPageUp(t):this.onPageDown(t),!0)}navigateTo({scrollIndex:e,scrollType:t,scrollColumn:r,focusIndex:i,focusColumn:s,isAsync:n,rowPinned:o}){const{scrollFeature:a}=this.gridBodyCon;le(r)&&!r.isPinned()&&a.ensureColumnVisible(r),le(e)&&a.ensureIndexVisible(e,t),n||a.ensureIndexVisible(i);const{focusSvc:l,rangeSvc:c}=this.beans;l.setFocusedCell({rowIndex:i,column:s,rowPinned:o,forceBrowserFocus:!0}),c?.setRangeToCell({rowIndex:i,rowPinned:o,column:s})}onPageDown(e){const t=this.beans,r=ah(t),i=this.getViewportHeight(),{pageBounds:s,rowModel:n,rowAutoHeight:o}=t,a=s.getPixelOffset(),c=n.getRowIndexAtPixel(r.top+i+a);o?.active?this.navigateToNextPageWithAutoHeight(e,c):this.navigateToNextPage(e,c)}onPageUp(e){const t=this.beans,r=ah(t),{pageBounds:i,rowModel:s,rowAutoHeight:n}=t,o=i.getPixelOffset(),l=s.getRowIndexAtPixel(r.top+o);n?.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,r=!1){const{pageBounds:i,rowModel:s}=this.beans,n=this.getViewportHeight(),o=i.getFirstRow(),a=i.getLastRow(),l=i.getPixelOffset(),c=s.getRow(e.rowIndex),d=r?c?.rowHeight-n-l:n-l;let f,h=s.getRowIndexAtPixel(c?.rowTop+d+l);h===e.rowIndex&&(t=h=e.rowIndex+(r?-1:1)),r?(f="bottom",h<o&&(h=o),t<o&&(t=o)):(f="top",h>a&&(h=a),t>a&&(t=a)),this.isRowTallerThanView(s.getRow(h))&&(t=h,f="top"),this.navigateTo({scrollIndex:t,scrollType:f,scrollColumn:null,focusIndex:h,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,r=!1){this.navigateTo({scrollIndex:t,scrollType:r?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const i=this.getNextFocusIndexForAutoHeight(e,r);this.navigateTo({scrollIndex:t,scrollType:r?"bottom":"top",scrollColumn:null,focusIndex:i,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const r=t?-1:1,i=this.getViewportHeight(),{pageBounds:s,rowModel:n}=this.beans,o=s.getLastRow();let a=0,l=e.rowIndex;for(;l>=0&&l<=o;){const c=n.getRow(l);if(c){const d=c.rowHeight??0;if(a+d>i)break;a+=d}l+=r}return Math.max(0,Math.min(l,o))}getViewportHeight(){const e=this.beans,t=ah(e),r=this.beans.scrollVisibleSvc.getScrollbarWidth();let i=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(i-=r),i}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return"number"==typeof t&&t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const r=this.beans.cellNavigation.getNextCellToFocus(e,t,!0),i=this.getNormalisedPosition(r),{rowIndex:s,rowPinned:n,column:o}=i??r;this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:o,focusIndex:s,focusColumn:o,rowPinned:n})}onHomeOrEndKey(e){const t="Home"===e,{visibleCols:r,pageBounds:i,rowModel:s}=this.beans,n=r.allCols,o=t?i.getFirstRow():i.getLastRow(),a=s.getRow(o);if(!a)return;const l=(t?n:[...n].reverse()).find(c=>!c.isSuppressNavigable(a));l&&this.navigateTo({scrollIndex:o,scrollType:null,scrollColumn:l,focusIndex:o,focusColumn:l})}onTabKeyDown(e,t){const r=t.shiftKey,i=this.tabToNextCellCommon(e,r,t),s=this.beans,{ctrlsSvc:n,pageBounds:o,focusSvc:a,gos:l}=s;if(!1===i)if(r){const{rowIndex:c,rowPinned:d}=e.getRowPosition();(d?0===c:c===o.getFirstRow())&&(0===l.get("headerHeight")||On(s)?Po(s,!0,!0):(t.preventDefault(),a.focusPreviousFromFirstCell(t)))}else e instanceof _o&&e.focusCell(!0),(a.focusOverlay(!1)||Po(s,r))&&t.preventDefault();else i?t.preventDefault():null===i&&n.get("gridCtrl").allowFocusForNextCoreContainer(r)}tabToNextCell(e,t){const r=this.beans,{focusSvc:i,rowRenderer:s}=r,n=i.getFocusedCell();if(!n)return!1;let o=Do(r,n);return!(!o&&(o=s.getRowByPosition(n),!o?.isFullWidth())||!this.tabToNextCellCommon(o,e,t,"api"))}tabToNextCellCommon(e,t,r,i="ui"){const{editSvc:s,focusSvc:n}=this.beans;let o;const a=e instanceof _o?e:e.getAllCellCtrls()?.[0];return o=s?.isEditing()?s?.moveToNextCell(a,t,r,i):this.moveToNextCellNotEditing(e,t,r),null===o?o:o||!!n.focusedHeader}moveToNextCellNotEditing(e,t,r){const i=this.beans.visibleCols.allCols;let s;if(e instanceof xc){if(s={...e.getRowPosition(),column:t?i[0]:kt(i)},this.gos.get("embedFullWidthRows")&&r){const o=e.findFullWidthInfoForEvent(r);o&&(s.column=o.column)}}else s=e.getFocusedCellPosition();const n=this.findNextCellToFocusOn(s,{backwards:t,startEditing:!1});if(!1===n)return null;if(n instanceof _o)n.focusCell(!0);else if(n)return this.tryToFocusFullWidthRow(n,t);return le(n)}findNextCellToFocusOn(e,{backwards:t,startEditing:r,skipToNextEditableCell:i}){let s=e;const n=this.beans,{cellNavigation:o,gos:a,focusSvc:l,rowRenderer:c,rangeSvc:d}=n;for(;;){e!==s&&(e=s),t||(s=this.getLastCellOfColSpan(s)),s=o.getNextTabbedCell(s,t);const u=a.getCallback("tabToNextCell");if(le(u)){const g=u({backwards:t,editing:r,previousCellPosition:e,nextCellPosition:s||null});if(!0===g)s=e;else{if(!1===g)return!1;s={rowIndex:g.rowIndex,column:g.column,rowPinned:g.rowPinned}}}if(!s)return null;if(s.rowIndex<0){const p=os(n);return l.focusHeaderPosition({headerPosition:{headerRowIndex:p+s.rowIndex,column:s.column},fromCell:!0}),null}const h="fullRow"===a.get("editType");if(r&&(!h||i)&&!this.isCellEditable(s))continue;this.ensureCellVisible(s);const f=Do(n,s);if(!f){const p=c.getRowByPosition(s);if(!p||!p.isFullWidth()||r)continue;return{...p.getRowPosition(),column:s?.column}}if(!o.isSuppressNavigable(f.column,f.rowNode))return f.setFocusedCellPosition(s),d?.setRangeToCell(s),f}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return!!t&&e.column.isCellEditable(t)}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:r,rowModel:i}=this.beans;return"top"===t?r?.getPinnedTopRow(e):"bottom"===t?r?.getPinnedBottomRow(e):i.getRow(e)}navigateToNextCell(e,t,r,i){let s=r,n=!1;const o=this.beans,{cellNavigation:a,focusSvc:l,gos:c}=o;for(;s&&(s===r||!this.isValidNavigateCell(s));)c.get("enableRtl")?t===U_LEFT&&(s=this.getLastCellOfColSpan(s)):t===U_RIGHT&&(s=this.getLastCellOfColSpan(s)),s=a.getNextCellToFocus(t,s),n=pt(s);if(n&&e&&e.key===U_UP&&(s={rowIndex:-1,rowPinned:null,column:r.column}),i){const u=c.getCallback("navigateToNextCell");if(le(u)){const f=u({key:t,previousCellPosition:r,nextCellPosition:s||null,event:e});s=le(f)?{rowPinned:f.rowPinned,rowIndex:f.rowIndex,column:f.column}:null}}if(!s)return;if(s.rowIndex<0){const u=os(o);return void l.focusHeaderPosition({headerPosition:{headerRowIndex:u+s.rowIndex,column:r.column},event:e||void 0,fromCell:!0})}const d=this.getNormalisedPosition(s);d?this.focusPosition(d):this.tryToFocusFullWidthRow(s)}getNormalisedPosition(e){if(this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);const r=Do(this.beans,e);return r?(e=r.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:r,rowRenderer:i,focusSvc:s,eventSvc:n}=this.beans,o=r.allCols;if(!i.getRowByPosition(e)?.isFullWidth())return!1;const l=s.getFocusedCell(),c={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?kt(o):o[0])};this.focusPosition(c);const d=t??(null!=l&&function lE(e,t){switch(e.rowPinned){case"top":if("top"!==t.rowPinned)return!0;break;case"bottom":if("bottom"!==t.rowPinned)return!1;break;default:if(le(t.rowPinned))return"top"!==t.rowPinned}return e.rowIndex<t.rowIndex}(c,l));return n.dispatchEvent({type:"fullWidthRowFocused",rowIndex:c.rowIndex,rowPinned:c.rowPinned,column:c.column,isFullWidthCell:!0,fromBelow:d}),!0}focusPosition(e){const{focusSvc:t,rangeSvc:r}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),r?.setRangeToCell(e)}isValidNavigateCell(e){return!!Rs(this.beans,e)}getLastCellOfColSpan(e){const t=Do(this.beans,e);if(!t)return e;const r=t.getColSpanningList();return 1===r.length?e:{rowIndex:e.rowIndex,column:kt(r),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=Lg(this.gos),r=this.beans.rowModel.getRow(e.rowIndex),i=t&&r?.sticky,{scrollFeature:s}=this.gridBodyCon;!i&&pt(e.rowPinned)&&s.ensureIndexVisible(e.rowIndex),e.column.isPinned()||s.ensureColumnVisible(e.column)}ensureColumnVisible(e){const t=this.gridBodyCon.scrollFeature;e.isPinned()||t.ensureColumnVisible(e)}ensureRowVisible(e){this.gridBodyCon.scrollFeature.ensureIndexVisible(e)}},class extends Q{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,r=!1){return r?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const r=e===U_UP,i=e===U_DOWN,s=e===U_LEFT;let n,o;const{pageBounds:a,gos:l,visibleCols:c,pinnedRowModel:d}=this.beans,{rowPinned:u}=t;if(r||i)o=u&&d?r?0:"top"===u?d.getPinnedTopRowCount()-1:d.getPinnedBottomRowCount()-1:r?a.getFirstRow():a.getLastRow(),n=t.column;else{const h=l.get("enableRtl");o=t.rowIndex,n=(s!==h?c.allCols:[...c.allCols].reverse()).find(p=>this.isCellGoodToFocusOn({rowIndex:o,rowPinned:null,column:p}))}return n?{rowIndex:o,rowPinned:u,column:n}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let r=t,i=!1;for(;!i;){switch(e){case U_UP:r=this.getCellAbove(r);break;case U_DOWN:r=this.getCellBelow(r);break;case U_RIGHT:r=this.gos.get("enableRtl")?this.getCellToLeft(r):this.getCellToRight(r);break;case U_LEFT:r=this.gos.get("enableRtl")?this.getCellToRight(r):this.getCellToLeft(r);break;default:r=null,ne(8,{key:e})}i=!r||this.isCellGoodToFocusOn(r)}return r}isCellGoodToFocusOn(e){const t=e.column;let r;const{pinnedRowModel:i,rowModel:s}=this.beans;switch(e.rowPinned){case"top":r=i?.getPinnedTopRow(e.rowIndex);break;case"bottom":r=i?.getPinnedBottomRow(e.rowIndex);break;default:r=s.getRow(e.rowIndex)}return!!r&&!this.isSuppressNavigable(t,r)}getCellToLeft(e){if(!e)return null;const t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){if(!e)return null;const t=this.rowSpanSvc?.getCellEnd(e)??e,r=L0(this.beans,t,!0);return r?{rowIndex:r.rowIndex,column:e.column,rowPinned:r.rowPinned}:null}getCellAbove(e){if(!e)return null;const t=this.rowSpanSvc?.getCellStart(e)??e,r=cc(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned},!0);return r?{rowIndex:r.rowIndex,column:e.column,rowPinned:r.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const{visibleCols:t,pagination:r}=this.beans,i=t.allCols;let s=e.rowIndex,n=e.rowPinned,o=t.getColAfter(e.column);if(!o){o=i[0];const a=L0(this.beans,e,!0);if(pt(a)||!a.rowPinned&&!(r?.isRowInPage(a.rowIndex)??1))return null;s=a?a.rowIndex:null,n=a?a.rowPinned:null}return{rowIndex:s,column:o,rowPinned:n}}getNextTabbedCellBackwards(e){const{beans:t}=this,{visibleCols:r,pagination:i}=t,s=r.allCols;let n=e.rowIndex,o=e.rowPinned,a=r.getColBefore(e.column);if(!a){a=kt(s);const l=cc(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned},!0);if(pt(l)||!l.rowPinned&&!(i?.isRowInPage(l.rowIndex)??1))return null;n=l?l.rowIndex:null,o=l?l.rowPinned:null}return{rowIndex:n,column:a,rowPinned:o}}isSuppressNavigable(e,t){const{suppressNavigable:r}=e.colDef;return"boolean"==typeof r?r:"function"==typeof r&&r(e.createColumnFunctionCallbackParams(t))}},class extends Q{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,r=>{this.gridBodyCon=r.gridBodyCtrl});const t=It(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let r;const{colModel:i,colGroupSvc:s,ctrlsSvc:n}=this.beans;if("string"==typeof e?(r=i.getCol(e),r||(r=s?.getColumnGroup(e)??null)):r=e,!r)return null;const a=n.getHeaderRowContainerCtrl()?.getAllCtrls(),l="filter"===kt(a||[]).type,c=os(this.beans)-1;let d=-1,u=r;for(;u;)d++,u=u.getParent();let h=d;return t&&l&&h===c-1&&h++,-1===h?null:{headerRowIndex:h,column:r}}navigateVertically(e,t){const{focusSvc:r,visibleCols:i}=this.beans,{focusedHeader:s}=r;if(!s)return!1;const{headerRowIndex:n}=s,o=s.column,a=os(this.beans),l=this.getHeaderRowType(n),c=i.headerGroupRowCount;let{headerRowIndex:d,column:u,headerRowIndexWithoutSpan:h}="UP"===e?function sk(e,t,r){const i=r-1;if("filter"!==e){const s=t instanceof Ks&&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}}(l,o,n):function nk(e,t,r){const i=t+1,s={column:e,headerRowIndex:i,headerRowIndexWithoutSpan:i};if(e instanceof Sa){if(i>=r)return{column:e.getDisplayedLeafColumns()[0],headerRowIndex:r,headerRowIndexWithoutSpan:i};let o=e.getDisplayedChildren()[0];if(o instanceof Sa&&o.isPadding()){const l=o.getDisplayedLeafColumns()[0];l.isSpanHeaderHeight()&&(o=l)}s.column=o,o instanceof Ks&&o.isSpanHeaderHeight()&&(s.headerRowIndex=r,s.headerRowIndexWithoutSpan=i)}return s}(o,n,c),f=!1;return d<0&&(d=0,u=o,f=!0),d>=a?(d=-1,this.currentHeaderRowWithoutSpan=-1):void 0!==h&&(this.currentHeaderRowWithoutSpan=h),!(!f&&!u)&&r.focusHeaderPosition({headerPosition:{headerRowIndex:d,column:u},allowUserOverride:!0,event:t})}navigateHorizontally(e,t=!1,r){const{focusSvc:i,gos:s}=this.beans,n={...i.focusedHeader};let o,a;-1!==this.currentHeaderRowWithoutSpan?n.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=n.headerRowIndex,"LEFT"===e!==s.get("enableRtl")?(a="Before",o=this.findHeader(n,a)):(a="After",o=this.findHeader(n,a));const l=s.getCallback("tabToNextHeader");if(t&&l){const c=i.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:o,direction:a});if(c){const{headerRowIndex:d}=i.focusedHeader||{};null!=d&&d!=n.headerRowIndex&&(this.currentHeaderRowWithoutSpan=d)}return c}return o||!t?i.focusHeaderPosition({headerPosition:o,direction:a,fromTab:t,allowUserOverride:!0,event:r}):this.focusNextHeaderRow(n,a,r)}focusNextHeaderRow(e,t,r){const i=this.beans,s=e.headerRowIndex;let o,n=null;const a=os(i),l=this.beans.visibleCols.allCols;if("Before"===t){if(s<=0)return!1;n=kt(l),o=s-1,this.currentHeaderRowWithoutSpan-=1}else n=l[0],o=s+1,this.currentHeaderRowWithoutSpan<a?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1;let{column:c,headerRowIndex:d}=am(this.beans,n,o);return d>=a&&(d=-1),i.focusSvc.focusHeaderPosition({headerPosition:{column:c,headerRowIndex:d},direction:t,fromTab:!0,allowUserOverride:!0,event:r})}scrollToColumn(e,t="After"){if(e.getPinned())return;let r;if(sr(e)){const i=e.getDisplayedLeafColumns();r="Before"===t?kt(i):i[0]}else r=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(r)}findHeader(e,t){const{colGroupSvc:r,visibleCols:i}=this.beans;let s=e.column;if(s instanceof Sa){const l=s.getDisplayedLeafColumns();s="Before"===t?l[0]:l[l.length-1]}const n="Before"===t?i.getColBefore(s):i.getColAfter(s);if(!n)return;if(e.headerRowIndex>=i.headerGroupRowCount)return{headerRowIndex:e.headerRowIndex,column:n};const a=r?.getColGroupAtLevel(n,e.headerRowIndex);return a?a.isPadding()&&n.isSpanHeaderHeight()?{headerRowIndex:i.headerGroupRowCount,column:n}:{headerRowIndex:e.headerRowIndex,column:a??n}:{headerRowIndex:n instanceof Ks&&n.isSpanHeaderHeight()?i.headerGroupRowCount:e.headerRowIndex,column:n}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}}],apiFunctions:{getFocusedCell:function jk(e){return e.focusSvc.getFocusedCell()},clearFocusedCell:function Kk(e){return e.focusSvc.clearFocusedCell()},setFocusedCell:function qk(e,t,r,i){e.focusSvc.setFocusedCell({rowIndex:t,column:r,rowPinned:i,forceBrowserFocus:!0})},setFocusedHeader:function Qk(e,t,r=!1){const i=e.headerNavigation?.getHeaderPositionForColumn(t,r);i&&e.focusSvc.focusHeaderPosition({headerPosition:i})},tabToNextCell:function Xk(e,t){return e.navigation?.tabToNextCell(!1,t)??!1},tabToPreviousCell:function Yk(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}}},kT=class extends Q{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 r of this.elements)r&&(at(r,t),Zi(r,e))}},PT={moduleName:"PinnedColumn",version:he,beans:[class extends Q{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:r}=this.beans,i=Dr(e,"print"),s=i?0:t.getColsLeftWidth(),n=i?0:t.getDisplayedColumnsRightWidth();s!=this.leftWidth&&(this.leftWidth=s,r.dispatchEvent({type:"leftPinnedWidthChanged"})),n!=this.rightWidth&&(this.rightWidth=n,r.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){const t=Ut(this.gridBodyCtrl.eBodyViewport);if(t<=50)return;const r=this.getPinnedColumnsOverflowingViewport(t-50),i=this.gos.getCallback("processUnpinnedColumns"),{columns:s,hasLockedPinned:n}=r;let o=s;!o.length&&!n||(i&&(o=i({columns:o,viewportWidth:t})),o?.length&&(o=o.filter(a=>!ys(a)),this.setColsPinned(o,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new kT(e,t)}setColsPinned(e,t,r){const{colModel:i,colAnimation:s,visibleCols:n,gos:o}=this.beans;if(!i.cols||!e?.length)return;if(Dr(o,"print"))return void ne(37);let a;s?.start(),a=!0===t||"left"===t?"left":"right"===t?"right":null;const l=[];for(const c of e){if(!c)continue;const d=i.getCol(c);d&&d.getPinned()!==a&&(this.setColPinned(d,a),l.push(d))}l.length&&(n.refresh(r),tp(this.eventSvc,l,r)),s?.finish()}initCol(e){const{pinned:t,initialPinned:r}=e.colDef;this.setColPinned(e,void 0!==t?t:r)}setColPinned(e,t){e.pinned=!0===t||"left"===t?"left":"right"===t?"right":null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){const{scrollVisibleSvc:t}=this.beans;if(null==e.pinned)return;const r="left"===e.pinned,i="right"===e.pinned;e.hidden=!0;const s=()=>{const n=r?this.leftWidth:this.rightWidth;if(null==n)return;const o=0==n,a=e.hidden!==o,l=this.gos.get("enableRtl"),c=t.getScrollbarWidth();e.comp.setPinnedContainerWidth(`${t.verticalScrollShowing&&(l&&r||!l&&i)?n+c:n}px`),e.comp.setDisplayed(!o),a&&(e.hidden=o,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))return 0;e=n-i-s}}return e}getPinnedColumnsOverflowingViewport(e){const i=(this.rightWidth??0)+(this.leftWidth??0);let s=!1;if(i<e)return{columns:[],hasLockedPinned:s};const{visibleCols:n}=this.beans,o=[...n.leftCols],a=[...n.rightCols];let l=0,c=0;const u=[];let h=i-0-e;for(;(c<o.length||l<a.length)&&h>0;){if(l<a.length){const f=a[l++];if(f.colDef.lockPinned){s=!0;continue}h-=f.getActualWidth(),u.push(f)}if(c<o.length&&h>0){const f=o[c++];if(f.colDef.lockPinned){s=!0;continue}h-=f.getActualWidth(),u.push(f)}}return{columns:u,hasLockedPinned:s}}}],css:[".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}"]},AT={moduleName:"Aria",version:he,beans:[class extends Q{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=Cr(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=It(e),r=this.descriptionContainer=t.createElement("div");r.classList.add("ag-aria-description-container"),Te(r,"polite"),function Ye(e,t){Tr(e,"relevant",t)}(r,"additions text"),function Ie(e,t){Tr(e,"atomic",t)}(r,!0),e.eGridDiv.appendChild(r)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{this.handleAnnouncementUpdate(e)},50)}handleAnnouncementUpdate(e){if(!this.isAlive()||!this.descriptionContainer)return;let t=e;null!=t&&""!=t.replace(/[ .]/g,"")?(this.lastAnnouncement===t&&(t=`${t}\u200b`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t):this.lastAnnouncement=""}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(Rt(e),e.remove()),this.descriptionContainer=null,this.pendingAnnouncements.clear()}}]},Fm="ag-delay-render",_T={moduleName:"ColumnDelayRender",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="colDelayRenderSvc",this.hideRequested=!1,this.alreadyRevealed=!1,this.timesRetried=0,this.requesters=new Set}hideColumns(e){this.alreadyRevealed||this.requesters.has(e)||(this.requesters.add(e),this.hideRequested||(this.beans.ctrlsSvc.whenReady(this,t=>{t.gridBodyCtrl.eGridBody.classList.add(Fm)}),this.hideRequested=!0))}revealColumns(e){if(this.alreadyRevealed||!this.isAlive()||(this.requesters.delete(e),this.requesters.size>0))return;const{renderStatus:t,ctrlsSvc:r}=this.beans;if(t){if(!t.areHeaderCellsRendered()&&this.timesRetried<5)return this.timesRetried++,void setTimeout(()=>this.revealColumns(e));this.timesRetried=0}r.getGridBodyCtrl().eGridBody.classList.remove(Fm),this.alreadyRevealed=!0}}],css:[":where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}"]},HT={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"}]}]},Rm=class extends ft{constructor(){super(HT),this.eOverlayWrapper=ge,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeCssClass=null,this.elToFocusAfter=null,this.registerCSS(".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-loading-wrapper{pointer-events:all}.ag-overlay-loading-center{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}")}handleKeyDown(e){if("Tab"!==e.key||e.defaultPrevented||Fs(e))return;const t=this.beans;if(An(t,this.eOverlayWrapper,!1,e.shiftKey))return;let i=!1;i=e.shiftKey?t.focusSvc.focusGridView({column:kt(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):Po(t,!1),i&&e.preventDefault()}updateLayoutClasses(e,t){const r=this.eOverlayWrapper.classList,{AUTO_HEIGHT:i,NORMAL:s,PRINT:n}=ji;r.toggle(i,t.autoHeight),r.toggle(s,t.normal),r.toggle(n,t.print)}postConstruct(){this.createManagedBean(new vu(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,r,i){if(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,e){if(this.setDisplayed(!0,{skipAriaHidden:!0}),r&&this.isGridFocused()){const s=mt(this.beans);s&&!Gs(this.beans)&&(this.elToFocusAfter=s)}e.then(s=>{if(this.activePromise===e){if(this.activePromise=null,s){if(this.activeOverlay!==s&&(this.eOverlayWrapper.appendChild(s.getGui()),this.activeOverlay=s,i)){const n=s;this.updateListenerDestroyFunc=this.addManagedPropertyListener(i,({currentValue:o})=>{n.refresh?.(_e(this.gos,{...o??{}}))})}r&&this.isGridFocused()&&Dn(this.eOverlayWrapper)}}else this.activeOverlay!==s&&(this.destroyBean(s),s=null)})}}updateOverlayWrapperPaddingTop(e){this.eOverlayWrapper.style.setProperty("padding-top",`${e}px`)}destroyActiveOverlay(){this.activePromise=null;const e=this.activeOverlay;if(!e)return;let t=this.elToFocusAfter;this.activeOverlay=null,this.elToFocusAfter=null,t&&!this.isGridFocused()&&(t=null);const r=this.updateListenerDestroyFunc;r&&(r(),this.updateListenerDestroyFunc=null),this.destroyBean(e),Rt(this.eOverlayWrapper),t?.focus?.({preventScroll:!0})}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=mt(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setOverlayWrapperComp(void 0),super.destroy()}},GT={selector:"AG-OVERLAY-WRAPPER",component:Rm},zT={moduleName:"Overlay",version:he,userComponents:{agLoadingOverlay:class extends C0{init(){const e=zi(this.gos.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(e??$y),!e){const r=this.getLocaleTextFunc()("loadingOoo","Loading...");this.getGui().textContent=r,this.beans.ariaAnnounce.announceValue(r,"overlay")}}},agNoRowsOverlay:class extends C0{init(){const e=zi(this.gos.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(e??Ky),!e){const r=this.getLocaleTextFunc()("noRowsToShow","No Rows To Show");this.getGui().textContent=r,this.beans.ariaAnnounce.announceValue(r,"overlay")}}}},apiFunctions:{showLoadingOverlay:function LT(e){e.overlays?.showLoadingOverlay()},showNoRowsOverlay:function OT(e){e.overlays?.showNoRowsOverlay()},hideOverlay:function BT(e){e.overlays?.hideOverlay()}},beans:[class extends Q{constructor(){super(...arguments),this.beanName="overlays",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}postConstruct(){this.isClientSide=rr(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 0!==this.state&&!!this.eWrapper}isExclusive(){return 1===this.state&&!!this.eWrapper}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos,t=e.get("loading");!t&&(void 0!==t||e.get("suppressLoadingOverlay"))||this.doShowLoadingOverlay()}showNoRowsOverlay(){this.showInitialOverlay=!1;const e=this.gos;e.get("loading")||e.get("suppressNoRowsOverlay")||this.doShowNoRowsOverlay()}hideOverlay(){this.showInitialOverlay=!1,this.gos.get("loading")?ne(99):this.doHideOverlay()}getOverlayWrapperSelector(){return GT}getOverlayWrapperCompClass(){return Rm}updateOverlayVisibility(){if(!this.eWrapper)return void(this.state=0);const{state:e,isClientSide:t,isServerSide:r,beans:{gos:i,colModel:s,rowModel:n}}=this;let o=this.gos.get("loading");void 0!==o&&(this.showInitialOverlay=!1),this.showInitialOverlay&&void 0===o&&!i.get("suppressLoadingOverlay")&&(o=!i.get("columnDefs")||!s.ready||!i.get("rowData")&&t),o?1!==e&&this.doShowLoadingOverlay():(this.showInitialOverlay=!1,t&&n.isEmpty()&&!i.get("suppressNoRowsOverlay")?2!==e&&this.doShowNoRowsOverlay():(1===e||!r&&0!==e)&&this.doHideOverlay())}doShowLoadingOverlay(){this.eWrapper&&(this.state=1,this.showOverlay(function QS(e,t){return e.getCompDetailsFromGridOptions(MS,"agLoadingOverlay",t,!0)}(this.beans.userCompFactory,_e(this.gos,{})),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive())}doShowNoRowsOverlay(){this.eWrapper&&(this.state=2,this.showOverlay(function JS(e,t){return e.getCompDetailsFromGridOptions(IS,"agNoRowsOverlay",t,!0)}(this.beans.userCompFactory,_e(this.gos,{})),"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams"),this.updateExclusive())}doHideOverlay(){this.eWrapper&&(this.state=0,this.eWrapper.hideOverlay(),this.updateExclusive())}showOverlay(e,t,r){const i=e?.newAgStackInstance()??null;this.eWrapper?.showOverlay(i,t,this.isExclusive(),r),this.refreshWrapperPadding()}updateExclusive(){const e=this.exclusive;this.exclusive=this.isExclusive(),this.exclusive!==e&&this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"})}refreshWrapperPadding(){const e=this.eWrapper;if(!e)return;let t=0;2===this.state&&(t=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0),this.wrapperPadding!==t&&(this.wrapperPadding=t,e.updateOverlayWrapperPaddingTop(t))}}]},jT=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.rowNode.id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if(null==e?.id)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return null!=this.entriesMap[e.id]}removeRow(e){const t=e.id,r=this.entriesMap[t];delete this.entriesMap[t],ki(this.entriesList,r)}removeFromCache(e){delete this.entriesMap[e.rowNode.id],ki(this.entriesList,e)}getEntries(){return this.entriesList}};function lh(e){if(!e)return;const t={top:{},bottom:{},normal:{}};for(const r of e){const i=r.id;switch(r.rowPinned){case"top":t.top[i]=r;break;case"bottom":t.bottom[i]=r;break;default:t.normal[i]=r}}return t}function ch(e,t){const r=e.id;switch(e.rowPinned){case"top":return null!=t.top[r];case"bottom":return null!=t.bottom[r];default:return null!=t.normal[r]}}var km={moduleName:"Sort",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,r){const i=this.getNextSortDirection(e);this.setSortForColumn(e,i,t,r)}progressSortFromEvent(e,t){const i="ctrl"===this.gos.get("multiSortKey")?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,i,"uiColumnSorted")}setSortForColumn(e,t,r,i){"asc"!==t&&"desc"!==t&&(t=null);const{gos:s,showRowGroupCols:n}=this.beans;let a=[e];if(rs(s)&&e.getColDef().showRowGroup){const u=n?.getSourceColumnsForGroupColumn?.(e)?.filter(h=>h.isSortable());u&&(a=[e,...u])}for(const d of a)this.setColSort(d,t,i);const c=[];if(!r&&!s.get("alwaysMultiSort")||s.get("suppressMultiSort")){const d=this.clearSortBarTheseColumns(a,i);c.push(...d)}this.updateSortIndex(e),c.push(...a),this.dispatchSortChangedEvents(i,c)}updateSortIndex(e){const{gos:t,colModel:r,showRowGroupCols:i}=this.beans,s=rs(t),n=i?.getShowRowGroupCol(e.getId()),o=s&&n||e,a=this.getColumnsWithSortingOrdered();r.forAllCols(d=>this.setColSortIndex(d,null));const l=a.filter(d=>!(s&&d.getColDef().showRowGroup||d===o));(o.getSort()?[...l,o]:l).forEach((d,u)=>this.setColSortIndex(d,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 r={type:"sortChanged",source:e};t&&(r.columns=t),this.eventSvc.dispatchEvent(r)}clearSortBarTheseColumns(e,t){const r=[];return this.beans.colModel.forAllCols(i=>{e.includes(i)||(i.getSort()&&r.push(i),this.setColSort(i,void 0,t))}),r}getNextSortDirection(e){const t=e.getColDef().sortingOrder??this.gos.get("sortingOrder")??Ia,r=t.indexOf(e.getSort());return r<0||r==t.length-1?t[0]:t[r+1]}getIndexedSortMap(){const{gos:e,colModel:t,showRowGroupCols:r,rowGroupColsSvc:i}=this.beans;let s=[];if(t.forAllCols(c=>{c.getSort()&&s.push(c)}),t.isPivotMode()){const c=rs(e);s=s.filter(d=>{const u=!!d.getAggFunc(),h=!d.isPrimary(),f=c?r?.getShowRowGroupCol(d.getId()):d.getColDef().showRowGroup;return u||h||f})}const n=i?.columns.filter(c=>!!c.getSort())??[],o={};s.forEach((c,d)=>o[c.getId()]=d),s.sort((c,d)=>{const u=c.getSortIndex(),h=d.getSortIndex();return null!=u&&null!=h?u-h:null==u&&null==h?o[c.getId()]>o[d.getId()]?1:-1:null==h?-1:1});const a=rs(e)&&!!n.length;a&&(s=[...new Set(s.map(c=>r?.getShowRowGroupCol(c.getId())??c))]);const l=new Map;if(s.forEach((c,d)=>l.set(c,d)),a)for(const c of n){const d=r.getShowRowGroupCol(c.getId());l.set(c,l.get(d))}return l}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}getSortModel(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),colId:e.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),column:e}))}canColumnDisplayMixedSort(e){const t=rs(this.gos),r=!!e.getColDef().showRowGroup;return t&&r}getDisplaySortForColumn(e){const t=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!t?.length)return e.getSort();const i=null!=e.getColDef().field||e.getColDef().valueGetter?[e,...t]:t,s=i[0].getSort();return i.every(o=>o.getSort()==s)?s:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t,r){let i=0;e.addManagedListeners(t,{movingChanged:()=>{i=Date.now()}}),r&&e.addManagedElementListeners(r,{click:n=>{const o=t.isMoving(),l=Date.now()-i<50;o||l||this.progressSortFromEvent(t,n)}});const s=()=>{const n=t.getSort();if(e.toggleCss("ag-header-cell-sorted-asc","asc"===n),e.toggleCss("ag-header-cell-sorted-desc","desc"===n),e.toggleCss("ag-header-cell-sorted-none",!n),t.getColDef().showRowGroup){const l=!this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t)?.every(c=>t.getSort()==c.getSort());e.toggleCss("ag-header-cell-sorted-mixed",l)}};e.addManagedEventListeners({sortChanged:s,columnRowGroupChanged:s})}initCol(e){const{sort:t,initialSort:r,sortIndex:i,initialSortIndex:s}=e.colDef;void 0!==t?("asc"===t||"desc"===t)&&(e.sort=t):("asc"===r||"desc"===r)&&(e.sort=r),void 0!==i?null!==i&&(e.sortIndex=i):null!==s&&(e.sortIndex=s)}updateColSort(e,t,r){void 0!==t&&this.setColSort(e,"desc"===t||"asc"===t?t:void 0,r)}setColSort(e,t,r){e.sort!==t&&(e.sort=t,e.dispatchColEvent("sortChanged",r)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new th(e)}getSortIndicatorSelector(){return uk}},class extends Q{constructor(){super(...arguments),this.beanName="rowNodeSorter"}postConstruct(){const{gos:e}=this;this.isAccentedSort=e.get("accentedSort"),this.primaryColumnsSortGroups=rs(e),this.addManagedPropertyListener("accentedSort",t=>this.isAccentedSort=t.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=rs(e))}doFullSort(e,t){const r=e.map((i,s)=>({currentPos:s,rowNode:i}));return r.sort(this.compareRowNodes.bind(this,t)),r.map(i=>i.rowNode)}compareRowNodes(e,t,r){const i=t.rowNode,s=r.rowNode;for(let n=0,o=e.length;n<o;n++){const a=e[n],l="desc"===a.sort,c=this.getValue(i,a.column),d=this.getValue(s,a.column);let u;const h=this.getComparator(a,i);if(u=h?h(c,d,i,s,l):Ue(c,d,this.isAccentedSort),!isNaN(u)&&0!==u)return"asc"===a.sort?u:-1*u}return t.currentPos-r.currentPos}getComparator(e,t){const r=e.column,i=r.getColDef().comparator;if(null!=i)return i;if(!r.getColDef().showRowGroup)return;const s=!t.group&&r.getColDef().field;if(!s)return;const n=this.beans.colModel.getColDefCol(s);return n?n.getColDef().comparator:void 0}getValue(e,t){const{valueSvc:r,colModel:i,showRowGroupCols:s,gos:n}=this.beans;if(!this.primaryColumnsSortGroups)return r.getValue(t,e,!1);if(e.rowGroupColumn===t){if(Bg(n,i.isPivotActive())){const c=e.data?e:Gp(e.childrenAfterGroup);return c&&r.getValue(t,c,!1)}const l=s?.getShowRowGroupCol(t.getId());return l?e.groupData?.[l.getId()]:void 0}return e.group&&t.getColDef().showRowGroup?void 0:r.getValue(t,e,!1)}}],apiFunctions:{onSortChanged:function qT(e){e.sortSvc?.onSortChanged("api")}},userComponents:{agSortIndicator:th},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"}},rP={moduleName:"ValueCache",version:he,beans:[class extends Q{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,r){if(this.active){const i=this.cacheVersion;e.__cacheVersion!==i&&(e.__cacheVersion=i,e.__cacheData={}),e.__cacheData[t]=r}}getValue(e,t){if(this.active&&e.__cacheVersion===this.cacheVersion)return e.__cacheData[t]}}],apiFunctions:{expireValueCache:function YT(e){e.valueCache?.expire()}}},iP={moduleName:"Expression",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if("string"==typeof e)return this.evaluateExpression(e,t);Ct(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(r){return Ct(16,{expression:e,params:t,e:r}),null}}createExpressionFunction(e){const t=this.cache;if(t[e])return t[e];const r=this.createFunctionBody(e),i=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",r);return t[e]=i,i}createFunctionBody(e){return e.includes("return")?e:"return "+e+";"}}]},sP={moduleName:"ChangeDetection",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.clientSideRowModel=null}postConstruct(){const{gos:e,rowModel:t}=this.beans;rr(e)&&(this.clientSideRowModel=t),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){const{gos:t,rowRenderer:r}=this.beans;if("paste"===e.source||t.get("suppressChangeDetection"))return;const i=e.node,s=[i],n=this.clientSideRowModel,o=n?.rootNode;if(o&&!i.isRowPinned()){const a=t.get("aggregateOnlyChangedColumns"),l=new Ta(a,o);l.addParentNode(i.parent,[e.column]),n.doAggregate(l),l.forEachChangedNodeDepthFirst(c=>{s.push(c),c.sibling&&s.push(c.sibling)})}r.refreshCells({rowNodes:s})}}]},nP={moduleName:"CellApi",version:he,apiFunctions:{getCellValue:function QT(e,t){const{colKey:r,rowNode:i,useFormatter:s}=t,n=e.colModel.getColDefCol(r)??e.colModel.getCol(r);if(pt(n))return null;const o=e.valueSvc.getValueForDisplay(n,i,s);return s?o.valueFormatted??Hs(o.value):o.value}}},aP={moduleName:"CommunityCore",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){if(this.destroyCalled)return;const{stateSvc:e,ctrlsSvc:t,context:r}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:e?.getState()??{}}),this.destroyCalled=!0,t.get("gridCtrl")?.destroyGridUi(),r.destroy(),super.destroy()}},class extends Q{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new A0,this.fns={...Nu,dispatchEvent:W3},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(D0))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){const{fns:r,beans:i}=this;r!==Nu&&(r[e]=i?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{const{beans:r,fns:{[e]:i}}=this;return i?i(r,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:r,preDestroyLink:i}=this;if(t){const s=D0[e];r.assertModuleRegistered(s,`api.${e}`)&&ne(27,{fnName:e,module:s})}else ne(26,{fnName:e,preDestroyLink:i})}destroy(){super.destroy(),this.fns=Nu,this.beans=null}},class extends nb{constructor(){super(...arguments),this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},this.selectors={},this.icons={}}postConstruct(){const e=this.gos.get("components");if(null!=e)for(const t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){const{icons:t,userComponents:r,dynamicBeans:i,selectors:s}=e;if(r){const n=(o,a,l,c)=>{this.agGridDefaults[o]=a,(l||c)&&(this.agGridDefaultOverrides[o]={params:l,processParams:c})};for(const o of Object.keys(r)){let a=r[o];if(t2(a)&&(a=a.getComp(this.beans)),"object"==typeof a){const{classImp:l,params:c,processParams:d}=a;n(o,l,c,d)}else n(o,a)}}this.registerDynamicBeans(i);for(const n of s??[])this.selectors[n.selector]=n;if(t)for(const n of Object.keys(t))this.icons[n]=t[n]}getUserComponent(e,t){const r=(a,l,c,d)=>({componentFromFramework:l,component:a,params:c,processParams:d}),{frameworkOverrides:i}=this.beans,s=i.frameworkComponent(t,this.gos.get("components"));if(null!=s)return r(s,!0);const n=this.jsComps[t];if(n)return r(n,i.isFrameworkComponent(n));const o=this.agGridDefaults[t];if(o){const a=this.agGridDefaultOverrides[t];return r(o,!1,a?.params,a?.processParams)}return this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}getDynamicError(e,t){return t?ts(279,{name:e}):this.beans.validation?.missingDynamicBean(e)??ts(256)}},class extends Q{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,r,i=!1){return this.getCompDetails(this.gridOptions,e,t,r,i)}getCompDetails(e,t,r,i,s=!1){const{name:n,cellRenderer:o}=t;let f,p,{compName:a,jsComp:l,fwComp:c,paramsFromSelector:d,popupFromSelector:u,popupPositionFromSelector:h}=dp(this.beans.frameworkOverrides,e,t,i);const g=C=>{const y=this.registry.getUserComponent(n,C);y&&(l=y.componentFromFramework?void 0:y.component,c=y.componentFromFramework?y.component:void 0,f=y.params,p=y.processParams)};if(null!=a&&g(a),null==l&&null==c&&null!=r&&g(r),l&&o&&!function wS(e){return!!e&&e.prototype&&"getGui"in e.prototype}(l)&&(l=this.agCompUtils?.adaptFunction(t,l)),!l&&!c){const{validation:C}=this.beans;return void(!s||a===r&&r?r&&!C&&Ct(146,{comp:r}):a?C?.isProvidedUserComp(a)||Ct(50,{compName:a}):r?C||Ct(260,{...this.gos.getModuleErrorParams(),propName:n,compName:r}):Ct(216,{name:n}))}const m=this.mergeParams(e,t,i,d,f,p),v=null==l,w=l??c;return{componentFromFramework:v,componentClass:w,params:m,type:t,popupFromSelector:u,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(w,v,m,t)}}newAgStackInstance(e,t,r,i){let n;n=t?this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i):new e,this.createBean(n);const o=n.init?.(r);return null==o?$t.resolve(n):o.then(()=>n)}mergeParams(e,t,r,i=null,s,n){const o={...r,...s},l=e?.[t.name+"Params"];return"function"==typeof l?Jr(o,l(r)):"object"==typeof l&&Jr(o,l),Jr(o,i),n?n(o):o}},class extends Q{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=function r2(){if(void 0!==jd)return jd;if(!document.body)return-1;let e=1e6;const t=pp()?6e6:1e9,r=document.createElement("div");for(document.body.appendChild(r);;){const i=2*e;if(r.style.height=i+"px",i>t||r.clientHeight!==i)break;e=i}return r.remove(),jd=e,e}(),Us(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;Us(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t="number"==typeof e?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=null!=e&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight();return this.maxScrollY*(e/t)}},class extends Q{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:r,colModel:i,colGroupSvc:s,colViewport:n,selectionColSvc:o}=this.beans;t||this.buildTrees(i,s),s?.updateOpenClosedVisibility(),this.leftCols=Wu(this.treeLeft),this.centerCols=Wu(this.treeCenter),this.rightCols=Wu(this.treeRight),o?.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()),r?.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 r=t.getParent();for(;r;){if(!r.isPadding()){const i=r.getProvidedColumnGroup().getLevel()+1;i>e&&(e=i);break}r=r.getParent()}}return e}updateBodyWidths(){const e=Ss(this.centerCols),t=Ss(this.leftCols),r=Ss(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==r)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=r,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,r,i){let s,n;this.gos.get("enableRtl")?(s=t?t[0]:null,n=r?kt(r):null):(s=t?kt(t):null,n=r?r[0]:null);for(const o of e.getCols())o.setLastLeftPinned(o===s,i),o.setFirstRightPinned(o===n,i)}buildTrees(e,t){const r=e.getColsToShow(),i=r.filter(l=>"left"==l.getPinned()),s=r.filter(l=>"right"==l.getPinned()),n=r.filter(l=>"left"!=l.getPinned()&&"right"!=l.getPinned()),o=new op,a=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=a({columns:i,idCreator:o,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=a({columns:s,idCreator:o,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=a({columns:n,idCreator:o,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){const t=e.getCols(),r=[],i=[],s=[];for(const n of t){const o=n.getPinned();o?!0===o||"left"===o?r.push(n):s.push(n):i.push(n)}this.ariaOrderColumns=r.concat(i).concat(s)}getAriaColIndex(e){let t;return t=sr(e)?e.getLeafColumns()[0]:e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){for(const e of[this.treeLeft,this.treeRight,this.treeCenter])for(const t of e)sr(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");for(const n of[this.leftCols,this.rightCols,this.centerCols]){if(s){let o=Ss(n);for(const a of n)o-=a.getActualWidth(),a.setLeft(o,e)}else{let o=0;for(const a of n)a.setLeft(o,e),o+=a.getActualWidth()}fF(i,n)}for(const n of i)n.setLeft(null,e)}joinCols(){this.allCols=this.gos.get("enableRtl")?this.rightCols.concat(this.centerCols).concat(this.leftCols):this.leftCols.concat(this.centerCols).concat(this.rightCols)}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}isColDisplayed(e){return this.allCols.indexOf(e)>=0}getLeftColsForRow(e){const{leftCols:t,beans:{colModel:r}}=this;return r.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){const{rightCols:t,beans:{colModel:r}}=this;return r.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,r,i){const s=[];let n=null;for(let o=0;o<t.length;o++){const a=t[o],l=t.length-o,c=Math.min(a.getColSpan(e),l),d=[a];if(c>1){const h=c-1;for(let f=1;f<=h;f++)d.push(t[o+f]);o+=h}let u;if(r){u=!1;for(const h of d)r(h)&&(u=!0)}else u=!0;u&&(0===s.length&&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,r=t.indexOf(e);return r>0?t[r-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};Nn(this.treeCenter,!1,e),Nn(this.treeLeft,!1,e),Nn(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 r=0;r<t.length;r++){const i=this[t[r]];if(i.length)return e?kt(i):i[0]}return null}getColAfter(e){const t=this.allCols,r=t.indexOf(e);return r<t.length-1?t[r+1]:null}getColsLeftWidth(){return Ss(this.leftCols)}getDisplayedColumnsRightWidth(){return Ss(this.rightCols)}isColAtEdge(e,t){const r=this.allCols;if(!r.length)return!1;const i="first"===t;let s;if(sr(e)){const n=e.getDisplayedLeafColumns();if(!n.length)return!1;s=i?n[0]:kt(n)}else s=e;return(i?r[0]:kt(r))===s}},class extends ob{postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}},class extends Q{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.instanceId=Dk++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new St,this.globalEventHandlerFactory=e=>(t,r)=>{if(!this.isAlive())return;const i=vc.has(t);if(i&&!e||!i&&e||!function Mk(e){return!!eh[e]}(t))return;const s=(n,o)=>{const l=this.gridOptions[eh[n]];"function"==typeof l&&this.beans.frameworkOverrides.wrapOutgoing(()=>l(o))};if(this.gridReadyFired)s(t,r);else if("gridReady"===t){s(t,r),this.gridReadyFired=!0;for(const n of this.queueEvents)s(n.eventName,n.event);this.queueEvents=[]}else this.queueEvents.push({eventName:t,event:r})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.validateGridOptions(this.gridOptions),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"optionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){return this.gridOptions[e]??Cg[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return le(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(r=>e(this.addCommon(r)))}updateGridOptions({options:e,force:t,source:r="api"}){const i={id:Pk++,properties:[]},s=[],{gridOptions:n,validation:o}=this;for(const a of Object.keys(e)){const l=da.applyGlobalGridOption(a,e[a]);o?.warnOnInitialPropertyUpdate(r,a);const d=n[a];(t||"object"==typeof l&&"api"===r||d!==l)&&(n[a]=l,s.push({type:a,currentValue:l,previousValue:d,changeSet:i,source:r}))}this.validateGridOptions(this.gridOptions),i.properties=s.map(a=>a.type);for(const a of s)Us(this,`Updated property ${a.type} from`,a.previousValue," to ",a.currentValue),this.propEventSvc.dispatchEvent(a)}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addCommon(e){return e.api=this.api,e.context=this.gridOptionsContext,e}validateOptions(e,t){for(const r of Object.keys(e)){const i=e[r];if(null==i||!1===i)continue;let s=t[r];"function"==typeof s&&(s=s(e,this.gridOptions,this.beans)),s&&this.assertModuleRegistered(s,r)}}validateGridOptions(e){this.validateOptions(e,Rk),this.validation?.processGridOptions(e)}validateColDef(e,t,r){(r||!this.beans.dataTypeSvc?.isColPendingInference(t))&&(this.validateOptions(e,gk),this.validation?.validateColDef(e))}assertModuleRegistered(e,t){const r=Array.isArray(e)?e.some(i=>this.isModuleRegistered(i)):this.isModuleRegistered(e);return r||Ct(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),r}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:Rd(),rowModelType:this.get("rowModelType"),isUmd:!1}}isModuleRegistered(e){return Fd(e,this.gridId,this.get("rowModelType"))}setInstanceDomData(e){e[fm]=this.instanceId}isElementInThisInstance(e){let t=e;for(;t;){const r=t[fm];if(le(r))return r===this.instanceId;t=t.parentElement}return!1}},class extends Q{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(xo(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),xo(e.source)))}createColsFromColDefs(e){const{beans:t}=this,{valueCache:r,colAutosize:i,rowGroupColsSvc:s,pivotColsSvc:n,valueColsSvc:o,visibleCols:a,eventSvc:l,groupHierarchyColSvc:c}=t,d=this.colDefs?ip(t,e):void 0;r?.expire();const u=this.colDefCols?.list,h=this.colDefCols?.tree,f=function oS(e,t=null,r,i,s){const n=new tS,{existingCols:o,existingGroups:a,existingColKeys:l}=function Kg(e){const t=[],r=[],i=[];return e&&is(null,e,s=>{if(Br(s))r.push(s);else{const n=s;i.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:r,existingColKeys:i}}(i);n.addExistingKeys(l);const c=qg(e,t,0,r,o,n,a,s),{colGroupSvc:d}=e,u=d?.findMaxDepth(c,0)??0,h=d?d.balanceColumnTree(c,0,u,n):c;return is(null,h,jg),{columnTree:h,treeDepth:u}}(t,this.colDefs,!0,h,e);Ll(t,this.colDefCols?.tree,f.columnTree);const p=f.columnTree,g=f.treeDepth,m=$g(p),v={};for(const w of m)v[w.getId()]=w;this.colDefCols={tree:p,treeDepth:g,list:m,map:v},this.createColumnsForService([c],this.colDefCols,e),s?.extractCols(e,u),n?.extractCols(e,u),o?.extractCols(e,u),this.ready=!0,this.refreshCols(!0,e),a.refresh(e),l.dispatchEvent({type:"columnEverythingChanged",source:e}),d&&(this.changeEventsDispatching=!0,d(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),"gridInitializing"===e&&i?.applyAutosizeStrategy()}refreshCols(e,t){if(!this.colDefCols)return;const r=this.cols?.tree;this.saveColOrder();const{autoColSvc:i,selectionColSvc:s,rowNumbersSvc:n,quickFilter:o,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:c,visibleCols:d,colViewport:u,eventSvc:h}=this.beans,f=this.selectCols(a,this.colDefCols);this.createColumnsForService([i,s,n],f,t);const p=function Nx(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}(this.gos,this.showingPivotResult);(!e||p)&&this.restoreColOrder(f),this.positionLockedCols(f),l?.refresh(),o?.refreshCols(),this.setColSpanActive(),c?.setAutoHeightActive(f),d.clear(),u.clear(),!qs(r,this.cols.tree)&&h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,r){for(const i of e)i&&(i.createColumns(t,s=>{this.lastOrder=s(this.lastOrder),this.lastPivotOrder=s(this.lastPivotOrder)},r),i.addColumns(t))}selectCols(e,t){const r=e?.getPivotResultCols()??null;this.showingPivotResult=null!=r;const{map:i,list:s,tree:n,treeDepth:o}=r??t;return this.cols={list:s.slice(),map:{...i},tree:n.slice(),treeDepth:o},r&&(r.list.some(l=>void 0!==this.cols?.map[l.getColId()])||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{valueColsSvc:e,selectionColSvc:t,gos:r}=this.beans,i=this.isPivotMode()&&!this.showingPivotResult,s=t?.isSelectionColumnEnabled(),n=r.get("rowNumbers"),o=e?.columns;return this.cols.list.filter(l=>{const c=Od(l);if(i){const d=o?.includes(l);return c||d||s&&bs(l)||n&&ys(l)}return c||l.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,r){$i(this.beans,{state:e.map(i=>({colId:"string"==typeof i?i:i.getColId(),hide:!t}))},r)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const r=t.filter(u=>null!=e.map[u.getId()]);if(0===r.length)return;if(r.length===e.list.length)return void(e.list=r);const i=u=>{const h=u.getOriginalParent();return!!h&&(h.getChildren().length>1||i(h))};if(!r.some(u=>i(u))){const u=new Set(r);for(const h of e.list)u.has(h)||r.push(h);return void(e.list=r)}const s=new Map;for(let u=0;u<r.length;u++)s.set(r[u],u);const n=e.list.filter(u=>!s.has(u));if(0===n.length)return void(e.list=r);const o=(u,h)=>{const f=h?h.getOriginalParent():u.getOriginalParent();if(!f)return null;let p=null,g=null;for(const m of f.getChildren())if(m!==h&&m!==u){if(m instanceof Ks){const v=s.get(m);if(null==v)continue;(null==p||p<v)&&(p=v,g=m);continue}m.forEachLeafColumn(v=>{const w=s.get(v);null!=w&&(null==p||p<w)&&(p=w,g=v)})}return g??o(u,f)},a=[],l=new Map;for(const u of n){const h=o(u,null);if(null==h){a.push(u);continue}const f=l.get(h);void 0===f?l.set(h,u):Array.isArray(f)?f.push(u):l.set(h,[f,u])}const c=new Array(e.list.length);let d=c.length-1;for(let u=a.length-1;u>=0;u--)c[d--]=a[u];for(let u=r.length-1;u>=0;u--){const h=r[u],f=l.get(h);if(f)if(Array.isArray(f))for(let p=f.length-1;p>=0;p--)c[d--]=f[p];else c[d--]=f;c[d--]=h}e.list=c}positionLockedCols(e){e.list=Jg(e.list,this.gos)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list??null:this.lastOrder=this.cols?.list??null}getColumnDefs(e){return this.colDefCols&&this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[],e)}setColSpanActive(){this.colSpanActive=!!this.cols?.list.some(e=>null!=e.getColDef().colSpan)}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);const{visibleCols:r,eventSvc:i}=this.beans;r.refresh(t),i.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){const e=this.beans.pivotColsSvc?.columns;return this.pivotMode&&!!e?.length}recreateColumnDefs(e){if(!this.cols)return;this.beans.autoColSvc?.updateColumns(e);const t=xo(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){Ll(this.beans,this.colDefCols?.tree),super.destroy()}getColTree(){return this.cols?.tree??[]}getColDefColTree(){return this.colDefCols?.tree??[]}getColDefCols(){return this.colDefCols?.list??null}getCols(){return this.cols?.list??[]}forAllCols(e){const{pivotResultCols:t,autoColSvc:r,selectionColSvc:i,groupHierarchyColSvc:s}=this.beans;ma(this.colDefCols?.list,e),ma(r?.columns?.list,e),ma(i?.columns?.list,e),ma(s?.columns?.list,e),ma(t?.getPivotResultCols()?.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>null!=t):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return null==e?null:this.getColFromCollection(e,this.cols)}getColById(e){return this.cols?.map[e]??null}getColFromCollection(e,t){if(null==t)return null;const{map:r,list:i}=t;if("string"==typeof e&&r[e])return r[e];for(let a=0;a<i.length;a++)if(va(i[a],e))return i[a];const{autoColSvc:s,selectionColSvc:n,groupHierarchyColSvc:o}=this.beans;return s?.getColumn(e)??n?.getColumn(e)??o?.getColumn(e)??null}},class extends Q{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.rowIndex??-1}getCurrentPageHeight(){const{topRowBounds:e,bottomRowBounds:t}=this;return e&&t?Math.max(t.rowTop+t.rowHeight-e.rowTop,0):0}getCurrentPagePixelRange(){const{topRowBounds:e,bottomRowBounds:t}=this;return{pageFirstPixel:e?.rowTop??0,pageLastPixel:t?t.rowTop+t.rowHeight:0}}calculateBounds(e,t){const{rowModel:r}=this.beans,i=r.getRowBounds(e);i&&(i.rowIndex=e),this.topRowBounds=i;const s=r.getRowBounds(t);s&&(s.rowIndex=t),this.bottomRowBounds=s,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},class extends Q{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:e?.animate??!1,newData:e?.newData??!1,newPage:e?.newPage??!1,newPageSize:e?.newPageSize??!1,keepRenderedRows:e?.keepRenderedRows??!1})}calculatePages(){const{pageBounds:e,pagination:t,rowModel:r}=this.beans;t?t.calculatePages():e.calculateBounds(0,r.getRowCount()-1)}},class extends Q{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{for(const n of this.getAllCellCtrls())n.onCellSelectionChanged()},t=()=>{for(const n of this.getAllCellCtrls())n.updateRangeBordersIfRangeCount()},r=()=>{this.eventSvc.addListener("cellSelectionChanged",e),this.eventSvc.addListener("columnMoved",t),this.eventSvc.addListener("columnPinned",t),this.eventSvc.addListener("columnVisible",t)},i=()=>{this.eventSvc.removeListener("cellSelectionChanged",e),this.eventSvc.removeListener("columnMoved",t),this.eventSvc.removeListener("columnPinned",t),this.eventSvc.removeListener("columnVisible",t)};this.addDestroyFunc(()=>i()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{xs(this.gos)?r():i()}),xs(this.gos)&&r()}}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:r}=this.beans;if(r&&this.addManagedPropertyListener("showOpenedGroup",()=>{const i=r.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=Dr(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount();this.cachedRowCtrls=new jT(e??3)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){const e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),r=this.cachedRowCtrls?.getEntries()??[];this.allRowCtrls=t.length>0||r.length>0?[...e,...t,...r]:e}isCellBeingRendered(e,t){const r=this.rowCtrlsByRowIndex[e];return t&&r?!(!r.isFullWidth()&&!this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:e,column:t,rowPinned:null})&&!r.getCellCtrl(t)&&r.isRowRendered()):!!r}updateCellFocus(e){for(const t of this.getAllCellCtrls())t.onCellFocused(e);for(const t of this.getFullWidthRowCtrls())t.onFullWidthRowFocused(e)}onCellFocusChanged(e){if(null!=e?.rowIndex&&!e.rowPinned){const t=this.beans.colModel.getCol(e.column)??void 0;this.isCellBeingRendered(e.rowIndex,t)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){for(const t of this.getAllCellCtrls())t.onSuppressCellFocusChanged(e);for(const t of this.getFullWidthRowCtrls())t.onSuppressCellFocusChanged(e)}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;if(t)for(const r of this.getAllCellCtrls())t.onFlashCells(r,e)},columnHoverChanged:()=>{for(const e of this.getAllCellCtrls())e.onColumnHover()},displayedColumnsChanged:()=>{for(const e of this.getAllCellCtrls())e.onDisplayedColumnsChanged()},displayedColumnsWidthChanged:()=>{if(this.printLayout)for(const e of this.getAllCellCtrls())e.onLeftChanged()}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){for(const e of this.destroyFuncsForColumnListeners)e();this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();const e=this.colModel.getCols();for(const t of e){const r=l=>{for(const c of this.getAllCellCtrls())c.column===t&&l(c)},i=()=>{r(l=>l.onLeftChanged())},s=()=>{r(l=>l.onWidthChanged())},n=()=>{r(l=>l.onFirstRightPinnedChanged())},o=()=>{r(l=>l.onLastLeftPinnedChanged())},a=()=>{r(l=>l.onColDefChanged())};t.__addEventListener("leftChanged",i),t.__addEventListener("widthChanged",s),t.__addEventListener("firstRightPinnedChanged",n),t.__addEventListener("lastLeftPinnedChanged",o),t.__addEventListener("colDefChanged",a),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",i),t.__removeEventListener("widthChanged",s),t.__removeEventListener("firstRightPinnedChanged",n),t.__removeEventListener("lastLeftPinnedChanged",o),t.__removeEventListener("colDefChanged",a)})}}onDomLayoutChanged(){const e=Dr(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),r=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,r&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){this.redrawAfterModelUpdate({recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0})}getAllCellsNotSpanningForColumn(e){const t=[];for(const r of this.getAllRowCtrls()){const i=r.getCellCtrl(e,!0)?.eGui;i&&t.push(i)}return t}refreshFloatingRowComps(e=!0){this.refreshFloatingRows(this.topRowCtrls,"top",e),this.refreshFloatingRows(this.bottomRowCtrls,"bottom",e)}refreshFloatingRows(e,t,r){const{pinnedRowModel:i,beans:s,printLayout:n}=this,o=Object.fromEntries(e.map(l=>[l.rowNode.id,l]));i?.forEachPinnedRow(t,(l,c)=>{const d=e[c];d&&void 0===i.getPinnedRowById(d.rowNode.id,t)&&(d.destroyFirstPass(),d.destroySecondPass()),l.id in o&&r?(e[c]=o[l.id],delete o[l.id]):e[c]=new xc(l,s,!1,!1,n)});const a=("top"===t?i?.getPinnedTopRowCount():i?.getPinnedBottomRowCount())??0;e.length=a}onPinnedRowDataChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else{if(this.cachedRowCtrls?.has(e))return void this.cachedRowCtrls.removeRow(e);{const r=i=>{const s=i[e.rowIndex];s&&s.rowNode===e&&(s.destroyFirstPass(),s.destroySecondPass(),i[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":r(this.topRowCtrls);break;case"bottom":r(this.bottomRowCtrls);break;default:r(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){const{editSvc:t}=this.beans;if(t?.isEditing()&&(t.isBatchEditing()?t.cleanupEditors():t.stopEditing(void 0,{source:"api"})),null==e)this.redrawAfterModelUpdate();else{for(const i of e??[])this.redrawRow(i,!0);this.dispatchDisplayedRowsChanged(!1)}}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);const r=!e.domLayoutChanged&&!!e.recycleRows,i=e.animate&&vo(this.gos),s=r?this.getRowsToRecycle():null;r||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:n,gos:o}=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(o.get("enableRowPinning")?r:void 0),this.dispatchDisplayedRowsChanged(),null!=t&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,r=this.gos.get("suppressScrollOnNewData");t&&!r&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(e=0){const{rowContainerHeight:t}=this;if(this.printLayout)return void t.setModelHeight(null);let r=this.pageBounds.getCurrentPageHeight();0===r&&(r=1),t.setModelHeight(r+e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error(ts(252));this.refreshInProgress=!0,this.beans.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.beans.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;const t=this.beans.focusSvc,r=this.findPositionToFocus(e);r?e.rowIndex===r.rowIndex&&e.rowPinned==r.rowPinned?t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(_e(this.gos,{...r,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"})):t.setFocusedCell({...r,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0}):t.focusHeaderPosition({headerPosition:{headerRowIndex:os(this.beans)-1,column:e.column}})}findPositionToFocus(e){const{pagination:t,pageBounds:r}=this.beans;let i=e;for(null==i.rowPinned&&t&&r&&!t.isRowInPage(i.rowIndex)&&(i={rowPinned:null,rowIndex:r.getFirstRow()});i;){if(null==i.rowPinned&&r)if(i.rowIndex<r.getFirstRow()){if(i=cc(this.beans,{rowPinned:null,rowIndex:0}),!i)return null}else i.rowIndex>r.getLastRow()&&(i={rowPinned:null,rowIndex:r.getLastRow()});const s=this.getRowByPosition(i);if(s?.isAlive())return{...s.getRowPosition(),column:e.column};i=cc(this.beans,i)}return null}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),r=t.length;for(let i=0;i<r;i++){const s=t[i].getAllCellCtrls(),n=s.length;for(let o=0;o<n;o++)e.push(s[o])}return e}getAllRowCtrls(){const{spannedRowRenderer:e}=this.beans,t=this.getStickyTopRowCtrls(),r=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...t,...r,...e?.getCtrls("top")??[],...e?.getCtrls("bottom")??[],...e?.getCtrls("center")??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(e,t,r){const i=this.rowCtrlsByRowIndex[t];i&&i.addEventListener(e,r)}refreshCells({rowNodes:e,columns:t,force:r,suppressFlash:i}={}){const s={force:r,newData:!1,suppressFlash:i};for(const n of this.getCellCtrls(e,t))n.refreshOrDestroyCell(s);this.refreshFullWidth(e)}refreshRows(e={}){for(const t of this.getRowCtrls(e.rowNodes))t.refreshRow(e);this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=!1;for(const r of this.getRowCtrls(e))r.isFullWidth()&&(r.refreshFullWidth()||(t=!0,this.redrawRow(r.rowNode,!0)));t&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(e){const t=lh(e),r=this.getAllRowCtrls();return e&&t?r.filter(i=>ch(i.rowNode,t)):r}getCellCtrls(e,t){let r;le(t)&&(r={},t.forEach(s=>{const n=this.colModel.getCol(s);le(n)&&(r[n.getId()]=!0)}));const i=[];for(const s of this.getRowCtrls(e))for(const n of s.getAllCellCtrls()){const o=n.column.getId();r&&!r[o]||i.push(n)}return i}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){const e=[];for(const r of Object.keys(this.rowCtrlsByRowIndex))null==this.rowCtrlsByRowIndex[r].rowNode.id&&e.push(r);this.removeRowCtrls(e);const t={};for(const r of Object.values(this.rowCtrlsByRowIndex))t[r.rowNode.id]=r;return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){for(const r of e){const i=this.rowCtrlsByRowIndex[r];i&&(i.destroyFirstPass(t),i.destroySecondPass()),delete this.rowCtrlsByRowIndex[r]}}onBodyScroll(e){"vertical"===e.direction&&this.redraw({afterScroll:!0})}redraw(e={}){const{focusSvc:t,animationFrameSvc:r}=this.beans,{afterScroll:i}=e;let s;const n=this.stickyRowFeature;n&&(s=t?.getFocusCellToUseAfterRefresh()||void 0);const o=this.firstRenderedRow,a=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let l=!1;if(n){l=n.checkStickyRows();const d=n.extraTopHeight+n.extraBottomHeight;d&&this.updateContainerHeights(d)}if((!i||l||this.firstRenderedRow!==o||this.lastRenderedRow!==a)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,i),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(i&&!l),null!=s)){const d=t?.getFocusCellToUseAfterRefresh();null!=s&&null==d&&(r?.flushAllFrames(),this.restoreFocusedCell(s))}}removeRowCompsNotToDraw(e,t){const r={};for(const n of e)r[n]=!0;const s=Object.keys(this.rowCtrlsByRowIndex).filter(n=>!r[n]);this.removeRowCtrls(s,t)}calculateIndexesToDraw(e){const t=[];for(let o=this.firstRenderedRow;o<=this.lastRenderedRow;o++)t.push(o);const r=this.beans.pagination,i=this.beans.focusSvc?.getFocusedCell()?.rowIndex;null!=i&&(i<this.firstRenderedRow||i>this.lastRenderedRow)&&(!r||r.isRowInPage(i))&&i<this.rowModel.getRowCount()&&t.push(i);const s=o=>{const a=o.rowNode.rowIndex;null==a||a===i||(a<this.firstRenderedRow||a>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(o)&&t.push(a)};for(const o of Object.values(this.rowCtrlsByRowIndex))s(o);if(e)for(const o of Object.values(e))s(o);t.sort((o,a)=>o-a);const n=[];for(let o=0;o<t.length;o++){const a=t[o],l=this.rowModel.getRow(a);l&&!l.sticky&&n.push(a)}return n}recycleRows(e,t=!1,r=!1){const i=this.calculateIndexesToDraw(e);(this.printLayout||r)&&(t=!1),this.removeRowCompsNotToDraw(i,!t);for(const s of i)this.createOrUpdateRowCtrl(s,e,t,r);if(e){const{animationFrameSvc:s}=this.beans;s?.active&&r&&!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(),r=e.isPinningRight();(this.pinningLeft!==t||r!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=r,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];for(const t of this.getFullWidthRowCtrls())e.push(t.rowNode.rowIndex.toString());this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=lh(e);return this.getAllRowCtrls().filter(r=>!!r.isFullWidth()&&!(null!=t&&!ch(r.rowNode,t)))}createOrUpdateRowCtrl(e,t,r,i){let s,n=this.rowCtrlsByRowIndex[e];if(n||(s=this.rowModel.getRow(e),le(s)&&le(t)&&t[s.id]&&s.alreadyRendered&&(n=t[s.id],t[s.id]=null)),!n){if(s||(s=this.rowModel.getRow(e)),!le(s))return;n=this.createRowCon(s,r,i)}s&&(s.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=n}destroyRowCtrls(e,t){const r=[];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,r.push(()=>{i.destroySecondPass(),delete this.zombieRowCtrls[s]})}else i.destroySecondPass()}t&&(r.push(()=>{this.isAlive()&&(this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged())}),window.setTimeout(()=>{for(const i of r)i()},400))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){return this.getRowBuffer()*kn(this.beans)}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:r}=this;let i,s;if(e.updateOffset(),r.isRowsToRender())if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),i=t.getFirstRow(),s=t.getLastRow();else{const d=this.getRowBufferInPixels(),u=this.ctrlsSvc.getScrollFeature(),h=this.gos.get("suppressRowVirtualisation");let p,g,f=!1;do{const y=t.getPixelOffset(),{pageFirstPixel:k,pageLastPixel:E}=t.getCurrentPagePixelRange(),S=e.divStretchOffset,_=u.getVScrollPosition(),M=_.top,H=_.bottom;h?(p=k+S,g=E+S):(p=Math.max(M+y-d,k)+S,g=Math.min(H+y+d,E)+S),this.firstVisibleVPixel=Math.max(M+y,k)+S,this.lastVisibleVPixel=Math.min(H+y,E)+S,f=this.ensureAllRowsInRangeHaveHeightsCalculated(p,g)}while(f);let m=r.getRowIndexAtPixel(p),v=r.getRowIndexAtPixel(g);const w=t.getFirstRow(),C=t.getLastRow();m<w&&(m=w),v>C&&(v=C),i=m,s=v}else i=0,s=-1;const n=Dr(this.gos,"normal"),o=this.gos.get("suppressMaxRenderedRowRestriction"),a=Math.max(this.getRowBuffer(),500);n&&!o&&s-i>a&&(s=i+a),(i!==this.firstRenderedRow||s!==this.lastRenderedRow)&&(this.firstRenderedRow=i,this.lastRenderedRow=s,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:i,lastRow:s}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,ws(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const r=this.pinnedRowModel?.ensureRowHeightsValid(),i=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:s,rowModel:n}=this,o=n.ensureRowHeightsValid(e,t,s.getFirstRow(),s.getLastRow());return(o||i)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),!!(i||o||r)&&(this.updateContainerHeights(),!0)}doNotUnVirtualiseRow(e){const i=e.rowNode,s=this.focusSvc.isRowFocused(i.rowIndex,i.rowPinned),n=this.editSvc?.isEditing(e);return!!(s||n||i.detail)&&!!this.isRowPresent(i)}isRowPresent(e){return!!this.rowModel.isRowPresent(e)&&(this.beans.pagination?.isRowInPage(e.rowIndex)??!0)}createRowCon(e,t,r){const i=this.cachedRowCtrls?.getRow(e)??null;return i||new xc(e,this.beans,t,r&&!this.printLayout&&!!this.beans.animationFrameSvc?.active,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map(i=>i.rowNode);return[...this.getStickyTopRowCtrls().map(i=>i.rowNode),...e,...this.getStickyBottomRowCtrls().map(i=>i.rowNode)]}getRowByPosition(e){let t;const{rowIndex:r}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[r];break;case"bottom":t=this.bottomRowCtrls[r];break;default:t=this.rowCtrlsByRowIndex[r],t||(t=this.getStickyTopRowCtrls().find(i=>i.rowNode.rowIndex===r)||null,t||(t=this.getStickyBottomRowCtrls().find(i=>i.rowNode.rowIndex===r)||null))}return t}isRangeInRenderedViewport(e,t){return null!=e&&null!=t&&!(t<this.firstRenderedRow||e>this.lastRenderedRow)}},class extends Q{constructor(){super(...arguments),this.beanName="valueSvc",this.hasEditSvc=!1,this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc,this.editSvc=e.editSvc,this.hasEditSvc=!!e.editSvc}postConstruct(){this.initialised||this.init()}init(){this.executeValueGetter=this.valueCache?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=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.addListener("cellValueChanged",e,!0),this.addDestroyFunc(()=>this.eventSvc.removeListener("cellValueChanged",e,!0)),this.addManagedPropertyListener("treeData",t=>this.isTreeData=t.currentValue)}getValueForDisplay(e,t,r=!1,i=!1,s="ui"){const{showRowGroupColValueSvc:n}=this.beans,o=!e&&t.group,a=e?.colDef.showRowGroup;if(n&&(!this.isTreeData||t.footer)&&(o||a)){const g=n.getGroupValue(t,e);if(null==g)return{value:null,valueFormatted:null};if(!r)return{value:g.value,valueFormatted:null};const m=n.formatAndPrefixGroupColValue(g,e,i);return{value:g.value,valueFormatted:m}}if(!e)return{value:t.key,valueFormatted:null};const c=t.leafGroup&&this.colModel.isPivotMode(),d=t.group&&t.expanded&&!t.footer&&!c,u=this.gos.get("groupSuppressBlankHeader")||!t.sibling,f=this.getValue(e,t,d&&!u,s);return{value:f,valueFormatted:!r||i&&!1===e.colDef.useValueFormatterForExport?null:this.formatValue(e,t,f)}}getValue(e,t,r=!1,i="ui"){if(this.initialised||this.init(),!t)return;const s=e.getColDef(),n=s.field,o=e.getColId(),a=t.data;if(this.hasEditSvc&&"ui"===i){const g=this.editSvc;if(g.isEditing()){const m=g.getCellDataValue({rowNode:t,column:e},!0);if(void 0!==m)return m}}let l;const c=s.showRowGroup;if("string"==typeof c&&(this.beans.rowGroupColsSvc?.getColumnIndex(c)??-1)>t.level)return null;const d="string"!=typeof c||!t.group,u=t.groupData&&o in t.groupData,h=!r&&t.aggData&&void 0!==t.aggData[o],f=this.isSsrm&&r&&!!s.aggFunc,p=this.isSsrm&&t.footer&&t.field&&(!0===s.showRowGroup||s.showRowGroup===t.field);if(this.isTreeData&&h)l=t.aggData[o];else if(this.isTreeData&&s.valueGetter)l=this.executeValueGetter(s.valueGetter,a,e,t);else if(this.isTreeData&&n&&a)l=Pa(a,n,e.isFieldContainsDots());else if(u)l=t.groupData[o];else if(h)l=t.aggData[o];else if(s.valueGetter&&!f){if(!d)return l;l=this.executeValueGetter(s.valueGetter,a,e,t)}else if(p)l=Pa(a,t.field,e.isFieldContainsDots());else if(n&&a&&!f){if(!d)return l;l=Pa(a,n,e.isFieldContainsDots())}if(this.cellExpressions&&"string"==typeof l&&0===l.indexOf("=")){const g=l.substring(1);l=this.executeValueGetter(g,a,e,t)}return l}parseValue(e,t,r,i){const s=e.getColDef(),n=s.valueParser;if(le(n)){const o=_e(this.gos,{node:t,data:t?.data,oldValue:i,newValue:r,colDef:s,column:e});return"function"==typeof n?n(o):this.expressionSvc?.evaluate(n,o)}return r}getDeleteValue(e,t){return le(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay(e,t).value)??null:null}formatValue(e,t,r,i,s=!0){const{expressionSvc:n}=this.beans;let a,o=null;const l=e.getColDef();if(i?a=i:s&&(a=l.valueFormatter),a){const d=_e(this.gos,{value:r,node:t,data:t?t.data:null,colDef:l,column:e});o="function"==typeof a?a(d):n?n.evaluate(a,d):null}else if(l.refData)return l.refData[r]||"";return null==o&&Array.isArray(r)&&(o=r.join(", ")),o}setValue(e,t,r,i){const s=this.colModel.getColDefCol(t);if(!e||!s)return!1;pt(e.data)&&(e.data={});const{field:n,valueSetter:o}=s.getColDef();if(pt(n)&&pt(o))return ne(17),!1;if(this.dataTypeSvc&&!this.dataTypeSvc.checkType(s,r))return ne(135),!1;const a=_e(this.gos,{node:e,data:e.data,oldValue:this.getValue(s,e,void 0,i),newValue:r,colDef:s.getColDef(),column:s});let l;if(a.newValue=r,l=le(o)?"function"==typeof o?o(a):this.expressionSvc?.evaluate(o,a):this.setValueUsingField(e.data,n,r,s.isFieldContainsDots()),void 0===l&&(l=!0),!l)return!1;e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();const c=this.getValue(s,e);return this.dispatchCellValueChangedEvent(e,a,c,i),e.pinnedSibling&&this.dispatchCellValueChangedEvent(e.pinnedSibling,a,c,i),!0}dispatchCellValueChangedEvent(e,t,r,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:r,value:r,source:i})}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;"function"==typeof t&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,context:e.context})})}setValueUsingField(e,t,r,i){if(!t)return!1;let s=!1;if(i){const n=t.split(".");let o=e;for(;n.length>0&&o;){const a=n.shift();0===n.length?(s=o[a]===r,s||(o[a]=r)):o=o[a]}}else s=e[t]===r,s||(e[t]=r);return!s}executeValueGetterWithValueCache(e,t,r,i){const s=r.getColId(),n=this.valueCache.getValue(i,s);if(void 0!==n)return n;const o=this.executeValueGetterWithoutValueCache(e,t,r,i);return this.valueCache.setValue(i,s,o),o}executeValueGetterWithoutValueCache(e,t,r,i){const s=_e(this.gos,{data:t,node:i,column:r,colDef:r.getColDef(),getValue:this.getValueCallback.bind(this,i)});let n;return n="function"==typeof e?e(s):this.expressionSvc?.evaluate(e,s),n}getValueCallback(e,t){const r=this.colModel.getColDefCol(t);return r?this.getValue(r,e):null}getKeyForNode(e,t){const r=this.getValue(e,t),i=e.getColDef().keyCreator;let s=r;return i&&(s=i(_e(this.gos,{value:r,colDef:e.getColDef(),column:e,node:t,data:t.data}))),"string"==typeof s||null==s||(s=String(s),"[object Object]"===s&&ne(121)),s}},class extends Q{constructor(){super(...arguments),this.beanName="focusSvc",this.focusFallbackTimeout=null,this.needsFocusRestored=!1}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols,this.rowRenderer=e.rowRenderer,this.navigation=e.navigation,this.filterManager=e.filterManager,this.overlays=e.overlays}postConstruct(){const e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc(function d2(e){const t=It(e);return function l2(e){Vl>0||(e.addEventListener("keydown",zl),e.addEventListener("mousedown",zl))}(t),Vl++,()=>{Vl--,function c2(e){Vl>0||(e.removeEventListener("keydown",zl),e.removeEventListener("mousedown",zl))}(t)}}(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,null!=this.focusFallbackTimeout&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,null!=this.focusFallbackTimeout&&(clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=null)}shouldTakeFocus(){return this.gos.get("suppressFocusAfterRefresh")?(this.setFocusRecovered(),!1):this.needsFocusRestored?(this.setFocusRecovered(),!0):this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;const e=this.focusedCell.column,t=this.colModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){const{gos:e,focusedCell:t}=this;return e.get("suppressFocusAfterRefresh")||e.get("suppressCellFocus")||!t||!this.doesRowOrCellHaveBrowserFocus()?null:t}getFocusHeaderToUseAfterRefresh(){return!this.gos.get("suppressFocusAfterRefresh")&&this.focusedHeader&&this.isDomDataPresentInHierarchy(mt(this.beans),g0)?this.focusedHeader:null}doesRowOrCellHaveBrowserFocus(){const e=mt(this.beans);return!!this.isDomDataPresentInHierarchy(e,Ql)||this.isDomDataPresentInHierarchy(e,Jl)}isDomDataPresentInHierarchy(e,t){let r=e;for(;r;){if(_g(this.gos,r,t))return!0;r=r.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){const{rowIndex:t,rowPinned:r,column:i}=e,s={rowIndex:t,rowPinned:r,column:i,isFullWidthCell:!1},n=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:r});return n&&(s.isFullWidthCell=n.isFullWidth()),s}clearFocusedCell(){if(null==this.focusedCell)return;const e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){this.setFocusRecovered();const{column:t,rowIndex:r,rowPinned:i,forceBrowserFocus:s=!1,preventScrollOnBrowserFocus:n=!1,sourceEvent:o}=e,a=this.colModel.getCol(t);if(!a)return void(this.focusedCell=null);this.focusedCell={rowIndex:r,rowPinned:zi(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:o}),this.previousCellFocusParams=l}isCellFocused(e){return null!=this.focusedCell&&_0(e,this.focusedCell)}isHeaderWrapperFocused(e){if(null==this.focusedHeader)return!1;const{column:t,rowCtrl:{rowIndex:r,pinned:i}}=e,{column:s,headerRowIndex:n}=this.focusedHeader;return t===s&&r===n&&i==s.getPinned()}focusHeaderPosition(e){if(this.setFocusRecovered(),On(this.beans))return!1;const{direction:t,fromTab:r,allowUserOverride:i,event:s,fromCell:n,rowWithoutSpanValue:o,scroll:a=!0}=e;let{headerPosition:l}=e;if(n&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(l);if(i){const c=this.focusedHeader,d=os(this.beans);if(r){const u=this.gos.getCallback("tabToNextHeader");u&&(l=this.getHeaderPositionFromUserFunc({userFunc:u,direction:t,currentPosition:c,headerPosition:l,headerRowCount:d}))}else{const u=this.gos.getCallback("navigateToNextHeader");u&&s&&(l=u({key:s.key,previousHeaderPosition:c,nextHeaderPosition:l,headerRowCount:d,event:s}))}}return!!l&&this.focusProvidedHeaderPosition({headerPosition:l,direction:t,event:s,fromCell:n,rowWithoutSpanValue:o,scroll:a})}focusHeaderPositionFromUserFunc(e){if(On(this.beans))return!1;const{userFunc:t,headerPosition:r,direction:i,event:s}=e,n=this.focusedHeader,o=os(this.beans),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:i,currentPosition:n,headerPosition:r,headerRowCount:o});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:i,event:s})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:r,currentPosition:i,headerPosition:s,headerRowCount:n}=e,a=t({backwards:"Before"===r,previousHeaderPosition:i,nextHeaderPosition:s,headerRowCount:n});return!0===a?i:!1===a?null:a}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:r,fromCell:i,rowWithoutSpanValue:s,event:n,scroll:o=!0}=e,{column:a,headerRowIndex:l}=t,{filterManager:c,ctrlsSvc:d,headerNavigation:u}=this.beans;if(this.focusedHeader&&function Ay(e,t){return e.headerRowIndex===t.headerRowIndex&&e.column===t.column}(e.headerPosition,this.focusedHeader))return!1;if(-1===l)return c?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:a,event:n});o&&u?.scrollToColumn(a,r);const f=d.getHeaderRowContainerCtrl(a.getPinned())?.focusHeader(t.headerRowIndex,a,n)||!1;return u&&f&&(null!=s||i)&&(u.currentHeaderRowWithoutSpan=s??-1),f}focusFirstHeader(){if(this.overlays?.isExclusive()&&this.focusOverlay())return!0;const e=this.visibleCols.allCols[0];if(!e)return!1;const t=am(this.beans,e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.isExclusive()&&this.focusOverlay(!0))return!0;const t=os(this.beans)-1,r=kt(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:r},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return null!=this.focusedCell&&this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===zi(t)}focusOverlay(e){const t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&Dn(t,e)}focusGridView(e){const{backwards:t=!1,canFocusOverlay:r=!0,event:i}=e;if(this.overlays?.isExclusive())return r&&this.focusOverlay(t);if(nc(this.beans))return t&&!On(this.beans)?this.focusLastHeader():!(!r||!this.focusOverlay(t))||!t&&Po(this.beans,t);const s=t?function uE(e){let t,r=null;const{pinnedRowModel:i,pageBounds:s}=e,n=i?.getPinnedBottomRowCount(),o=i?.getPinnedTopRowCount();return n?(r="bottom",t=n-1):e.rowModel.getRowCount()?t=s.getLastRow():o&&(r="top",t=o-1),void 0===t?null:{rowIndex:t,rowPinned:r}}(this.beans):function dE(e){let r,t=0;const{pinnedRowModel:i,rowModel:s,pageBounds:n}=e;return i?.getPinnedTopRowCount()?r="top":s.getRowCount()?(r=null,t=n.getFirstRow()):i?.getPinnedBottomRowCount()&&(r="bottom"),void 0===r?null:{rowIndex:t,rowPinned:r}}(this.beans);if(s){const n=e.column??this.focusedHeader?.column,{rowIndex:o,rowPinned:a}=s,l=Rs(this.beans,s);if(!n||!l||null==o)return!1;if(n.isSuppressNavigable(l)){const c=this.gos.get("enableRtl");let d;return d=i&&"Tab"!==i.key?i.key:c?U_LEFT:U_RIGHT,this.beans.navigation?.navigateToNextCell(null,d,{rowIndex:o,column:n,rowPinned:a||null},!0),!0}return this.navigation?.ensureCellVisible({rowIndex:o,column:n,rowPinned:a}),t&&this.rowRenderer.getRowByPosition(s)?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(s,t)||(this.setFocusedCell({rowIndex:o,column:n,rowPinned:zi(a),forceBrowserFocus:!0}),this.beans.rangeSvc?.setRangeToCell({rowIndex:o,rowPinned:a,column:n})),!0}return!!(r&&this.focusOverlay(t)||t&&this.focusLastHeader())}focusAdvancedFilter(e){return this.advFilterFocusColumn=e?.column,this.beans.advancedFilter?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(e,t){const r=(t?void 0:this.advFilterFocusColumn)??this.visibleCols.allCols?.[0];return e?this.focusHeaderPosition({headerPosition:{column:r,headerRowIndex:os(this.beans)-1}}):this.focusGridView({column:r})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},class extends sb{constructor(){super(...arguments),this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1}initVariables(){this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(im),this.getSizeEl(sm),this.getSizeEl(nm),this.getSizeEl(Ju),this.getSizeEl(om),this.refreshRowBorderWidthVariable()}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(om)}getRowBorderWidth(){return this.getCSSVariablePixelValue(Ju)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(im)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(sm)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(QR)}getCellPaddingLeft(){const e=this.getDefaultCellHorizontalPadding(),t=this.getCSSVariablePixelValue(JR);return e-1+this.getCSSVariablePixelValue(ZR)*t}getCellPadding(){const e=this.getDefaultCellHorizontalPadding()-1;return this.getCellPaddingLeft()+e}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(nm)}refreshRowHeightVariable(){const{eRootDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),r=this.gos.get("rowHeight");if(null==r||isNaN(r)||!isFinite(r))return null!==t&&e.style.setProperty("--ag-line-height",null),-1;const i=`${r}px`;return t!=i?(e.style.setProperty("--ag-line-height",i),r):""!=t?Number.parseFloat(t):-1}getCSSVariablePixelValue(e){const t=this.lastKnownValues.get(e);if(null!=t)return t;const r=this.measureSizeEl(e);return"detached"===r||"no-styles"===r?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,r),r)}measureSizeEl(e){const t=this.getSizeEl(e);if(null==t.offsetParent)return"detached";const r=t.offsetWidth;return 15538===r?"no-styles":(this.sizesMeasured=!0,r)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=nr({tag:"div",cls:"ag-measurement-container"}),this.eRootDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;const r=this.getMeasurementContainer();t=nr({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 15538px)`)):t.style.width=`var(${e.cssName}, 15538px)`,r.appendChild(t),this.sizeEls.set(e,t);let n=this.measureSizeEl(e);"no-styles"===n&&!s&&ne(9,{variable:e});const o=zs(this.beans,t,()=>{const a=this.measureSizeEl(e);"detached"===a||"no-styles"===a||(this.lastKnownValues.set(e,a),a!==n&&(n=a,this.fireStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>o()),t}fireStylesChangedEvent(e){"rowBorderWidthChanged"===e&&this.refreshRowBorderWidthVariable(),this.eventSvc.dispatchEvent({type:"gridStylesChanged",[e]:!0})}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue(Ju);this.eRootDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}postProcessThemeChange(e,t){e&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&Ct(t?106:239)}getAdditionalCss(){const e=new Map;return e.set("core",['.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-tab-guard{display:block;height:0;position:absolute;width:0}:where(.ag-virtual-list-viewport) .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport,.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important;&::-webkit-scrollbar{display:none!important}}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-virtual-list-viewport{overflow:auto;width:100%}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-right-cols-container,.ag-sticky-bottom-container,.ag-sticky-top-container,.ag-virtual-list-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-virtual-list-container{overflow:hidden}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-scrolling,.ag-scrollbar-active){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value:not(.ag-allow-overflow),.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-top:not(.ag-invisible)){border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-bottom:not(.ag-invisible)){border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-data-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block;&:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}}.ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-group-title-bar) .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-flow:row wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}:where(.ag-ltr) .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}:where(.ag-group-item-alignment-stretch) .ag-group-item{align-items:stretch}:where(.ag-group-item-alignment-start) .ag-group-item{align-items:flex-start}:where(.ag-group-item-alignment-end) .ag-group-item{align-items:flex-end}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-data-font-size);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-data-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-sticky-bottom{border-top:var(--ag-row-border);box-sizing:content-box!important}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-data-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after,.ag-row-highlight-inside:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;pointer-events:none;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after,:where(.ag-ltr) .ag-row-highlight-inside:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after,:where(.ag-rtl) .ag-row-highlight-inside:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-highlight-indent:after{display:block;width:auto}:where(.ag-ltr) .ag-row-highlight-indent:after{left:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size));right:1px}:where(.ag-rtl) .ag-row-highlight-indent:after{left:1px;right:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}.ag-row-highlight-inside:after{background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);display:block;height:auto;inset:0;width:auto}.ag-body,.ag-floating-bottom,.ag-floating-top{background-color:var(--ag-data-background-color)}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-data-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-loading-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden),.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)),.ag-header-group-cell{&:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}&:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}&:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}}:where(.ag-header-cell:not(.ag-floating-filter) *,.ag-header-group-cell *){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-accent-color);content:"";height:100%;position:absolute;width:1px}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2;&:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}}:where(.ag-ltr) .ag-header-cell-resize{right:-3px;&:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-rtl) .ag-header-cell-resize{left:-3px;&:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-virtual-list-item{height:var(--ag-list-item-height);position:absolute;width:100%}.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color);&:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);position:relative;&:after{background-color:var(--ag-icon-button-active-indicator-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}:where(.ag-ltr) .ag-filter-active{&:after{right:-1px}}:where(.ag-rtl) .ag-filter-active{&:after{left:-1px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}']),function ek(e,t){for(const r of t.sort((i,s)=>i.moduleName.localeCompare(s.moduleName))){const i=r.css;i&&e.set(`module-${r.moduleName}`,i)}}(e,Array.from(function Dx(){return new Set(xg)}())),e}getDefaultTheme(){return KR}themeError(e){Ct(240,{theme:e})}},class extends Q{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){this.horizontalScrollShowing=!0===this.gos.get("alwaysShowHorizontalScroll"),this.verticalScrollShowing=!0===this.gos.get("alwaysShowVerticalScroll"),this.getScrollbarWidth(),this.addManagedEventListeners({displayedColumnsChanged:this.updateScrollVisible.bind(this),displayedColumnsWidthChanged:this.updateScrollVisible.bind(this)})}updateScrollVisible(){const{colAnimation:e}=this;e?.isActive()?e.executeLaterVMTurn(()=>{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){const e=this.ctrlsSvc.get("center");if(!e||this.colAnimation?.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){const e=this.ctrlsSvc.get("center"),t=e.hasHorizontalScrollGap(),r=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==r)&&(this.horizontalScrollGap=t,this.verticalScrollGap=r,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(null==this.scrollbarWidth){const e=this.gos.get("scrollbarWidth"),r="number"==typeof e&&e>=0?e:function i2(){return null==$d&&vp(),$d}();null!=r&&(this.scrollbarWidth=r,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},class extends Q{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",()=>{if(this.updateReady(),this.ready){for(const e of this.readyCallbacks)e(this.params);this.readyCallbacks.length=0}},this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){const e=Object.values(this.params);this.ready=23===e.length&&e.every(t=>t?.isAlive()??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{const r=this.readyCallbacks.indexOf(t);r>=0&&this.readyCallbacks.splice(r,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:r}=this.params;return[e,r,t]}getHeaderRowContainerCtrl(e){const t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},class extends Q{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:r}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),r.start()}gridReady(){const{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),Us(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns)return this.waitingForColumns=!1,void this.setColumnsAndData(t);this.beans.colModel.setColumnDefs(t,xo(e.source))}}},class extends Q{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,r=!1){if(!e)return null;const i=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:s}=this.beans;return r&&s?s.getHeaderName(e,i):i}getDisplayNameForProvidedColumnGroup(e,t,r){const i=t?.getColGroupDef();return i?this.getHeaderName(i,null,e,t,r):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,r,i,s){const n=e.headerValueGetter;if(n){const o=_e(this.gos,{colDef:e,column:t,columnGroup:r,providedColumnGroup:i,location:s});return"function"==typeof n?n(o):"string"==typeof n?this.beans.expressionSvc?.evaluate(n,o)??null:""}return null!=e.headerName?e.headerName:e.field?function YF(e){return e&&null!=e?e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z])([a-z])/g,"$1 $2$3").replace(/\./g," ").split(" ").map(s=>s.substring(0,1).toUpperCase()+(s.length>1?s.substring(1,s.length):"")).join(" "):null}(e.field):""}},class extends Q{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,r=!1){const{visibleCols:i}=this;if(e!==this.scrollWidth||t!==this.scrollPosition||i.isBodyWidthDirty){if(this.scrollWidth=e,this.scrollPosition=t,i.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const o=i.bodyWidth;this.viewportLeft=o-t-e,this.viewportRight=o-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(r)}}getColumnHeadersToRender(e){switch(e){case"left":return this.columnsToRenderLeft;case"right":return this.columnsToRenderRight;default:return this.columnsToRenderCenter}}getHeadersToRender(e,t){let r;switch(e){case"left":r=this.rowsOfHeadersToRenderLeft[t];break;case"right":r=this.rowsOfHeadersToRenderRight[t];break;default:r=this.rowsOfHeadersToRenderCenter[t]}return r??[]}extractViewportColumns(){const e=this.visibleCols.centerCols;this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=e,this.headerColsWithinViewport=e):(this.colsWithinViewport=e.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=e.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||0===this.viewportRight}clear(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return!(!e.isAutoHeaderHeight()&&!function ZF(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}(e))||this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,r=t+e.getActualWidth(),i=this.viewportLeft-200,s=this.viewportRight+200;return!(t<i&&r<i||t>s&&r>s)}getViewportColumns(){const{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;const r=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:i}=this;return i.getColsForRow(e,i.centerCols,r,n=>{const o=n.getLeft();return le(o)&&o>this.viewportLeft})}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){const{leftCols:e,rightCols:t}=this.visibleCols;this.columnsToRenderLeft=e,this.columnsToRenderRight=t,this.columnsToRenderCenter=this.colsWithinViewport;const r=i=>{const s=new Set,n={};for(const o of i){let a=o.getParent();const l=o.isSpanHeaderHeight();for(;a&&!s.has(a);){if(l&&a.isPadding()){a=a.getParent();continue}const d=a.getProvidedColumnGroup().getLevel();n[d]??(n[d]=[]),n[d].push(a),s.add(a),a=a.getParent()}}return n};this.rowsOfHeadersToRenderLeft=r(e),this.rowsOfHeadersToRenderRight=r(t),this.rowsOfHeadersToRenderCenter=r(this.headerColsWithinViewport)}extractViewport(){this.extractViewportColumns();const t=this.getViewportColumns().map(i=>`${i.getId()}-${i.getPinned()||"normal"}`).join("#"),r=this.colsWithinViewportHash!==t;return r&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),r}},class extends Q{constructor(){super(...arguments),this.beanName="iconSvc"}createIconNoSpan(e,t){return Ti(e,this.beans,t?.column)}}],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId:function M0(e){return e.context.getId()},destroy:function $3(e){e.gridDestroySvc.destroy()},isDestroyed:function j3(e){return e.gridDestroySvc.destroyCalled},getGridOption:function K3(e,t){return e.gos.get(t)},setGridOption:function q3(e,t,r){I0(e,{[t]:r})},updateGridOptions:I0,isModuleRegistered:function X3(e,t){const r=t.replace(/Module$/,"");return e.gos.isModuleRegistered(r)}},dependsOn:[qF,jE,ZE,km,Nk,mF,Hk,zT,sP,Vk,yT,PT,AT,Uk,tR,XF,iP,xF,_T]},Tm={AdvancedFilter:1,AiToolkit:1,AllEnterprise:1,BatchEdit:1,CellSelection:1,Clipboard:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,NewFiltersToolPanel:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,SideBar:1,Sparklines:1,StatusBar:1,TreeData:1,ViewportRowModel:1},dh=["TextFilter","NumberFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],lP={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:dh,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],RowModelSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...dh,"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:[...dh,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},cP={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function _a(e,t=!1){return!t||"IntegratedCharts"!==e&&"Sparklines"!==e?`${e}Module`:`${e}Module.with(AgChartsEnterpriseModule)`}function Dm({moduleName:e,rowModelType:t}){return`To use the ${e}Module you must set the gridOption "rowModelType='${t}'"`}var Am=({reasonOrId:e,moduleName:t,gridScoped:r,gridId:i,rowModelType:s,additionalText:n,isUmd:o})=>{const a=function dP(e,t){const r=[];for(const i of Array.isArray(e)?e:[e]){const s=lP[i];if(s)for(const n of s){const o=cP[n];(!o||o===t)&&r.push(n)}else r.push(i)}return r}(t,s),l="string"==typeof e?e:mP[e];if(o)return function hP(e,t){const r=t.filter(n=>"IntegratedCharts"===n||"Sparklines"===n);let i="";return!globalThis?.agCharts&&r.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.\n`:t.some(n=>Tm[n])&&(i+=`Unable to use ${e} as that requires the ag-grid-enterprise script to be included.\n`),i}(l,a);const c=a.filter(h=>"IntegratedCharts"===h||"Sparklines"===h),d=c.length>0?`${c.map(h=>_a(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=>_a(h)).join(", "):_a(a[0])} is not registered${r?" for gridId: "+i:""}. ${d} Check if you have registered the module:\n\n${(e=>{const t=e.map(i=>`import { ${_a(i)} } from '${Tm[i]?"ag-grid-enterprise":"ag-grid-community"}';`);return e.some(i=>"IntegratedCharts"===i||"Sparklines"===i)&&t.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community'; \n${t.join(" \n")} \n\nModuleRegistry.registerModules([ ${e.map(i=>_a(i,!0)).join(", ")} ]); \n\nFor more info see: ${po}/modules/`})(a)}`+(n?` \n\n${n}`:"")},Mm=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.\n\nimport { AgChartsEnterpriseModule } from 'ag-charts-enterprise';\nimport { ModuleRegistry } from 'ag-grid-community';\nimport { ${e} } from 'ag-grid-enterprise';\n \nModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);\n `,gP={1:()=>"`rowData` must be an array",2:({nodeId:e})=>`Duplicate node id '${e}' detected from getRowId callback, this could cause issues in your grid.`,3:()=>"Calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.",4:({id:e})=>`Could not find row id=${e}, data item was not found for this id`,5:({data:e})=>["Could not find data item as object was not found.",e," Consider using getRowId to help the Grid find matching row data"],6:()=>"'groupHideOpenParents' only works when specifying specific columns for 'colDef.showRowGroup'",7:()=>"Pivoting is not supported with aligned grids as it may produce different columns in each grid.",8:({key:e})=>`Unknown key for navigation ${e}`,9:({variable:e})=>`No value for ${e?.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e?.defaultValue} will be used and updated when styles load.`,10:({eventType:e})=>`As of v33, the '${e}' event is deprecated. Use the global 'modelUpdated' event to determine when row children have changed.`,11:()=>"No gridOptions provided to createGrid",12:({colKey:e})=>["column ",e," not found"],13:()=>"Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid.",14:({groupPrefix:e})=>`Row IDs cannot start with ${e}, this is a reserved prefix for AG Grid's row grouping feature.`,15:({expression:e})=>["value should be either a string or a function",e],16:({expression:e,params:t,e:r})=>["Processing of the expression failed","Expression = ",e,"Params = ",t,"Exception = ",r],17:()=>"you need either field or valueSetter set on colDef for editing to work",18:()=>"alignedGrids contains an undefined option.",19:()=>"alignedGrids - No api found on the linked grid.",20:()=>'You may want to configure via a callback to avoid setup race conditions:\n "alignedGrids: () => [linkedGrid]"',21:()=>"pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.",22:({key:e})=>`${e} is an initial property and cannot be updated.`,23:()=>"The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.",24:()=>"row height must be a number if not using standard row model",25:({id:e})=>["The getRowId callback must return a string. The ID ",e," is being cast to a string."],26:({fnName:e,preDestroyLink:t})=>`Grid API function ${e}() cannot be called as the grid has been destroyed.\n Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.\n To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${t}`,27:({fnName:e,module:t})=>`API function '${e}' not registered to module '${t}'`,28:()=>"setRowCount cannot be used while using row grouping.",29:()=>"tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?",30:({toIndex:e})=>["tried to insert columns in invalid location, toIndex = ",e,"remember that you should not count the moving columns when calculating the new index"],31:()=>"infinite loop in resizeColumnSets",32:()=>"applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.",33:()=>"stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON.",34:({key:e})=>`the column type '${e}' is a default column type and cannot be overridden.`,35:()=>"Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type.",36:({t:e})=>"colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes",37:()=>"Changing the column pinning status is not allowed with domLayout='print'",38:({iconName:e})=>`provided icon '${e}' needs to be a string or a function`,39:()=>"Applying column order broke a group where columns should be married together. Applying new order has been discarded.",40:({e,method:t})=>`${e}\n${(e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`)(t)}`,41:()=>"Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support document.execCommand('copy') for clipboard operations",43:({iconName:e})=>`As of v33, icon '${e}' is deprecated. Use the icon CSS name instead.`,44:()=>'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',45:({parentCellDataType:e})=>`The data type definition ${e} does not exist.`,46:()=>'The "baseDataType" property of a data type definition must match that of its parent.',47:({cellDataType:e})=>`Missing data type definition - "${e}"`,48:({property:e})=>`Cell data type is "object" but no Value ${e} has been provided. Please either provide an object data type definition with a Value ${e}, or set "colDef.value${e}"`,49:({methodName:e})=>`Framework component is missing the method ${e}()`,50:({compName:e})=>`Could not find component ${e}, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"addRowDropZone - A container target needs to be provided",56:()=>"addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:e})=>`setFilterModel() - no column found for colId: ${e}`,63:({colId:e})=>`setFilterModel() - unable to fully apply model, filtering disabled for colId: ${e}`,64:({colId:e})=>`setFilterModel() - unable to fully apply model, unable to create filter for colId: ${e}`,65:()=>"filter missing setModel method, which is needed for setFilterModel",66:()=>"filter API missing getModel method, which is needed for getFilterModel",67:()=>"Filter is missing isFilterActive() method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:e})=>`getGui method from filter returned ${e}; it should be a DOM element.`,70:({newFilter:e})=>"Grid option quickFilterText only supports string inputs, received: "+typeof e,71:()=>"debounceMs is ignored when apply button is present",72:({keys:e})=>["ignoring FilterOptionDef as it doesn't contain one of ",e],73:()=>"invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'",74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:e})=>['Unexpected type of filter "',e,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing 'conditions'",78:()=>'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',79:()=>'"filterParams.maxNumConditions" must be greater than or equal to zero.',80:()=>'"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',81:()=>'"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',82:({param:e})=>`DateFilter ${e} is not a number`,83:()=>"DateFilter minValidYear should be <= maxValidYear",84:()=>"DateFilter minValidDate should be <= maxValidDate",85:()=>"DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.",86:()=>"DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.",87:()=>"DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.",88:({index:e})=>`Invalid row index for ensureIndexVisible: ${e}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing getRows method",91:()=>"Filter is missing method doesFilterPass",92:()=>"AnimationFrameService called but animation frames are off",93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:e,pageSizeSet:t,pageSizesSet:r,pageSizeOptions:i})=>`'paginationPageSize=${e}'${t?"":" (default value)"}, but ${e} is not included in${r?"":" the default"} paginationPageSizeSelector=[${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:r,jsComps:i})=>{const s=[],o=Jd({inputValue:t,allSuggestions:[...Object.keys(r??[]).filter(a=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(a)),...Object.keys(i??[]).filter(a=>!!i[a])],hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return s.push(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.\n`),o.length>0&&s.push(` Did you mean: [${o.slice(0,3)}]?\n`),s.push("If using a custom component check it has been registered correctly."),s},102:()=>"selectAll: 'filtered' only works when gridOptions.rowModelType='clientSide'",103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:e,param:t})=>`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`,105:({e})=>["chart rendering failed",e],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${po}/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 r=Jd({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.`,r.length>0?` Did you mean: [${r.slice(0,3)}]?`:"","If using a custom aggregation function check it has been registered correctly."].join("\n")},110:()=>"groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup",111:()=>"Invalid selection state. When `groupSelects` is enabled, the state must conform to `IServerSideGroupSelectionState`.",113:()=>"Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values",114:({component:e})=>`Could not find component with name of ${e}. Is it in Vue.components?`,116:()=>"Invalid selection state. The state must conform to `IServerSideSelectionState`.",117:()=>"selectAll must be of boolean type.",118:()=>"Infinite scrolling must be enabled in order to set the row count.",119:()=>"Unable to instantiate filter",120:()=>"MultiFloatingFilterComp expects MultiFilter as its parent",121:()=>"a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (see AG Grid docs) or b) to toString() on the object to return a key",122:()=>"could not find the document, document is empty",123:()=>"Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.",124:()=>"No active charts to update.",125:({chartId:e})=>`Unable to update chart. No active chart found with ID: ${e}.`,126:()=>"unable to restore chart as no chart model is provided",127:({allRange:e})=>`unable to create chart as ${e?"there are no columns in the grid":"no range is selected"}.`,128:({feature:e})=>`${e} is only available if using 'multiRow' selection mode.`,129:({feature:e,rowModel:t})=>`${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`,130:()=>'cannot multi select unless selection mode is "multiRow"',132:()=>"Row selection features are not available unless `rowSelection` is enabled.",133:({iconName:e})=>`icon '${e}' function should return back a string or a dom object`,134:({iconName:e})=>`Did not find icon '${e}'`,135:()=>"Data type of the new value does not match the cell data type of the column",136:()=>"Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.",137:({type:e,currentChartType:t})=>`Unable to update chart as a '${e}' update type is not permitted on a ${t}.`,138:({chartType:e})=>`invalid chart type supplied: ${e}`,139:({customThemeName:e})=>`a custom chart theme with the name ${e} has been supplied but not added to the 'chartThemes' list`,140:({name:e})=>`no stock theme exists with the name '${e}' and no custom chart theme with that name was supplied to 'customChartThemes'`,141:()=>"cross filtering with row grouping is not supported.",142:()=>"cross filtering is only supported in the client side row model.",143:({panel:e})=>`'${e}' is not a valid Chart Tool Panel name`,144:({type:e})=>`Invalid charts data panel group name supplied: '${e}'`,145:({group:e})=>`As of v32, only one charts customize panel group can be expanded at a time. '${e}' will not be expanded.`,146:({comp:e})=>`Unable to instantiate component '${e}' as its module hasn't been loaded. Add 'ValidationModule' to see which module is required.`,147:({group:e})=>`Invalid charts customize panel group name supplied: '${e}'`,148:({group:e})=>`invalid chartGroupsDef config '${e}'`,149:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,150:()=>"'seriesChartTypes' are required when the 'customCombo' chart type is specified.",151:({chartType:e})=>`invalid chartType '${e}' supplied in 'seriesChartTypes', converting to 'line' instead.`,152:({colId:e})=>`no 'seriesChartType' found for colId = '${e}', defaulting to 'line'.`,153:({chartDataType:e})=>`unexpected chartDataType value '${e}' supplied, instead use 'category', 'series' or 'excluded'`,154:({colId:e})=>`cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: ${e}`,155:({option:e})=>`'${e}' is not a valid Chart Toolbar Option`,156:({panel:e})=>`Invalid panel in chartToolPanelsDef.panels: '${e}'`,157:({unrecognisedGroupIds:e})=>["unable to find group(s) for supplied groupIds:",e],158:()=>"can not expand a column item that does not represent a column group header",159:()=>"Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.",160:()=>"Export cancelled. Export is not allowed as per your configuration.",161:()=>"The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'",162:({id:e,dataType:t})=>`Unrecognized data type for excel export [${e}.dataType=${t}]`,163:({featureName:e})=>`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.\n Please turn off ${e} to enable Excel table exports.`,164:()=>"Unable to add data table to Excel sheet: A table already exists.",165:()=>"Unable to add data table to Excel sheet: Missing required parameters.",166:({unrecognisedGroupIds:e})=>["unable to find groups for these supplied groupIds:",e],167:({unrecognisedColIds:e})=>["unable to find columns for these supplied colIds:",e],168:()=>"detailCellRendererParams.template should be function or string",169:()=>'Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.',170:({providedStrategy:e})=>`invalid cellRendererParams.refreshStrategy = ${e} supplied, defaulting to refreshStrategy = 'rows'.`,171:()=>"could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions",172:()=>"could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData",173:({group:e})=>`invalid chartGroupsDef config '${e}'`,174:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,175:({menuTabName:e,itemsToConsider:t})=>[`Trying to render an invalid menu item '${e}'. Check that your 'menuTabs' contains one of `,t],176:({key:e})=>`unknown menu item type ${e}`,177:()=>"valid values for cellSelection.handle.direction are 'x', 'y' and 'xy'. Default to 'xy'.",178:({colId:e})=>`column ${e} is not visible`,179:()=>"totalValueGetter should be either a function or a string (expression)",180:()=>"agRichSelectCellEditor requires cellEditorParams.values to be set",181:()=>"agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.",182:()=>'you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data',183:()=>"Group Column Filter only works on group columns. Please use a different filter.",184:({parentGroupData:e,childNodeData:t})=>["duplicate group keys for row data, keys should be unique",[e,t]],185:({data:e})=>["getDataPath() should not return an empty path",[e]],186:({rowId:e,rowData:t,duplicateRowsData:r})=>["duplicate group keys for row data, keys should be unique",e,t,...r??[]],187:({rowId:e,firstData:t,secondData:r})=>[`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",r],188:e=>`getRowId callback must be provided for Server Side Row Model ${e?.feature||"selection"} to work correctly.`,189:({startRow:e})=>`invalid value ${e} for startRow, the value should be >= 0`,190:({rowGroupId:e,data:t})=>["null and undefined values are not allowed for server side row model keys",e?`column = ${e}`:"","data is ",t],194:({method:e})=>`calling gridApi.${e}() is only possible when using rowModelType=\`clientSide\`.`,195:({justCurrentPage:e})=>`selecting just ${e?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`,196:({key:e})=>`Provided ids must be of string type. Invalid id provided: ${e}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:Am,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 ${po}/filter-set-filter-list/#filter-value-types`,210:()=>"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?",211:()=>"property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.",212:()=>"please review all your toolPanel components, it seems like at least one of them doesn't have an id",213:()=>"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",214:({key:e})=>`unable to lookup Tool Panel as invalid key supplied: ${e}`,215:({key:e,defaultByKey:t})=>`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(t??{}).join(",")}`,216:({name:e})=>`Missing component for '${e}'`,217:({invalidColIds:e})=>["unable to find grid columns for the supplied colDef(s):",e],218:({property:e,defaultOffset:t})=>`${e} must be a number, the value you provided is not a valid number. Using the default of ${t}px.`,219:({property:e})=>`Property ${e} does not exist on the target object.`,220:({lineDash:e})=>`'${e}' is not a valid 'lineDash' option.`,221:()=>"agAggregationComponent should only be used with the client and server side row model.",222:()=>"agFilteredRowCountComponent should only be used with the client side row model.",223:()=>"agSelectedRowCountComponent should only be used with the client and server side row model.",224:()=>"agTotalAndFilteredRowCountComponent should only be used with the client side row model.",225:()=>"agTotalRowCountComponent should only be used with the client side row model.",226:()=>"viewport is missing init method.",227:()=>"menu item icon must be DOM node or string",228:({menuItemOrString:e})=>`unrecognised menu item ${e}`,229:({index:e})=>["invalid row index for ensureIndexVisible: ",e],230:()=>"detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/",231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",232:()=>"Using both rowData and v-model. rowData will be ignored.",233:({methodName:e})=>`Framework component is missing the method ${e}()`,234:()=>'Group Column Filter does not work with the colDef property "field". This property will be ignored.',235:()=>'Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.',236:()=>'Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.',237:()=>"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",238:()=>"setRowCount can only accept a positive row count.",239:()=>'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',240:({theme:e})=>`theme grid option must be a Theming API theme object or the string "legacy", received: ${e}`,243:()=>"Failed to deserialize state - each provided state object must be an object.",244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>"Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule. \nPlease rebuild the selection state and reapply it.",248:()=>"SetFloatingFilter expects SetFilter as its parent",249:()=>"Must supply a Value Formatter in Set Filter params when using a Key Creator",250:()=>"Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",251:({chartType:e})=>`AG Grid: Unable to create chart as an invalid chartType = '${e}' was supplied.`,252:()=>"cannot get grid to draw rows when it is in the middle of drawing rows. \nYour code probably called a grid API method while the grid was in the render stage. \nTo overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0). \nTo see what part of your code that caused the refresh check this stacktrace.",253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e?.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>Mm("IntegratedChartsModule"),258:()=>Mm("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:r,gridId:i,rowModelType:s})=>Am({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:Ao[t],gridId:i,gridScoped:r,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 ${po}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>'As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.',267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>"Transactions aren't supported with tree data when using treeDataChildrenField",269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",270:({id:e,parentId:t})=>`Cycle detected for row with id='${e}' and parent id='${t}'. Resetting the parent for row with id='${e}' and showing it as a root-level node.`,271:({id:e,parentId:t})=>`Parent row not found for row with id='${e}' and parent id='${t}'. Showing row with id='${e}' as a root-level node.`,272:()=>"No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:\n \n import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community';\n \n ModuleRegistry.registerModules([ AllCommunityModule ]);\n ",273:({providedId:e,usedId:t})=>`Provided column id '${e}' was already in use, ensure all column and group ids are unique. Using '${t}' instead.`,274:({prop:e})=>{let t=`Since v33, ${e} has been deprecated.`;switch(e){case"maxComponentCreationTimeMs":t+=" This property is no longer required and so will be removed in a future version.";break;case"setGridApi":t+=" This method is not called by AG Grid. To access the GridApi see: https://ag-grid.com/react-data-grid/grid-interface/#grid-api ";break;case"children":t+=" For multiple versions AgGridReact does not support children."}return t},275:Dm,276:()=>"Row Numbers Row Resizer cannot be used when Grid Columns have `autoHeight` enabled.",277:({colId:e})=>`'enableFilterHandlers' is set to true, but column '${e}' does not have 'filter.doesFilterPass' or 'filter.handler' set.`,278:({colId:e})=>`Unable to create filter handler for column '${e}'`,279:e=>{},280:({colId:e})=>`'name' must be provided for custom filter components for column '${e}`,281:({colId:e})=>`Filter for column '${e}' does not have 'filterParams.buttons', but the new Filters Tool Panel has buttons configured. Either configure buttons for the filter, or disable buttons on the Filters Tool Panel.`,282:()=>"New filter tool panel requires `enableFilterHandlers: true`.",283:()=>"As of v34, use the same method on the filter handler (`api.getColumnFilterHandler(colKey)`) instead.",284:()=>"As of v34, filters are active when they have a model. Use `api.getColumnFilterModel()` instead.",285:()=>"As of v34, use (`api.getColumnFilterModel()`) instead.",286:()=>"As of v34, use (`api.setColumnFilterModel()`) instead.",287:()=>"`api.doFilterAction()` requires `enableFilterHandlers = true",288:()=>"`api.getColumnFilterModel(key, true)` requires `enableFilterHandlers = true",289:({rowModelType:e})=>`Row Model '${e}' is not supported with Batch Editing`,290:({rowIndex:e,rowPinned:t})=>`Row with index '${e}' and pinned state '${t}' not found`,291:()=>"License Key being set multiple times with different values. This can result in an incorrect license key being used,",292:({colId:e})=>`The Multi Filter for column '${e}' has buttons configured against the child filters. When 'enableFilterHandlers=true', buttons must instead be provided against the parent Multi Filter params. The child filter buttons will be ignored.`};function pP(e,t){const r=gP[e];if(!r)return[`Missing error text for error id ${e}!`];const i=r(t),n=`\nSee ${Dg(e,t)}`;return Array.isArray(i)?i.concat(n):[i,n]}var mP={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},uh=new WeakMap,hh=new WeakMap,CP=1,wP=class{create(e,t,r,i,s,n){const o=da.applyGlobalGridOptions(t),a=o.gridId??String(CP++),l=this.getRegisteredModules(s,a,o.rowModelType),c=this.createBeansList(o.rowModelType,l,a),d=this.createProvidedBeans(e,o,s);if(!c)return;const h={providedBeanInstances:d,beanClasses:c,id:a,beanInitComparator:F3,beanDestroyComparator:R3,derivedBeans:[y3],destroyCallback:()=>{hh.delete(p),uh.delete(e),function Tx(e){delete Fn[e]}(a),n?.()}},f=new rb(h);this.registerModuleFeatures(f,l),r(f),f.getBean("syncSvc").start(),i?.(f);const p=f.getBean("gridApi");return uh.set(e,p),hh.set(p,e),p}getRegisteredModules(e,t,r){return ua(aP,void 0,!0),e?.modules?.forEach(i=>ua(i,t)),function Px(e,t){const r=Fn[e]??{};return[...Object.values(kl.all??{}),...Object.values(r.all??{}),...Object.values(kl[t]??{}),...Object.values(r[t]??{})]}(t,Im(r))}registerModuleFeatures(e,t){const r=e.getBean("registry"),i=e.getBean("apiFunctionSvc");for(const s of t){r.registerModule(s);const n=s.apiFunctions;if(n){const o=Object.keys(n);for(const a of o)i?.addFunction(a,n[a])}}}createProvidedBeans(e,t,r){let i=r?r.frameworkOverrides:null;pt(i)&&(i=new T0);const s={gridOptions:t,eGridDiv:e,eRootDiv:e,globalListener:r?r.globalListener:null,globalSyncListener:r?r.globalSyncListener:null,frameworkOverrides:i};return r?.providedBeanInstances&&Object.assign(s,r.providedBeanInstances),s}createBeansList(e,t,r){const i={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},s=Im(e),n=i[s];if(!n)return void ha(201,{rowModelType:s},`Unknown rowModelType ${s}.`);if(!function Ax(){return Sg}())return void ha(272,void 0,"No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:\n \n import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community';\n \n ModuleRegistry.registerModules([ AllCommunityModule ]);\n ");if(!e){const a=Object.entries(i).filter(([l,c])=>Fd(c,r,l));if(1==a.length){const[l,c]=a[0];if(l!==s){const d={moduleName:c,rowModelType:l};return void ha(275,d,Dm(d))}}}if(!Fd(n,r,s))return void ha(200,{reasonOrId:`rowModelType = '${s}'`,moduleName:n,gridScoped:Rd(),gridId:r,rowModelType:s},`Missing module ${n}Module for rowModelType ${s}.`);const o=new Set;for(const a of t)for(const l of a.beans??[])o.add(l);return Array.from(o)}};function Im(e){return e??"clientSide"}function sn(e){const t=e.rowModel;return"clientSide"===t.getType()?t:void 0}function Sc(e){const t=e.rowModel;return"infinite"===t.getType()?t:void 0}function fh(e){return e.filter(t=>null!=t)}var yP=class{wrap(e,t,r,i){const s=this.createWrapper(e,i);for(const n of t??[])this.createMethod(s,n,!0);for(const n of r??[])this.createMethod(s,n,!1);return s}createMethod(e,t,r){e.addMethod(t,this.createMethodProxy(e,t,r))}createMethodProxy(e,t,r){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(r&&ne(49,{methodName:t}),null)}}};function bc(e){return"whenTruncated"===e.get("tooltipShowMode")}var FP=class extends Q{getFileName(e){const t=this.getDefaultFileExtension();return e?.length||(e=this.getDefaultFileName()),e.includes(".")?e:`${e}.${t}`}getData(e){const t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},RP=class{constructor(e){const{colModel:t,rowGroupColsSvc:r,colNames:i,valueSvc:s,gos:n,processCellCallback:o,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:c}=e;this.colModel=t,this.rowGroupColsSvc=r,this.colNames=i,this.valueSvc=s,this.gos=n,this.processCellCallback=o,this.processHeaderCallback=a,this.processGroupHeaderCallback=l,this.processRowGroupCallback=c}prepare(e){}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e,t,r,i,s){const n=0===t&&Ng(this.gos,s,this.colModel.isPivotMode());if(this.processRowGroupCallback&&(this.gos.get("treeData")||s.group)&&(e.isRowGroupDisplayed(s.rowGroupColumn?.getColId()??"")||n))return{value:this.processRowGroupCallback(_e(this.gos,{column:e,node:s}))??""};if(this.processCellCallback)return{value:this.processCellCallback(_e(this.gos,{accumulatedRowIndex:r,column:e,node:s,value:this.valueSvc.getValueForDisplay(e,s,void 0,void 0).value,type:i,parseValue:h=>this.valueSvc.parseValue(e,s,h,this.valueSvc.getValue(e,s,void 0)),formatValue:h=>this.valueSvc.formatValue(e,s,h)??h}))??""};const o=this.gos.get("treeData"),a=this.valueSvc;if((-1!==s.level||!s.footer)&&(n||!0===e.colDef.showRowGroup&&(s.group||o))){let h="",f=s;for(;f&&-1!==f.level;){const{value:p,valueFormatted:g}=a.getValueForDisplay(n?void 0:e,f,!0,!0);h=` -> ${g??p??""}${h}`,f=f.parent}return{value:h,valueFormatted:h}}const{value:d,valueFormatted:u}=a.getValueForDisplay(e,s,!0,!0);return{value:d??"",valueFormatted:u}}getHeaderName(e,t){return e?e(_e(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}},TP={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},oi="clientSide",Nr="serverSide",Lo="infinite",PP={onGroupExpandedOrCollapsed:[oi],refreshClientSideRowModel:[oi],isRowDataEmpty:[oi],forEachLeafNode:[oi],forEachNodeAfterFilter:[oi],forEachNodeAfterFilterAndSort:[oi],resetRowHeights:[oi,Nr],applyTransaction:[oi],applyTransactionAsync:[oi],flushAsyncTransactions:[oi],getBestCostNodeSelection:[oi],getServerSideSelectionState:[Nr],setServerSideSelectionState:[Nr],applyServerSideTransaction:[Nr],applyServerSideTransactionAsync:[Nr],applyServerSideRowData:[Nr],retryServerSideLoads:[Nr],flushServerSideAsyncTransactions:[Nr],refreshServerSide:[Nr],getServerSideGroupLevelState:[Nr],refreshInfiniteCache:[Lo],purgeInfiniteCache:[Lo],getInfiniteRowCount:[Lo],isLastRowIndexKnown:[Lo,Nr],expandAll:[oi,Nr],collapseAll:[oi,Nr],onRowHeightChanged:[oi,Nr],setRowCount:[Lo,Nr],getCacheBlockState:[Lo,Nr]},DP={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")'}},MP={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",tooltipFeature:"Tooltip",highlightTooltipFeature:"Tooltip",tooltipStateManager:"Tooltip",groupStrategy:"RowGrouping",treeGroupStrategy:"TreeData",rowNumberRowResizer:"RowNumbers",singleCell:"EditCore",fullRow:"EditCore",agSetColumnFilterHandler:"SetFilter",agMultiColumnFilterHandler:"MultiFilter",agGroupColumnFilterHandler:"GroupFilter",agNumberColumnFilterHandler:"NumberFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},IP={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},_P={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"},LP=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),NP=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),HP={moduleName:"Validation",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,function Mx(e){Tg=e}(pP)}warnOnInitialPropertyUpdate(e,t){"api"===e&&TP[t]&&ne(22,{key:t})}processGridOptions(e){this.processOptions(e,{objectName:"gridOptions",allProperties:[...Sk,...xk,...wk,...dm,...yk,...hm,...um,...bk,...Object.values(eh)],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:{suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."},suppressAdvancedFilterEval:{version:"34",message:"Advanced filter no longer uses function evaluation, so this option has no effect."}},validations:kk()})}validateApiFunction(e,t){return function AP(e,t,r){const i=DP[e];if(i){const{version:n,new:o,old:a,message:l}=i,c=a??e;return(...d)=>(fo(`Since ${n} api.${c} is deprecated. ${o?`Please use ${o} instead. `:""}${l??""}`),t.apply(t,d))}const s=PP[e];return s?(...n)=>{const o=r.rowModel.getType();if(s.includes(o))return t.apply(t,n);go(`api.${e} can only be called when gridOptions.rowModelType is ${s.join(" or ")}`)}:t}(e,t,this.beans)}missingUserComponent(e,t,r,i){const s=Ao[t];s?this.gos.assertModuleRegistered(s,`AG Grid '${e}' component: ${t}`):ne(101,{propertyName:e,componentName:t,agGridDefaults:r,jsComps:i})}missingDynamicBean(e){const t=MP[e];return t?ts(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){NP.has(e)&&ne(10,{eventType:e})}validateIcon(e){if(LP.has(e)&&ne(43,{iconName:e}),IP[e])return;const t=_P[e];t?Ct(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:Rd(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."}):ne(134,{iconName:e})}isProvidedUserComp(e){return!!Ao[e]}validateColDef(e){this.processOptions(e,{objectName:"colDef",allProperties:Object.keys(mk),docsUrl:"column-properties/",deprecations:{checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."},rowGroupingHierarchy:{version:"34.3",message:"Use `colDef.groupHierarchy` instead."}},validations:{autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(t,{paginationAutoPageSize:r})=>r?"colDef.autoHeight is not supported with paginationAutoPageSize.":null},cellRendererParams:{validate:t=>null==t.rowGroup&&null==t.rowGroupIndex&&"agGroupCellRenderer"!==t.cellRenderer||!("checkbox"in t.cellRendererParams)?null:'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.'},flex:{validate:(t,r)=>r.autoSizeStrategy?"colDef.flex is not supported with gridOptions.autoSizeStrategy":null},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(t,{rowSelection:r})=>"multiple"===r?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:r})=>"multiple"===r?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:r})=>"multiple"===r?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:t=>{const r=t.headerValueGetter;return"function"==typeof r||"string"==typeof r?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:t})=>{if(t){if(t.smallDown)return ts(262);if(t.smallLeft)return ts(263);if(t.smallRight)return ts(264)}return null}},sortingOrder:{validate:t=>{const r=t.sortingOrder;if(Array.isArray(r)&&r.length>0){const i=r.filter(s=>!Ia.includes(s));if(i.length>0)return`sortingOrder must be an array with elements from [${Ia.map(Dl).join()}], currently it includes [${i.map(Dl).join()}]`}else if(!Array.isArray(r)||r.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${r}`;return null}},type:{validate:t=>{const r=t.type;return r instanceof Array?r.some(s=>"string"!=typeof s)?"if colDef.type is supplied an array it should be of type 'string[]'":null:"string"==typeof r?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(t,{suppressRowTransform:r})=>r?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:r,cellSelection:i,suppressRowTransform:s,enableCellSpan:n,rowDragEntireRow:o,enableCellTextSelection:a})=>"object"==typeof r&&"singleRow"===r?.mode&&r?.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?o?"colDef.spanRows is not supported with rowDragEntireRow.":a?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."},groupHierarchy:{validate(t,{groupHierarchyConfig:r={}},i){const s=new Set(["year","quarter","month","formattedMonth","day","hour","minute","second"]),n=[];for(const o of t.groupHierarchy??[])"object"!=typeof o?!s.has(o)&&!(o in r)&&n.push(cm(o)):i.validation?.validateColDef(o);return n.length>0?`The following parts of colDef.groupHierarchy are not recognised: ${n.join(", ")}.\nChoose one of ${[...s].map(cm).join(", ")}, or define your own parts in gridOptions.groupHierarchyConfig.`:null}}}})}processOptions(e,t){const{validations:r,deprecations:i,allProperties:s,propertyExceptions:n,objectName:o,docsUrl:a}=t;s&&!0!==this.gridOptions.suppressPropertyNamesCheck&&this.checkProperties(e,[...n??[],...Object.keys(i)],s,o,a);const l=new Set;if(Object.keys(e).forEach(d=>{const u=i[d];if(u){const{message:w,version:C}=u;l.add(`As of v${C}, ${String(d)} is deprecated. ${w??""}`)}const h=e[d];if(null==h||!1===h)return;const f=r[d];if(!f)return;const{dependencies:p,validate:g,supportedRowModels:m,expectedType:v}=f;if(v){const w=typeof h;if(w!==v)return void l.add(`${String(d)} should be of type '${v}' but received '${w}' (${h}).`)}if(m){const w=this.gridOptions.rowModelType??"clientSide";if(!m.includes(w))return void l.add(`${String(d)} is not supported with the '${w}' row model. It is only valid with: ${m.join(", ")}.`)}if(p){const w=this.checkForRequiredDependencies(d,p,e);if(w)return void l.add(w)}if(g){const w=g(e,this.gridOptions,this.beans);if(w)return void l.add(w)}}),l.size>0)for(const d of l)fo(d)}checkForRequiredDependencies(e,t,r){const s=Object.entries(t).filter(([n,o])=>!o.required.includes(r[n]));return 0===s.length?null:s.map(([n,o])=>`'${String(e)}' requires '${n}' to be one of [${o.required.map(a=>null===a?"null":void 0===a?"undefined":a).join(", ")}]. ${o.reason??""}`).join("\n ")}checkProperties(e,t,r,i,s){const o=function BP(e,t,r){const i={},s=e.filter(n=>!t.some(o=>o===n));if(s.length>0)for(const n of s)i[n]=Jd({inputValue:n,allSuggestions:r}).values;return i}(Object.getOwnPropertyNames(e),["__ob__","__v_skip","__metadata__",...t,...r],r),a=Object.keys(o);for(const l of a){let d=`invalid ${i} property '${l}' did you mean any of these: ${o[l].slice(0,8).join(", ")}.`;r.includes("context")&&(d+=`\nIf you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),fo(d)}a.length>0&&s&&fo(`to see all the valid ${i} properties please check: ${this.beans.frameworkOverrides.getDocLink(s)}`)}}]};function Lm(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter)}var UP={moduleName:"SharedMenu",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){this.showColumnMenuCommon(v0(this.beans),e,e.containerType,!0)}showHeaderContextMenu(e,t,r){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,r)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}hideFilterMenu(){v0(this.beans)?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(fi(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&js(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&"new"===this.gos.get("columnMenu")}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(Pn()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!fi(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!(!this.beans.filterManager?.isFilterAllowed(e)||fi(this.gos)||this.isFilterMenuInHeaderEnabled(e)||this.isFloatingFilterButtonDisplayed(e))}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos,t=e.get("suppressMenuHide");return fi(e)?!!e.exists("suppressMenuHide")&&t:t}showColumnMenuCommon(e,t,r,i){const{positionBy:s,onClosedCallback:n}=t,o=t.column;if("button"===s){const{buttonElement:a}=t;e?.showMenuAfterButtonClick(o,a,r,n,i)}else if("mouse"===s){const{mouseEvent:a}=t;e?.showMenuAfterMouseEvent(o,a,r,n,i)}else if(o){const a=this.beans,l=a.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(o,"auto"),ws(a,()=>{const c=l.getHeaderRowContainerCtrl(o.getPinned())?.getHeaderCtrlForColumn(o);c&&e?.showMenuAfterButtonClick(o,c.getAnchorElementForMenu(i),r,n,i)})}}}],apiFunctions:{showColumnMenu:function zP(e,t){const r=e.colModel.getCol(t);r?e.menuSvc?.showColumnMenu({column:r,positionBy:"auto"}):Ct(12,{colKey:t})},hidePopupMenu:function WP(e){e.menuSvc?.hidePopupMenu()}}},yc={moduleName:"Popup",version:he,beans:[class extends hb{postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getDefaultPopupParent(){return this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:r,event:i}=e,s=t.getBoundingClientRect(),n=this.getParentRect();this.setAlignedTo(t,r);let o=!1;this.positionPopup({ePopup:r,keepWithinBounds:!0,updatePosition:()=>{const l=this.keepXYWithinBounds(r,s.top-n.top,0),c=r.clientWidth>0?r.clientWidth:200;o||(r.style.minWidth=`${c}px`,o=!0);const u=n.right-n.left-c;let h;return this.gos.get("enableRtl")?(h=p(),h<0&&(h=f(),this.setAlignedStyles(r,"left")),h>u&&(h=0,this.setAlignedStyles(r,"right"))):(h=f(),h>u&&(h=p(),this.setAlignedStyles(r,"right")),h<0&&(h=0,this.setAlignedStyles(r,"left"))),{x:h,y:l};function f(){return s.right-n.left-2}function p(){return s.left-n.left-c}},postProcessCallback:()=>this.callPostProcessPopup(e,"subMenu",r,t,i instanceof MouseEvent?i:void 0)})}callPostProcessPopup(e,t,r,i,s){const n=this.gos.getCallback("postProcessPopup");if(n){const{column:o,rowNode:a}=e;n({column:o,rowNode:a,ePopup:r,type:t,eventSource:i,mouseEvent:s})}}getActivePopups(){return this.popupList.map(e=>e.element)}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const r of this.popupList)t.applyThemeClasses(r.wrapper)}}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return Fs(e)}}]},sD={filterHandler:()=>({doesFilterPass:()=>!0})},uD={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},gh=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){const r=e.filterOptions??t;this.filterOptions!==r&&(this.filterOptions=r,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){const{filterOptions:e}=this;if(e)for(const t of e)"string"!=typeof t&&([["displayKey"],["displayName"],["predicate","test"]].every(s=>!!s.some(n=>null!=t[n])||(ne(72,{keys:s}),!1))?this.customFilterOptions[t.displayKey]=t:this.filterOptions=e.filter(s=>s===t)||[])}getDefaultItem(e){const{filterOptions:t}=this;if(e)return e;if(t.length>=1){const r=t[0];if("string"==typeof r)return r;if(r.displayKey)return r.displayKey;ne(73)}else ne(74)}getCustomOption(e){return this.customFilterOptions[e]}};function La(e,t,r){return null==r?e.splice(t):e.splice(t,r)}function Ec(e){return null==e||"string"==typeof e&&0===e.trim().length}function Oa(e,t){const r=t.getCustomOption(e);if(r){const{numberOfInputs:s}=r;return s??1}return e&&["empty","notBlank","blank"].indexOf(e)>=0?0:"inRange"===e?2:1}var ph=class extends Gb{constructor(e,t,r){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=r,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}setParams(e){super.setParams(e);const t=new gh;this.optionsFactory=t,t.init(e,this.defaultOptions),this.commonUpdateSimpleParams(e),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(e,t){this.optionsFactory.refresh(e,this.defaultOptions),super.updateParams(e,t),this.commonUpdateSimpleParams(e)}commonUpdateSimpleParams(e){this.setNumConditions(e),this.defaultJoinOperator=function fD(e){return"AND"===e||"OR"===e?e:"AND"}(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions();const t=this.getGui();this.isReadOnly()?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,r)=>{t.setValue(0===r?e:this.optionsFactory.defaultOption,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return 0===e.length?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){const{eJoinOrs:e,defaultJoinOperator:t}=this;return 0===e.length?t:!0===e[0].getValue()?"OR":"AND"}areNonNullModelsEqual(e,t){const r=!e.operator,i=!t.operator;if(!r&&i||r&&!i)return!1;let n;return n=r?this.areSimpleModelsEqual(e,t):e.operator===t.operator&&qs(e.conditions,t.conditions,(l,c)=>this.areSimpleModelsEqual(l,c)),n}setModelIntoUi(e,t){if(null==e)return this.resetUiToDefaults(t),$t.resolve();if(e.operator){const i=e;let s=i.conditions;null==s&&(s=[],ne(77));const n=function pD(e,t){let r=e.length;return r>t&&(e.splice(t),ne(78),r=t),r}(s,this.maxNumConditions),o=this.getNumConditions();if(n<o)this.removeConditionsAndOperators(n);else if(n>o)for(let l=o;l<n;l++)this.createJoinOperatorPanel(),this.createOption();const a="OR"===i.operator;this.eJoinAnds.forEach(l=>l.setValue(!a,!0)),this.eJoinOrs.forEach(l=>l.setValue(a,!0)),s.forEach((l,c)=>{this.eTypes[c].setValue(l.type,!0),this.setConditionIntoUi(l,c)})}else{const i=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(i.type,!0),this.setConditionIntoUi(i,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),$t.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(ne(79),t=1),this.maxNumConditions=t;let r=e.numAlwaysVisibleConditions??1;r<1&&(ne(80),r=1),r>t&&(ne(81),r=t),this.numAlwaysVisibleConditions=r}createOption(){const e=this.getGui(),t=this.createManagedBean(new ru);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const r=this.createEValue();this.eConditionBodies.push(r),e.appendChild(r),this.putOptionsIntoDropdown(t),this.resetType(t);const i=this.getNumConditions()-1;this.forEachPositionInput(i,s=>this.resetInput(s)),this.addChangedListeners(t,i)}createJoinOperatorPanel(){const e=nr({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),r=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const i=this.eJoinPanels.length-1,s=this.joinOperatorId++;this.resetJoinOperatorAnd(t,i,s),this.resetJoinOperatorOr(r,i,s),this.isReadOnly()||(t.onValueChange(this.listener),r.onValueChange(this.listener))}createJoinOperator(e,t,r){const i=this.createManagedBean(new p2);e.push(i);const s="ag-filter-condition-operator";return i.addCss(s),i.addCss(`${s}-${r}`),t.appendChild(i.getGui()),i}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>"string"==typeof e?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const r of t)e.addOption(r);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,r=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:r?this.getLocaleTextFunc()(r.displayKey,r.displayName):this.translate(t)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let r=0;r<this.getNumConditions();r++)this.isConditionUiComplete(r)?e=r:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const r=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<r){this.removeConditionsAndOperators(r+1);const i=e+1,s=r-i;s>0&&this.removeConditionsAndOperators(i,s),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((i,s)=>{const n=this.isConditionDisabled(s,e);i.setDisabled(n||this.filterListOptions.length<=1),1===s&&(di(this.eJoinPanels[0],n),this.eJoinAnds[0].setDisabled(n),this.eJoinOrs[0].setDisabled(n))}),this.eConditionBodies.forEach((i,s)=>{at(i,this.isConditionBodyVisible(s))});const r="OR"===(t??this.getJoinOperator());for(const i of this.eJoinAnds)i.setValue(!r,!0);for(const i of this.eJoinOrs)i.setValue(r,!0);this.forEachInput((i,s,n,o)=>{this.setElementDisplayed(i,s<o),this.setElementDisabled(i,this.isConditionDisabled(n,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:r,eConditionBodies:i,eJoinPanels:s,eJoinAnds:n,eJoinOrs:o}=this;this.removeComponents(r,e,t),this.removeElements(i,e,t),this.removeEValues(e,t);const a=Math.max(e-1,0);this.removeElements(s,a,t),this.removeComponents(n,a,t),this.removeComponents(o,a,t)}removeElements(e,t,r){const i=La(e,t,r);for(const s of i)vr(s)}removeComponents(e,t,r){const i=La(e,t,r);for(const s of i)vr(s.getGui()),this.destroyBean(s)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let t;if(!this.isReadOnly()){const r=this.getInputs(0)[0];t=r instanceof Mn&&this.isConditionBodyVisible(0)?r.getInputElement():this.eTypes[0]?.getFocusableElement()}(t??this.getGui()).focus({preventScroll:!0})}}afterGuiDetached(){super.afterGuiDetached();const e=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(e.column))return;e.onStateChange({model:e.model});let t=-1,r=-1,i=!1;const s=this.getJoinOperator();for(let o=this.getNumConditions()-1;o>=0;o--)if(this.isConditionUiComplete(o))-1===t&&(t=o,r=o);else{const l=o<t;(o>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(o-1)||l)&&(this.removeConditionsAndOperators(o,1),i=!0,l&&r--)}let n=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),n=!0),this.shouldAddNewConditionAtEnd(r===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),n=!0),n&&this.updateConditionStatusesAndValues(r,s),i&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=r}getModelAsString(e){return this.params.getHandler()?.getModelAsString?.(e)??""}getPlaceholderText(e,t){let r=this.translate(e);if("function"==typeof this.filterPlaceholder){const i=this.eTypes[t].getValue(),s=this.translate(i);r=this.filterPlaceholder({filterOptionKey:i,filterOption:s,placeholder:r})}else"string"==typeof this.filterPlaceholder&&(r=this.filterPlaceholder);return r}resetPlaceholder(){const e=this.getLocaleTextFunc();this.forEachInput((t,r,i,s)=>{if(!(t instanceof Mn))return;const n=0===r&&s>1?"inRangeStart":0===r?"filterOoo":"inRangeEnd",o=0===r&&s>1?e("ariaFilterFromValue","Filter from value"):0===r?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value");t.setInputPlaceholder(this.getPlaceholderText(n,i)),t.setInputAriaLabel(o)})}setElementValue(e,t,r){e instanceof Mn&&e.setValue(null!=t?String(t):null,!0)}setElementDisplayed(e,t){ap(e)&&at(e.getGui(),t)}setElementDisabled(e,t){ap(e)&&di(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Mn&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,r)=>{this.forEachPositionTypeInput(r,t,e)})}forEachPositionInput(e,t){const r=this.getConditionType(e);this.forEachPositionTypeInput(e,r,t)}forEachPositionTypeInput(e,t,r){const i=Oa(t,this.optionsFactory),s=this.getInputs(e);for(let n=0;n<s.length;n++){const o=s[n];null!=o&&r(o,n,e,i)}}isConditionDisabled(e,t){return!!this.isReadOnly()||0!==e&&e>t+1}isConditionBodyVisible(e){return Oa(this.getConditionType(e),this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||"empty"===this.getConditionType(e)||this.getValues(e).some(r=>null==r))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinAnds.forEach((t,r)=>this.resetJoinOperatorAnd(t,r,this.joinOperatorId+r)),this.eJoinOrs.forEach((t,r)=>this.resetJoinOperatorOr(t,r,this.joinOperatorId+r)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){const r=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(r).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,r){this.resetJoinOperator(e,t,"AND"===this.defaultJoinOperator,this.translate("andCondition"),r)}resetJoinOperatorOr(e,t,r){this.resetJoinOperator(e,t,"OR"===this.defaultJoinOperator,this.translate("orCondition"),r)}resetJoinOperator(e,t,r,i,s){this.updateJoinOperatorDisabled(e.setValue(r,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${s}`).setLabel(i),t)}updateJoinOperatorsDisabled(){const e=(t,r)=>this.updateJoinOperatorDisabled(t,r);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const r=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((i,s,n)=>{n===t&&this.setElementValue(i,null!=r[s]?r[s]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,r,i)=>{this.setElementValue(t,0===r&&0===i?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,r=>{this.attachElementOnChange(r,this.listener)}))}hasInvalidInputs(){return!1}isReadOnly(){return!!this.params.readOnly}},Om=class{constructor(e,t,r,i,s,n){this.alive=!0,this.context=e,this.eParent=s;const o=function YS(e,t,r){return e.getCompDetails(t,SS,"agDateInput",r,!0)}(t,r,i);o&&o.newAgStackInstance().then(a=>{if(!this.alive)return void e.destroyBean(a);if(this.dateComp=a,!a)return;s.appendChild(a.getGui()),a?.afterGuiAttached?.();const{tempValue:l,disabled:c}=this;l&&a.setDate(l),null!=c&&a.setDisabled?.(c),n?.(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){const t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){const t=this.dateComp;t?t.setDisabled?.(e):this.disabled=e}setDisplayed(e){at(this.eParent,e)}setInputPlaceholder(e){this.dateComp?.setInputPlaceholder?.(e)}setInputAriaLabel(e){this.dateComp?.setInputAriaLabel?.(e)}afterGuiAttached(e){this.dateComp?.afterGuiAttached?.(e)}updateParams(e){this.dateComp?.refresh?.(e)}},mh=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function Bm(e,t){const{dateFrom:r,dateTo:i,type:s}=e||{};return[r&&ni(r,void 0,!0)||null,i&&ni(i,void 0,!0)||null].slice(0,Oa(s,t))}var Hm=1/0,Gm=class extends Q{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,r=new gh;this.optionsFactory=r,r.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(r,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if("colDef"===e.source){const t=e.filterParams,r=this.optionsFactory;r.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:r,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(null==t)return!0;const{operator:r}=t,i=[];r?i.push(...t.conditions??[]):i.push(t);const s=r&&"OR"===r?"some":"every",n=this.params.getValue(e.node);return i[s](o=>this.individualConditionPasses(e,o,n))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:r,maxNumConditions:i}}=e;if(null==t)return;let n=Qp(t)?t.conditions:[t];const o=r?.map(d=>"string"==typeof d?d:d.displayKey)??this.defaultOptions;if(n&&!n.every(d=>void 0!==o.find(u=>u===d.type)))return this.params={...e,model:null},void e.onModelChange(null);let l=!1;const c=this.filterType;if((n&&!n.every(d=>d.filterType===c)||t.filterType!==c)&&(n=n.map(d=>({...d,filterType:c})),l=!0),"number"==typeof i&&n&&n.length>i&&(n=n.slice(0,i),l=!0),l){const d=n.length>1?{...t,filterType:c,conditions:n}:{...n[0],filterType:c};this.params={...e,model:d},e.onModelChange(d)}}individualConditionPasses(e,t,r){const i=this.optionsFactory,s=this.mapValuesFromModel(t,i),o=function gD(e,t,r){if(null==e)return;const{predicate:i}=e;return null==i||t.some(s=>null==s)?void 0:i(t,r)}(i.getCustomOption(t.type),s,r);return o??(null==r?this.evaluateNullValue(t.type):this.evaluateNonNullValue(s,r,t,e))}},Vm=class extends Gm{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:r,includeBlanksInGreaterThan:i,includeBlanksInLessThan:s,includeBlanksInRange:n}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(r)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(i)return!0;break;case"lessThan":case"lessThanOrEqual":if(s)return!0;break;case"inRange":if(n)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,r){const i=r.type;if(!this.isValid(t))return"notEqual"===i||"notBlank"===i;const s=this.comparator(),n=null!=e[0]?s(e[0],t):0;switch(i){case"equals":return 0===n;case"notEqual":return 0!==n;case"greaterThan":return n>0;case"greaterThanOrEqual":return n>=0;case"lessThan":return n<0;case"lessThanOrEqual":return n<=0;case"inRange":{const o=s(e[1],t);return this.params.filterParams.inRangeInclusive?n>=0&&o<=0:n>0&&o<0}case"blank":return Ec(t);case"notBlank":return!Ec(t);default:return ne(76,{filterModelType:i}),!0}}},zm={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},vD={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},vh=class extends Q{constructor(e,t,r){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=r}getModelAsString(e,t){const r=this.getLocaleTextFunc(),i="filterToolPanel"===t;if(!e)return i?en(this,"filterSummaryInactive"):null;if(null!=e.operator){const n=e;return(n.conditions??[]).map(c=>this.getModelAsString(c,t)).join(` ${en(this,"AND"===n.operator?"andCondition":"orCondition")} `)}if("blank"===e.type||"notBlank"===e.type)return i?en(this,"blank"===e.type?"filterSummaryBlank":"filterSummaryNotBlank"):r(e.type,e.type);{const n=e,o=this.optionsFactory.getCustomOption(n.type),{displayKey:a,displayName:l,numberOfInputs:c}=o||{};return a&&l&&0===c?r(a,l):this.conditionToString(n,i,"inRange"===n.type||2===c,a,l)}}updateParams(e){const{optionsFactory:t,filterParams:r}=e;this.optionsFactory=t,this.filterParams=r}conditionForToolPanel(e,t,r,i,s,n){let o;const a=this.getTypeKey(e);return a&&(o=en(this,a)),s&&n&&(o=this.getLocaleTextFunc()(s,n)),null!=o?t?`${o} ${en(this,"filterSummaryInRangeValues",[r(),i()])}`:`${o} ${r()}`:null}getTypeKey(e){const t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){const t=this.valueFormatter;return t?t(e??null)??"":String(e)}},Wm=class extends vh{constructor(e,t){super(e,t,r=>{const{dataTypeSvc:i,valueSvc:s}=this.beans,n=t.column,o=i?.getDateFormatterFunction(n),a=o?o(r??void 0):r;return s.formatValue(n,null,a)}),this.filterTypeKeys=zm}conditionToString(e,t,r,i,s){const{type:n}=e,o=ni(e.dateFrom),a=ni(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,c=t?this.formatValue.bind(this):h=>Qd(h,l),d=()=>null!==o?c(o):"null",u=()=>null!==a?c(a):"null";if(t){const h=this.conditionForToolPanel(n,r,d,u,i,s);if(null!=h)return h}return r?`${d()}-${u()}`:null!=o?c(o):`${n}`}};function CD(e,t){return t<e?-1:t>e?1:0}var Um=class extends ft{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e)return void(this.lastType=this.optionsFactory.defaultOption);let r;r=e.operator?e.conditions[0]:e,this.lastType=r.type}canWeEditAfterModelFromParentFilter(e){return e?!e.operator&&this.isTypeEditable(e.type):this.isTypeEditable(this.lastType)}init(e){this.params=e;const t=this.gos.get("enableFilterHandlers");this.reactive=t,this.setParams(e),t&&this.onModelUpdated(e.model)}setParams(e){const t=new gh;this.optionsFactory=t,t.init(e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(t,e.filterParams)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const r=this.optionsFactory.defaultOption;t||(this.lastType=r),this.readOnly=!!e.filterParams.readOnly;const i=this.isTypeEditable(r);this.setEditable(i)}refresh(e){this.params=e;const t=e,r=this.reactive;if((!r||"colDef"===t.source)&&this.updateParams(e),r){const{source:i,model:s}=t;if("dataChanged"===i||"ui"===i)return;this.onModelUpdated(s)}}updateParams(e){const t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t?.afterFloatingFilter||t?.afterDataChange||this.onModelUpdated(e)}hasSingleInput(e){const t=this.optionsFactory.getCustomOption(e)?.numberOfInputs;return null==t||1==t}isTypeEditable(e){return!!e&&!this.readOnly&&this.hasSingleInput(e)&&["inRange","empty","blank","notBlank"].indexOf(e)<0}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},xD={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eReadOnlyText"},{tag:"div",ref:"eDateWrapper",cls:"ag-date-floating-filter-wrapper"}]},bD={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},Ch=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function wh(e){const{allowedCharPattern:t}=e??{};return t??null}function xh(e){return null==e||isNaN(e)?null:e}function $m(e,t){const{filter:r,filterTo:i,type:s}=e||{};return[xh(r),xh(i)].slice(0,Oa(s,t))}var jm=class extends vh{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=zm}conditionToString(e,t,r,i,s){const{filter:n,filterTo:o,type:a}=e,l=this.formatValue.bind(this);if(t){const c=this.conditionForToolPanel(a,r,()=>l(n),()=>l(o),i,s);if(null!=c)return c}return r?`${l(n)}-${l(o)}`:null!=n?l(n):`${a}`}},Km=class extends Q{constructor(e){super(),this.params=e,this.eInput=ge,this.onValueChanged=()=>{}}setupGui(e){this.eInput=this.createManagedBean(new In(this.params?.config));const t=this.eInput.getGui();e.appendChild(t);const r=i=>this.onValueChanged(i);this.addManagedListeners(t,{input:r,keydown:r})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t}){const{eInput:r}=this;r.setInputAriaLabel(e),void 0!==t&&r.setAutoComplete(t)}};function Sh(e){const t=e?.trim();return""===t?e:t}function qm(e,t){const{filter:r,filterTo:i,type:s}=e||{};return[r||null,i||null].slice(0,Oa(s,t))}var RD={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},Xm=class extends Um{constructor(){super(...arguments),this.eFloatingFilterInputContainer=ge,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(RD)}onModelUpdated(e){this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e))}setParams(e){this.setupFloatingFilterInputService(e),super.setParams(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){const t=e.browserAutoComplete??!1,{inputSvc:r,defaultDebounceMs:i,readOnly:s}=this;if(r.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:t}),this.applyActive=Xl(e.filterParams),!s){const n=gu(e.filterParams,i),o=Cr(this,this.syncUpWithParentFilter.bind(this),n);r.setValueChangedListener(o)}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,r=t.getValue();Rt(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(r,!0)}syncUpWithParentFilter(e){const t="Enter"===e.key,r=this.reactive;if(r&&this.params.onUiChange(),this.applyActive&&!t)return;const{inputSvc:i,params:s,lastType:n}=this;let o=i.getValue();if(s.filterParams.trimInput&&(o=Sh(o),i.setValue(o,!0)),r){const a=s,l=a.model,c=this.convertValue(o),d=null==c?null:{...l??{filterType:this.filterType,type:n??this.optionsFactory.defaultOption},filter:c};a.onModelChange(d,{afterFloatingFilter:!0})}else s.parentFilterInstance(a=>{a?.onFloatingFilterChanged(n||null,o||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},kD=class extends Q{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new tu),this.eTextInput=this.createManagedBean(new In),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),r=this.eTextInput.getGui();e.appendChild(t),e.appendChild(r),this.setupListeners(t,i=>this.onValueChanged(i)),this.setupListeners(r,i=>this.onValueChanged(i))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},bh=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],Ym=class extends vh{constructor(){super(...arguments),this.filterTypeKeys=vD}conditionToString(e,t,r,i,s){const{filter:n,filterTo:o,type:a}=e;if(t){const l=d=>()=>en(this,"filterSummaryTextQuote",[d]),c=this.conditionForToolPanel(a,r,l(n),l(o),i,s);if(null!=c)return c}return r?`${n}-${o}`:null!=n?`${n}`:`${a}`}},DD=({filterOption:e,value:t,filterText:r})=>{if(null==r)return!1;switch(e){case"contains":return t.includes(r);case"notContains":return!t.includes(r);case"equals":return t===r;case"notEqual":return t!=r;case"startsWith":return 0===t.indexOf(r);case"endsWith":{const i=t.lastIndexOf(r);return i>=0&&i===t.length-r.length}default:return!1}},AD=e=>e,MD=e=>null==e?null:e.toString().toLowerCase(),HD={moduleName:"ClientSideRowModelFilter",version:he,rowModels:["clientSide"],beans:[class extends Q{constructor(){super(...arguments),this.beanName="filterStage",this.step="filter",this.refreshProps=["excludeChildrenWhenTreeDataFiltering"]}wireBeans(e){this.filterManager=e.filterManager}execute(e){const{changedPath:t}=e;this.filter(t)}filter(e){const t=!!this.filterManager?.isChildFilterPresent();this.filterNodes(t,e)}filterNodes(e,t){const r=(i,s)=>{i.childrenAfterFilter=i.hasChildren()&&e&&!s?i.childrenAfterGroup.filter(n=>{const o=n.childrenAfterFilter&&n.childrenAfterFilter.length>0,a=n.data&&this.filterManager.doesRowPassFilter({rowNode:n});return o||a}):i.childrenAfterGroup,Lm(i)};if(this.doingTreeDataFiltering()){const i=(n,o)=>{if(n.childrenAfterGroup)for(let a=0;a<n.childrenAfterGroup.length;a++){const l=n.childrenAfterGroup[a],c=o||this.filterManager.doesRowPassFilter({rowNode:l});l.childrenAfterGroup?i(n.childrenAfterGroup[a],c):r(l,c)}r(n,o)};t.executeFromRootNode(n=>i(n,!1))}else t.forEachChangedNodeDepthFirst(s=>r(s,!1),!0)}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}}]},yh={moduleName:"FilterCore",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:i})=>this.onAdvFilterEnabledChanged(i),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:r}=this;this.alwaysPassFilter=r.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=r.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return"function"==typeof e&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return"function"==typeof t&&t(e)}setFilterState(e,t,r="api"){this.isAdvFilterEnabled()||this.colFilter?.setState(e,t,r)}setFilterModel(e,t="api",r){this.isAdvFilterEnabled()?r||this.warnAdvFilters():this.colFilter?.setModel(e,t)}getFilterModel(){return this.colFilter?.getModel()??{}}getFilterState(){return this.colFilter?.getState()}isColumnFilterPresent(){return!!this.colFilter?.isFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){e?this.colFilter?.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilter?.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){Dd(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:r,columns:i=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):$t.resolve()).then(()=>{const s={source:t,type:"filterChanged",columns:i};r&&Jr(s,r),this.eventSvc.dispatchEvent(s),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!Dd(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,colIdToSkip:e})}doesRowPassAggregateFilters(e){const{rowNode:t}=e;return!!this.alwaysPassFilter?.(t)||!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e){const{rowNode:t}=e;return!!this.alwaysPassFilter?.(t)||!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterAllowed(e){return!this.isAdvFilterEnabled()&&!!this.colFilter?.isFilterAllowed(e)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){if(this.beans.dataTypeSvc?.isPendingInference)return void this.advFilterModelUpdateQueue.push(e);this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})}}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return!this.isAdvFilterEnabled()&&!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){ne(68)}setupAdvFilterHeaderComp(e){this.advancedFilter?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(const e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setModelForColumn(e,t)??Promise.resolve()}}],apiFunctions:{isAnyFilterPresent:function oD(e){return!!e.filterManager?.isAnyFilterPresent()},onFilterChanged:function aD(e,t="api"){e.filterManager?.onFilterChanged({source:t})}},css:[".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper,:where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}:where(.ag-floating-filter-full-body)>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}"],dependsOn:[HD]},Qm={moduleName:"FilterValue",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,r){if(!t)return;const i=e.getColDef(),{selectableFilter:s,valueSvc:n}=this.beans,o=r??s?.getFilterValueGetter(e.getColId())??i.filterValueGetter;return o?this.executeFilterValueGetter(o,t.data,e,t,i):n.getValue(e,t)}executeFilterValueGetter(e,t,r,i,s){const{expressionSvc:n,valueSvc:o}=this.beans,a=_e(this.gos,{data:t,node:i,column:r,colDef:s,getValue:o.getValueCallback.bind(o,i)});return"function"==typeof e?e(a):n?.evaluate(e,a)}}]},Fc={moduleName:"ColumnFilter",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.columnModelUpdates=[],this.state=new Map,this.handlerMap={...Vp},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)});const e=this.gos,t={...e.get("initialState")?.filter?.filterModel??{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",r){const{colModel:i,dataTypeSvc:s,filterManager:n}=this.beans;if(s?.isPendingInference)return void this.modelUpdates.push({model:e,source:t});const o=[],a=this.getModel(!0);if(e){const l=new Set(Object.keys(e));this.allColumnFilters.forEach((c,d)=>{o.push(this.setModelOnFilterWrapper(c,e[d])),l.delete(d)}),l.forEach(c=>{const d=i.getColDefCol(c)||i.getCol(c);if(!d)return void ne(62,{colId:c});if(!d.isFilterAllowed())return void ne(63,{colId:c});const u=this.getOrCreateFilterWrapper(d,!0);u?o.push(this.setModelOnFilterWrapper(u,e[c],!0)):ne(64,{colId:c})})}else this.model={},this.allColumnFilters.forEach(l=>{o.push(this.setModelOnFilterWrapper(l,null))});$t.all(o).then(()=>{const l=this.getModel(!0),c=[];this.allColumnFilters.forEach((d,u)=>{xn(a?a[u]:null,l?l[u]:null)||c.push(d.column)}),c.length>0?n?.onFilterChanged({columns:c,source:t}):r&&this.updateActive("filterChanged")})}getModel(e){const t={},{allColumnFilters:r,initialModel:i,beans:{colModel:s}}=this;if(r.forEach((n,o)=>{const a=this.getModelFromFilterWrapper(n);le(a)&&(t[o]=a)}),!e)for(const n of Object.keys(i)){const o=i[n];le(o)&&!r.has(n)&&s.getCol(n)?.isFilterAllowed()&&(t[n]=o)}return t}setState(e,t,r="api"){if(this.state.clear(),t)for(const i of Object.keys(t)){const s=t[i];this.state.set(i,{model:Sr(this.model,i),state:s})}this.setModel(e,r,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let r=!1;return e.forEach((i,s)=>{const n=i.state;null!=n&&(r=!0,t[s]=n)}),r?t:void 0}getModelFromFilterWrapper(e){const r=e.column.getColId();if(e.isHandler)return Sr(this.model,r);const i=e.filter;return i?"function"!=typeof i.getModel?(ne(66),null):i.getModel():Sr(this.initialModel,r)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};const{allColumnFilters:e}=this;return!!e.size&&(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0)}updateActiveFilters(){const{colModel:t,gos:r}=this.beans,i=!!Dd(r),n=[],o=[],a=(c,d,u)=>{d&&((c=>{if(!c.isPrimary())return!0;const u=!t.isPivotActive();return!(!c.isValueActive()||!u)&&(!!t.isPivotMode()||i)})(c)?n.push(u):o.push(u))},l=[];return this.allColumnFilters.forEach(c=>{const d=c.column,u=d.getColId();if(c.isHandler)l.push($t.resolve().then(()=>{a(d,this.isHandlerActive(d),{colId:u,isHandler:!0,handler:c.handler,handlerParams:c.handlerParams})}));else{const h=Zs(c);h&&l.push(h.then(f=>{a(d,(c=>!!c&&(c.isFilterActive?c.isFilterActive():(ne(67),!1)))(f),{colId:u,isHandler:!1,comp:f})}))}}),$t.all(l).then(()=>{this.activeAggregateFilters=n,this.activeColumnFilters=o})}updateFilterFlagInColumns(e,t){const r=[];return this.allColumnFilters.forEach(i=>{const s=i.column;if(i.isHandler)r.push($t.resolve().then(()=>{this.setColFilterActive(s,this.isHandlerActive(s),e,t)}));else{const n=Zs(i);n&&r.push(n.then(o=>{this.setColFilterActive(s,o.isFilterActive(),e,t)}))}}),this.beans.groupFilter?.updateFilterFlags(e,t),$t.all(r)}doFiltersPass(e,t,r){const{data:i,aggData:s}=e,n=r?this.activeAggregateFilters:this.activeColumnFilters,o=r?s:i,a=this.model;for(let l=0;l<n.length;l++){const c=n[l],{colId:d,isHandler:u}=c;if(d!==t)if(u){const{handler:h,handlerParams:f}=c;if(!h.doesFilterPass({node:e,data:o,model:Sr(a,d),handlerParams:f}))return!1}else{const h=c.comp;if("function"!=typeof h.doesFilterPass){Ct(91);continue}if(!h.doesFilterPass({node:e,data:o}))return!1}}return!0}getHandlerParams(e){const t=this.allColumnFilters.get(e.getColId());return t?.isHandler?t.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:r}=this.beans,i=()=>{this.isAlive()&&r?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(i,0):i()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:r}=e,i=t?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",r).then(()=>{this.allColumnFilters.forEach(s=>{const{column:n,isHandler:o}=s;i!==n.getColId()&&(o&&s.handler.onAnyFilterChanged?.(),Zs(s,o)?.then(a=>{"function"==typeof a?.onAnyFilterChanged&&a.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!this.gos.get("allowShowChangeAfterFilter")&&this.processingFilterChange}onNewRowsLoaded(e){const t=[];this.allColumnFilters.forEach(r=>{const i=r.isHandler;i&&r.handler.onNewRowsLoaded?.();const s=Zs(r,i);s&&t.push(s.then(n=>{n.onNewRowsLoaded?.()}))}),$t.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){const{filterValueSvc:r,colModel:i}=this.beans;return(s,n)=>{const o=n?i.getCol(n):e;return o?r.getValue(o,s,t):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t?.isHandler)return this.isHandlerActive(e);const r=t?.filter;return r?r.isFilterActive():null!=Sr(this.initialModel,e.getColId())}isHandlerActive(e){const t=le(Sr(this.model,e.getColId()));if(t)return t;const r=this.beans.groupFilter;return!!r?.isGroupFilter(e)&&r.isFilterActive(e)}getOrCreateFilterUi(e){const t=this.getOrCreateFilterWrapper(e,!0);return t?Zs(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const r=Zs(t);return r?r.then(i=>({comp:i,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){const r=this.getOrCreateFilterWrapper(e,t);return r?.isHandler?r.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let r=this.cachedFilter(e);return!r&&t&&(r=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,r)),r}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e,t=!1){return this.getDefaultFilterFromDataType(()=>this.beans.dataTypeSvc?.getBaseDataType(e),t)}getDefaultFilterFromDataType(e,t=!1){return function Kx(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":function Ob(e,t=!1){return(t?Lb:_b)[e??"text"]}(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,r,i,s,n){const o=()=>{const c=this.createFilterCompParams(e,s,n),d=i(c,s);return function XS(e,t,r,i){const s=t.filter;return cp(s)&&(t={filter:s.component,filterParams:t.filterParams}),e.getCompDetails(t,Bd,i,r,!0)}(this.beans.userCompFactory,t,d,r)},a=o();return a?{compDetails:a,createFilterUi:c=>(c?o():a).newAgStackInstance()}:null}createFilterInstance(e,t,r,i){const s=this.beans.selectableFilter;s?.isSelectable(t)&&(t=s.getFilterDef(e,t));const{handler:n,handlerParams:o,handlerGenerator:a}=this.createHandler(e,t,r)??{},l=this.createFilterComp(e,t,r,i,!!n,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:n,handlerGenerator:a,handlerParams:o};const{compDetails:c,createFilterUi:d}=l;return this.isGlobalButtons&&(c.params?.buttons?.length||ne(281,{colId:e.getColId()})),{compDetails:c,handler:n,handlerGenerator:a,handlerParams:o,createFilterUi:d}}createBaseFilterParams(e,t){const{filterManager:r,rowModel:i}=this.beans;return _e(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:s=>r?.doesRowPassOtherFilters(e.getColId(),s)??!0,rowModel:i})}createFilterCompParams(e,t,r,i){const s=this.filterChangedCallbackFactory(e),n=this.createBaseFilterParams(e,i);if(n.filterChangedCallback=s,n.filterModifiedCallback=i?()=>{}:o=>this.filterModified(e,o),t){const o=n,a=e.getColId(),l=Sr(this.model,a);o.model=l,o.state=this.state.get(a)??{model:l},o.onModelChange=(c,d)=>{this.updateStoredModel(a,c),this.refreshHandlerAndUi(e,c,"ui",!1,d).then(()=>{s({...d,source:"columnFilter"})})},o.onStateChange=c=>{this.updateState(e,c),this.updateOrRefreshFilterUi(e)},o.onAction=(c,d,u)=>{this.updateModel(e,c,d),this.dispatchLocalEvent({type:"filterAction",column:e,action:c,event:u})},o.getHandler=()=>this.getHandler(e,!0),o.onUiChange=c=>this.filterUiChanged(e,c),o.source=r}return n}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,r){const i=t(),s={created:!0,create:t,filterParams:e.params,compDetails:e,promise:i};return i.then(r),s}createFilterWrapper(e){const{compDetails:t,handler:r,handlerGenerator:i,handlerParams:s,createFilterUi:n}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),a=>a),o=e.getColId();if(r)return delete this.initialModel[o],r.init?.({...s,source:"init",model:Sr(this.model,o)}),{column:e,isHandler:!0,handler:r,handlerGenerator:i,handlerParams:s,filterUi:this.createFilterUiForHandler(t,n)};if(n){const a={column:e,filterUi:null,isHandler:!1};return a.filterUi=this.createFilterUiLegacy(t,n,l=>{a.filter=l??void 0}),a}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,r){const{gos:i,frameworkOverrides:s,registry:n}=this.beans;let o;const l=i.get("enableFilterHandlers"),c=l?(f=>{const p=f.filter;return cp(p)?p.handler||(o=p.doesFilterPass,o?()=>({doesFilterPass:o}):void 0):"string"==typeof p?p:void 0})(t):void 0,d=f=>()=>this.createBean(n.createDynamicBean(f,!0));let u,h;if("string"==typeof c){const f=i.get("filterHandlers")?.[c];null!=f?u=f:Fb.has(c)&&(u=d(c),h=c)}else u=c;if(!u){let f;const{compName:p,jsComp:g,fwComp:m}=gp(s,t);p?f=p:null==g&&null==m&&!0===t.filter&&(f=r),h=this.handlerMap[f],h&&(u=d(h))}return u?{filterHandler:u,handlerNameOrCallback:o??h}:l?(rr(i)&&ne(277,{colId:e.getColId()}),sD):void 0}createHandler(e,t,r){const i=this.createHandlerFunc(e,t,r);if(!i)return;const s=Nd(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:n,filterHandler:o}=i,{handler:a,handlerParams:l}=this.createHandlerFromFunc(e,o,s);return{handler:a,handlerParams:l,handlerGenerator:n??o}}createHandlerFromFunc(e,t,r){const i=e.getColDef();return{handler:t(_e(this.gos,{column:e,colDef:i})),handlerParams:this.createHandlerParams(e,r)}}createHandlerParams(e,t){const r=e.getColDef(),i=e.getColId(),s=this.filterChangedCallbackFactory(e);return _e(this.gos,{colDef:r,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:n=>this.beans.filterManager?.doesRowPassOtherFilters(i,n)??!0,onModelChange:(n,o)=>{this.updateStoredModel(i,n),this.refreshHandlerAndUi(e,n,"handler",!1,o).then(()=>{s({...o,source:"columnFilter"})})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:r,groupFilter:i}=this.beans;this.allColumnFilters.forEach((n,o)=>{let a;a=n.column.isPrimary()?t.getColDefCol(o):t.getCol(o),(!a||a!==n.column)&&(e.push(n.column),this.disposeFilterWrapper(n,"columnChanged"),this.disposeColumnListener(o))});const s=i&&e.every(n=>i.isGroupFilter(n));e.length>0&&!s&&r?.onFilterChanged({columns:e,source:"api"})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const r=this.beans.groupFilter;return!r?.isGroupFilter(e)||r.isFilterAllowed(e)}getFloatingFilterCompDetails(e,t){const{userCompFactory:r,frameworkOverrides:i,selectableFilter:s}=this.beans,o=e.getColDef(),a=s?.isSelectable(o)?s.getFilterDef(e,o):o,l=function Vb(e,t,r){if(null==t)return null;let i=null;const{compName:s,jsComp:n,fwComp:o}=gp(e,t);return s?i={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[s]:null==n&&null==o&&!0===t.filter&&(i=r()),i}(i,a,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",c=this.gos.get("enableFilterHandlers"),d=Nd(r,a,this.createFilterCompParams(e,c,"init",!0)),u=_e(this.gos,{column:e,filterParams:d,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:h=>{const f=this.getOrCreateFilterUi(e);f?.then(p=>{h(xa(p))})},showParentFilter:t});if(c){const h=u,f=e.getColId(),p=this.filterChangedCallbackFactory(e);h.onUiChange=g=>this.floatingFilterUiChanged(e,g),h.model=Sr(this.model,f),h.onModelChange=(g,m)=>{this.updateStoredModel(f,g),this.refreshHandlerAndUi(e,g,"floating",!0,m).then(()=>{p({...m,source:"columnFilter"})})},h.getHandler=()=>this.getHandler(e,!0),h.source="init"}return function e2(e,t,r,i){return e.getCompDetails(t,LS,i,r)}(r,o,u,l)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,r,i){const s="paramsUpdated";if(e.isHandler){const n=t.getColId();delete this.initialModel[n],this.state.delete(n);const o=e.filterUi,a=this.createFilterUiForHandler(r,i);e.filterUi=a;const l=this.eventSvc;o?.created?o.promise.then(c=>{this.destroyBean(c),l.dispatchEvent({type:"filterDestroyed",source:s,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:s,column:t})}else this.destroyFilter(t,s)}destroyFilter(e,t="api"){const r=e.getColId(),i=this.allColumnFilters.get(r);this.disposeColumnListener(r),delete this.initialModel[r],i&&this.disposeFilterWrapper(i,t).then(s=>{s&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[e],source:"api"})})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let r=!1;const{column:i,isHandler:s,filterUi:n}=e,o=i.getColId();s&&(r=this.isHandlerActive(i),this.destroyBean(e.handler),delete this.model[o],this.state.delete(o));const a=()=>{this.setColFilterActive(i,!1,"filterDestroyed"),this.allColumnFilters.delete(o),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:i})};if(n){if(n.created)return n.promise.then(l=>(r=s?r:!!l?.isFilterActive(),this.destroyBean(l),a(),r));a()}return $t.resolve(r)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:t?.source??"columnFilter"})}}filterParamsChanged(e,t="api"){const r=this.allColumnFilters.get(e);if(!r)return;const i=this.beans,s=r.column,n=s.getColDef(),o=s.isFilterAllowed(),a=this.getDefaultFilter(s),l=i.selectableFilter,c=l?.isSelectable(n)?l.getFilterDef(s,n):n,d=o?this.createHandlerFunc(s,c,this.getDefaultFilter(s)):void 0,u=!!d,h=r.isHandler;if(h!=u)return void this.destroyFilter(s,"paramsUpdated");const{compDetails:f,createFilterUi:p}=(o?this.createFilterComp(s,c,a,m=>m,u,"colDef"):null)??{compDetails:null,createFilterUi:null},g=f?.params??Nd(i.userCompFactory,c,this.createFilterCompParams(s,u,"colDef"));if(h){const m=d?.handlerNameOrCallback??d?.filterHandler,v=Sr(this.model,e);if(r.handlerGenerator!=m){const w=r.handler,{handler:C,handlerParams:y}=this.createHandlerFromFunc(s,d.filterHandler,g);r.handler=C,r.handlerParams=y,r.handlerGenerator=m,delete this.model[e],C.init?.({...y,source:"init",model:null}),this.destroyBean(w),null!=v&&this.beans.filterManager?.onFilterChanged({columns:[s],source:t})}else{const w=this.createHandlerParams(s,f?.params);r.handlerParams=w,r.handler.refresh?.({...w,source:"colDef",model:v})}}!this.areFilterCompsDifferent(r.filterUi?.compDetails??null,f)&&r.filterUi&&f?(r.filterUi.filterParams=g,Zs(r,h)?.then(m=>{!1===(!m?.refresh||m.refresh(g))?this.destroyFilterUi(r,s,f,p):this.dispatchLocalEvent({type:"filterParamsChanged",column:s,params:g})})):this.destroyFilterUi(r,s,f,p)}refreshHandlerAndUi(e,t,r,i,s){const n=this.cachedFilter(e);if(!n)return i&&this.getOrCreateFilterWrapper(e,!0),$t.resolve();if(!n.isHandler)return $t.resolve();const{filterUi:o,handler:a,handlerParams:l}=n;return function Rb(e,t,r,i,s,n,o){return t.refresh?.({...r,model:i,source:n,additionalEventAttributes:o}),e().then(a=>{if(a){const{filter:l,filterParams:c}=a;zp(l,c,i,s,n,o)}})}(()=>{if(o){const{created:c,filterParams:d}=o;if(c)return o.promise.then(u=>u?{filter:u,filterParams:d}:void 0);o.refreshed=!0}return $t.resolve(void 0)},a,l,t,this.state.get(e.getColId())??{model:t},r,s)}setColumnFilterWrapper(e,t){const r=e.getColId();this.allColumnFilters.set(r,t),this.allColumnListeners.set(r,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(r)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:r}=e,{componentClass:i}=t;return!(r===i||r?.render&&i?.render&&r.render===i.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){const t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);const r=this.getOrCreateFilterUi(t);return r?new Promise(i=>{r.then(s=>{i(xa(s))})}):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach(({model:e,source:t})=>this.setModel(e,t)),this.modelUpdates=[],this.columnModelUpdates.forEach(({key:e,model:t,resolve:r})=>{this.setModelForColumn(e,t).then(()=>r())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){const{state:i,model:s}=this,n=e.getColId(),o=i.get(n);return o?o.model??null:Sr(s,n)}const r=this.cachedFilter(e);return r?this.getModelFromFilterWrapper(r):null}setModelForColumn(e,t){if(this.beans.dataTypeSvc?.isPendingInference){let r=()=>{};const i=new Promise(s=>{r=s});return this.columnModelUpdates.push({key:e,model:t,resolve:r}),i}return new Promise(r=>{this.setModelForColumnLegacy(e,t).then(i=>r(i))})}getStateForColumn(e){return this.state.get(e)??{model:Sr(this.model,e)}}setModelForColumnLegacy(e,t){const r=this.beans.colModel.getColDefCol(e),i=r?this.getOrCreateFilterWrapper(r,!0):null;return i?this.setModelOnFilterWrapper(i,t):$t.resolve()}setColDefPropsForDataType(e,t,r){const i=e.filter,s=!0===i?this.getDefaultFilterFromDataType(()=>t.baseDataType):i;if("string"!=typeof s)return;let n,o;const a=this.beans,{filterParams:l,filterValueGetter:c}=e;({filterParams:n,filterValueGetter:o}="agMultiColumnFilter"===s?a.multiFilter?.getParamsForDataType(l,c,t,r)??{}:function Ib(e,t,r,i,s,n,o){let a=t,l=r;const c="agSetColumnFilter"===e;!l&&"object"===i.baseDataType&&!c&&(l=({column:f,node:p})=>s({column:f,node:p,value:n.valueSvc.getValue(f,p)}));const h=(0,(c?mu:pu)[i.baseDataType])({dataTypeDefinition:i,formatValue:s,t:o});return a="object"==typeof t?{...h,...t}:h,{filterParams:a,filterValueGetter:l}}(s,l,c,t,r,a,this.getLocaleTextFunc())),e.filterParams=n,o&&(e.filterValueGetter=o)}setColFilterActive(e,t,r,i){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",r)),e.dispatchColEvent("filterChanged",r,i)}setModelOnFilterWrapper(e,t,r){return new $t(i=>{if(e.isHandler){const n=e.column,o=n.getColId(),a=this.model[o];return this.updateStoredModel(o,t),r&&t===a?void i():void this.refreshHandlerAndUi(n,t,"api").then(()=>i())}const s=Zs(e);s?s.then(n=>{if("function"!=typeof n?.setModel)return ne(65),void i();(n.setModel(t)||$t.resolve()).then(()=>i())}):i()})}updateStoredModel(e,t){le(t)?this.model[e]=t:delete this.model[e];const r=this.state.get(e);this.state.set(e,{model:t,state:r?.state})}filterModified(e,t){this.getOrCreateFilterUi(e)?.then(r=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:r,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,r){const i=e.getColId(),s=this.cachedFilter(e),n=()=>s?.filterUi;Up(t,n,()=>Sr(this.model,i),()=>this.state.get(i),o=>this.updateState(e,o),o=>n()?.filterParams?.onModelChange(o,r),s?.isHandler?s.handler.processModelToApply?.bind(s.handler):void 0)}updateAllModels(e,t){const r=[];this.allColumnFilters.forEach((i,s)=>{const n=this.beans.colModel.getColDefCol(s);n&&Up(e,()=>i.filterUi,()=>Sr(this.model,s),()=>this.state.get(s),o=>this.updateState(n,o),o=>{this.updateStoredModel(s,o),this.dispatchLocalEvent({type:"filterAction",column:n,action:e}),r.push(this.refreshHandlerAndUi(n,o,"ui"))},i?.isHandler?i.handler.processModelToApply?.bind(i.handler):void 0)}),r.length&&$t.all(r).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();Wp(()=>this.cachedFilter(e)?.filterUi,()=>Sr(this.model,t),()=>this.state.get(t))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:"filterStateChanged",column:e,state:t})}canApplyAll(){const{state:e,model:t,activeFilterComps:r}=this;for(const s of r)if("COLUMN_MENU"===s.source)return!1;let i=!1;for(const s of e.keys()){const n=e.get(s);if(!1===n.valid)return!1;(n.model??null)!==Sr(t,s)&&(i=!0)}return i}hasUnappliedModel(e){const{model:t,state:r}=this;return(r.get(e)?.model??null)!==Sr(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if("newFiltersToolPanel"===t)return!0;const r=this.beans.filterPanelSvc;return!!r?.isActive&&!!r.getState(e.getColId())}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}},class extends Q{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,r,i){e&&!e.isColumn||this.showPopup(e,s=>{this.popupSvc?.positionPopupUnderMouseEvent({column:e,type:r,mouseEvent:t,ePopup:s})},r,t.target,fi(this.gos),i)}showMenuAfterButtonClick(e,t,r,i){if(e&&!e.isColumn)return;let s=-1,n="left";const o=fi(this.gos);!o&&this.gos.get("enableRtl")&&(s=1,n="right");const a=o?void 0:4*s,l=o?void 0:4;this.showPopup(e,c=>{this.popupSvc?.positionPopupByComponent({type:r,eventSource:t,ePopup:c,nudgeX:a,nudgeY:l,alignSide:n,keepWithinBounds:!0,position:"under",column:e})},r,t,o,i)}showPopup(e,t,r,i,s,n){const o=e?this.createBean(new Ab(e,"COLUMN_MENU")):void 0;if(this.activeMenu=o,!o?.hasFilter()||!e)return void Ct(57);const a=nr({tag:"div",cls:"ag-menu"+(s?"":" ag-filter-menu"),role:"presentation"});let l;[this.tabListener]=this.addManagedElementListeners(a,{keydown:g=>this.trapFocusWithin(g,a)}),a.appendChild(o?.getGui());const d=function qx(e){return!fi(e)}(this.gos)?i??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,h=this.getLocaleTextFunc(),f=s&&"columnFilter"!==r?h("ariaLabelColumnMenu","Column Menu"):h("ariaLabelColumnFilter","Column Filter"),p=this.popupSvc?.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:g=>{m0(e,!1,"contextMenu");const m=g instanceof KeyboardEvent;this.tabListener&&(this.tabListener=this.tabListener()),m&&i&&Ji(i)&&Sp(i)?.focus({preventScroll:!0}),o?.afterGuiDetached(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,r,e),n?.()},positionCallback:()=>t(a),anchorToElement:d,ariaLabel:f});p&&(this.hidePopup=l=p.hideFunc),o.afterInit().then(()=>{t(a),o.afterGuiAttached({container:r,hidePopup:l})}),m0(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,r,e)}trapFocusWithin(e,t){"Tab"!==e.key||e.defaultPrevented||An(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),Dn(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,r){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:r??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}}],dynamicBeans:{headerFilterCellCtrl:class extends Du{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,r,i,s){this.comp=e;const n=Ca(this,this.beans.context,s);this.eButtonShowMainFilter=r,this.eFloatingFilterBody=i,this.setGui(t,n),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(n),this.setupLeft(n),this.setupHover(n),this.setupFocus(n),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(n),this.setupUi(),n.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(n);const o=()=>this.onColDefChanged(n);n.addManagedListeners(this.column,{colDefChanged:o}),n.addManagedEventListeners({filterSwitched:({column:a})=>{a===this.column&&o()}}),n.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this;return _e(t.gos,{colDef:e.colDef,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef();this.active=!!e.filter&&!!e.floatingFilter}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=Ti("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new To(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.getLocaleTextFunc();z(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(mt(t)===this.eGui)return;const s=An(t,this.eGui,null,e.shiftKey);if(s)return t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),void s.focus();const n=this.findNextColumnWithFloatingFilter(e.shiftKey);n&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:n},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let r=this.column;do{if(r=e?t.getColBefore(r):t.getColAfter(r),!r)break}while(!r.getColDef().filter||!r.getColDef().floatingFilter);return r}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case U_UP:case U_DOWN:case U_LEFT:case U_RIGHT:if(t)return;Ln(e);case"Enter":t&&Dn(this.eGui)&&e.preventDefault();break;case"Escape":t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const r=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&Or(e.relatedTarget,"ag-floating-filter");if(r&&i&&e.target===this.eGui){const s=this.lastFocusEvent;s&&s&&"Tab"===s.key&&Dn(this.eGui,s.shiftKey)}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new Pu(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!fi(this.gos)}setupUserComp(){if(!this.active)return;const e=this.beans.colFilter?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.beans.menuSvc?.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{beans:{colFilter:t},column:r,gos:i}=this,s=n=>{if(!("filterDestroyed"!==n?.source||this.isAlive()&&t?.isAlive()))return;const o=this.comp.getFloatingFilterComp();o&&o.then(a=>{if(a){if(i.get("enableFilterHandlers")){const d=n;let u="filter";return d?.afterFloatingFilter?u="ui":d?.afterDataChange?u="dataChanged":"api"===n?.source&&(u="api"),void this.updateFloatingFilterParams(this.userCompDetails,u)}const l=t?.getCurrentFloatingFilterParentModel(r),c=n?{...n,columns:n.columns??[],source:"api"===n.source?"api":"columnFilter"}:null;a.onParentModelChanged(l,c)}})};[this.destroySyncListener]=e.addManagedListeners(r,{filterChanged:s}),t?.isFilterActive(r)&&s(null)}setupWidth(e){const t=()=>{const r=`${this.column.getActualWidth()}px`;this.comp.setWidth(r)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const e=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive();const r=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const i=this.beans.colFilter,s=this.active?i?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,n=this.comp.getFloatingFilterComp();n&&s?n.then(o=>{!o||i?.areFilterCompsDifferent(this.userCompDetails??null,s)?this.updateCompDetails(e,s,r):this.updateFloatingFilterParams(s,"colDef")}):this.updateCompDetails(e,s,r)}updateCompDetails(e,t,r){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),r&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){if(!e)return;let r=e.params;this.comp.getFloatingFilterComp()?.then(i=>{"function"==typeof i?.refresh&&(this.gos.get("enableFilterHandlers")&&(r={...r,model:Sr(this.beans.colFilter?.model??{},this.column.getColId()),source:t}),i.refresh(r))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}}},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:function KP(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()},getColumnFilterInstance:function qP(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)},destroyFilter:function XP(e,t){const r=e.colModel.getColDefCol(t);if(r)return e.colFilter?.destroyFilter(r,"api")},setFilterModel:function YP(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))},getFilterModel:function QP(e){return e.filterManager?.getFilterModel()??{}},getColumnFilterModel:function JP(e,t,r){const{gos:i,colModel:s,colFilter:n}=e;r&&!i.get("enableFilterHandlers")&&(ne(288),r=!1);const o=s.getColDefCol(t);return o?n?.getModelForColumn(o,r)??null:null},setColumnFilterModel:function ZP(e,t,r){return e.filterManager?.setColumnFilterModel(t,r)??Promise.resolve()},showColumnFilter:function eD(e,t){const r=e.colModel.getCol(t);r?e.menuSvc?.showFilterMenu({column:r,containerType:"columnFilter",positionBy:"auto"}):Ct(12,{colKey:t})},hideColumnFilter:function tD(e){e.menuSvc?.hideFilterMenu()},getColumnFilterHandler:function rD(e,t){const r=e.colModel.getCol(t);if(r)return e.colFilter?.getHandler(r,!0);Ct(12,{colKey:t})},doFilterAction:function iD(e,t){const{colModel:r,colFilter:i,gos:s}=e;if(!s.get("enableFilterHandlers"))return void ne(287);const{colId:n,action:o}=t;if(n){const a=r.getColById(n);a&&i?.updateModel(a,o)}else i?.updateAllModels(o)}},dependsOn:[yh,yc,Qm,UP]},GD={moduleName:"CustomFilter",version:he,userComponents:{agReadOnlyFloatingFilter:class extends ft{constructor(){super(uD,[Ul]),this.eFloatingFilterText=ge}init(e){this.params=e;const t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){const r=e,i=r.getHandler();if(i.getModelAsString){const s=i.getModelAsString(r.model);this.eFloatingFilterText.setValue(s)}}}onParentModelChanged(e){null!=e?this.params.parentFilterInstance(t=>{if(t.getModelAsString){const r=t.getModelAsString(e);this.eFloatingFilterText.setValue(r)}}):this.eFloatingFilterText.setValue("")}refresh(e){this.init(e)}}},dependsOn:[Fc]},VD={moduleName:"TextFilter",version:he,dependsOn:[Fc],userComponents:{agTextColumnFilter:{classImp:class extends ph{constructor(){super("textFilter",qm,bh),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),r={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(r.filter=i[0]),i.length>1&&(r.filterTo=i[1]),r}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:r}=this;return e>=t.length?[null,null]:[t[e],r[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(r,i,s,n)=>{i<n&&t.push(zi(r.getValue()))}),t}createEValue(){const e=nr({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:r}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,r,"to"),e}createFromToElement(e,t,r){const i=this.createManagedBean(new In);i.addCss(`ag-filter-${r}`),i.addCss("ag-filter-filter"),t.push(i),e.appendChild(i.getGui())}removeEValues(e,t){const r=n=>this.removeComponents(n,e,t),{eValuesFrom:i,eValuesTo:s}=this;r(i),r(s)}},params:{useForm:!0}},agTextColumnFloatingFilter:class extends Xm{constructor(){super(...arguments),this.FilterModelFormatterClass=Ym,this.filterType="text",this.defaultOptions=bh}createFloatingFilterInputService(){return this.createManagedBean(new Km)}}},dynamicBeans:{agTextColumnFilterHandler:class extends Gm{constructor(){super(qm,bh),this.filterType="text",this.FilterModelFormatterClass=Ym}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??DD,this.formatter=t.textFormatter??(t.caseSensitive?AD:MD)}evaluateNullValue(e){return!!e&&["notEqual","notContains","blank"].indexOf(e)>=0}evaluateNonNullValue(e,t,r,i){const s=e.map(h=>this.formatter(h))||[],n=this.formatter(t),{api:o,colDef:a,column:l,context:c,filterParams:{textFormatter:d}}=this.params;if("blank"===r.type)return Ec(t);if("notBlank"===r.type)return!Ec(t);const u={api:o,colDef:a,column:l,context:c,node:i.node,data:i.data,filterOption:r.type,value:n,textFormatter:d};return s.some(h=>this.matcher({...u,filterText:h}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=r=>{const i={...r},{filter:s,filterTo:n}=r;return s&&(i.filter=Sh(s)??null),n&&(i.filterTo=Sh(n)??null),i};return Qp(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}}}},zD={moduleName:"NumberFilter",version:he,dependsOn:[Fc],userComponents:{agNumberColumnFilter:{classImp:class extends ph{constructor(){super("numberFilter",$m,Ch),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}setElementValue(e,t,r){const{numberFormatter:i}=this.params,s=!r&&i?i(t??null):t;super.setElementValue(e,s)}createEValue(){const e=wh(this.params),t=nr({tag:"div",cls:"ag-filter-body",role:"presentation"});return this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t}createFromToElement(e,t,r,i){const s=this.createManagedBean(i?new In({allowedCharPattern:i}):new tu);s.addCss(`ag-filter-${r}`),s.addCss("ag-filter-filter"),t.push(s),e.appendChild(s.getGui())}removeEValues(e,t){const r=i=>this.removeComponents(i,e,t);r(this.eValuesFrom),r(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(r,i,s,n)=>{i<n&&t.push(xh(this.stringToFloat(r.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}stringToFloat(e){if("number"==typeof e)return e;let t=zi(e);null!=t&&""===t.trim()&&(t=null);const r=this.params.numberParser;return r?r(t):null==t||"-"===t.trim()?null:Number.parseFloat(t)}createCondition(e){const t=this.getConditionType(e),r={filterType:this.filterType,type:t},i=this.getValues(e);return i.length>0&&(r.filter=i[0]),i.length>1&&(r.filterTo=i[1]),r}getInputs(e){const{eValuesFrom:t,eValuesTo:r}=this;return e>=t.length?[null,null]:[t[e],r[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{t.getInputElement().validity.valid||(e=!0)}),e}},params:{useForm:!0}},agNumberColumnFloatingFilter:class extends Xm{constructor(){super(...arguments),this.FilterModelFormatterClass=jm,this.filterType="number",this.defaultOptions=Ch}updateParams(e){wh(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=wh(e.filterParams),this.createManagedBean(this.allowedCharPattern?new Km({config:{allowedCharPattern:this.allowedCharPattern}}):new kD)}convertValue(e){return e?Number(e):null}}},dynamicBeans:{agNumberColumnFilterHandler:class extends Vm{constructor(){super($m,Ch),this.filterType="number",this.FilterModelFormatterClass=jm}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}}}},WD={moduleName:"DateFilter",version:he,dependsOn:[Fc],userComponents:{agDateColumnFilter:{classImp:class extends ph{constructor(){super("dateFilter",Bm,mh),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=1e3,this.maxValidYear=Hm,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e)}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(l,c)=>{const d=e[l];if(null!=d){if(!isNaN(d))return null==d?c:Number(d);ne(82,{param:l})}return c},r=t("minValidYear",1e3),i=t("maxValidYear",Hm);this.minValidYear=r,this.maxValidYear=i,r>i&&ne(83);const{minValidDate:s,maxValidDate:n}=e,o=s instanceof Date?s:ni(s);this.minValidDate=o;const a=n instanceof Date?n:ni(n);this.maxValidDate=a,o&&a&&o>a&&ne(84)}createDateCompWrapper(e){const{beans:{userCompFactory:t,context:r,gos:i},params:s}=this,n=new Om(r,t,s.colDef,_e(i,{onDateChanged:()=>this.onUiChanged(),filterParams:s,location:"filter"}),e);return this.addDestroyFunc(()=>n.destroy()),n}setElementValue(e,t){e.setDate(t)}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=nr({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,r,i){const s=nr({tag:"div",cls:`ag-filter-${i} ag-filter-date-${i}`});t.push(s),e.appendChild(s),r.push(this.createDateCompWrapper(s))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),La(this.eConditionPanelsFrom,e,t),La(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,r){const i=La(e,t,r);for(const s of i)s.destroy()}isValidDateValue(e){if(null===e)return!1;const{minValidDate:t,maxValidDate:r,minValidYear:i,maxValidYear:s}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<i)return!1;if(r){if(e>r)return!1}else if(e.getUTCFullYear()>s)return!1;return!0}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachInput((r,i,s,n)=>{s!==e||!t||i>=n||(t=t&&this.isValidDateValue(r.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),r={},i=this.getValues(e),s=this.params.useIsoSeparator?"T":" ";return i.length>0&&(r.dateFrom=gi(i[0],!0,s)),i.length>1&&(r.dateTo=gi(i[1],!0,s)),{dateFrom:null,dateTo:null,filterType:this.filterType,type:t,...r}}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),r=e("ariaFilterValue","Filter Value");this.forEachInput(i=>{i.setInputPlaceholder(t),i.setInputAriaLabel(r)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:r}=this;return e>=t.length?[null,null]:[t[e],r[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(r,i,s,n)=>{i<n&&t.push(r.getDate())}),t}translate(e){return super.translate("lessThan"===e?"before":"greaterThan"===e?"after":e)}},params:{useForm:!0}},agDateInput:class extends ft{constructor(){super(bD,[Ul]),this.eDateInput=ge,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply)return this.applyOnFocusOut=!e,void(e&&this.params.onDateChanged());e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}setParams(e){const t=this.eDateInput.getInputElement(),r=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=r&&Ys();const{minValidYear:i,maxValidYear:s,minValidDate:n,maxValidDate:o,buttons:a,includeTime:l,colDef:c}=e.filterParams||{},d=this.beans.dataTypeSvc,u=l??d?.getDateIncludesTimeFlag?.(c.cellDataType)??!1;if(r?u?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text",n&&i&&ne(85),o&&s&&ne(86),n&&o){const[h,f]=[n,o].map(p=>p instanceof Date?p:ni(p));h&&f&&h.getTime()>f.getTime()&&ne(87)}n?t.min=n instanceof Date?Qd(n):n:i&&(t.min=`${i}-01-01`),o?t.max=o instanceof Date?Qd(o):o:s&&(t.max=`${s}-12-31`),this.isApply="floatingFilter"===e.location&&!!a?.includes("apply")}refresh(e){this.params=e,this.setParams(e)}getDate(){return ni(this.eDateInput.getValue())}setDate(e){const t=this.params.filterParams.colDef.cellDataType,r=this.beans.dataTypeSvc?.getDateIncludesTimeFlag(t)??!1;this.eDateInput.setValue(gi(e,r))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e?.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){return e?.filterParams?.browserDatePicker??!0}},agDateColumnFloatingFilter:class extends Um{constructor(){super(xD,[Ul]),this.eReadOnlyText=ge,this.eDateWrapper=ge,this.FilterModelFormatterClass=Wm,this.filterType="date",this.defaultOptions=mh}setParams(e){super.setParams(e),this.createDateComponent();const t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}updateParams(e){super.updateParams(e),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){const r=e?ni(e.dateFrom):null;this.dateComp.setDate(r),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){at(this.eDateWrapper,e),at(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){const e=this.dateComp.getDate();if(this.reactive){const t=this.params;t.onUiChange();const r=t.model,i=gi(e),s=null==i?null:{...r??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:i};t.onModelChange(s,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t?.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=gu(e,this.defaultDebounceMs);return _e(this.gos,{onDateChanged:Cr(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:r,params:i}=this;this.dateComp=new Om(e,t,i.column.getColDef(),this.getDateComponentParams(),r,s=>{s.setInputAriaLabel(this.getAriaLabel(i))}),this.addDestroyFunc(()=>this.dateComp.destroy())}}},dynamicBeans:{agDateColumnFilterHandler:class extends Vm{constructor(){super(Bm,mh),this.filterType="date",this.FilterModelFormatterClass=Wm}comparator(){return this.params.filterParams.comparator??CD}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}}}},UD={moduleName:"QuickFilterCore",version:he,rowModels:["clientSide"],beans:[class extends Q{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",r=>this.setFilter(r.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){const{autoColSvc:e,colModel:t,gos:r,pivotResultCols:i}=this.beans,s=t.isPivotMode(),n=e?.getColumns(),o=t.getColDefCols();let a=(s&&!r.get("applyQuickFilterBeforePivotOrAgg")?i?.getPivotResultCols()?.list:o)??[];n&&(a=a.concat(n)),this.colsToUse=r.get("includeHiddenColumnsInQuickFilter")?a:a.filter(l=>l.isVisible()||l.isRowGroupActive())}isFilterPresent(){return null!==this.quickFilter}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(r=>t?this.doesRowPassCache(e,r):this.doesRowPassNoCache(e,r))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;this.quickFilterParts=e?t?t(e):e.split(" "):null}parseFilter(e){return le(e)?e.toUpperCase():null}setFilter(e){if(null!=e&&"string"!=typeof e)return void ne(70,{newFilter:e});const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),r=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,r&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(r=>{const i=this.getTextForColumn(r,e);return le(i)&&i.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let r;e?(this.checkGenerateAggText(t),r=t.quickFilterAggregateText):r=this.getAggText(t);const{quickFilterParts:i,matcher:s}=this;return s(i,r)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let r=this.beans.filterValueSvc.getValue(e,t);const i=e.getColDef();if(i.getQuickFilterText){const s=_e(this.gos,{value:r,node:t,data:t.data,column:e,colDef:i});r=i.getQuickFilterText(s)}return le(r)?r.toString().toUpperCase():null}getAggText(e){const t=[];for(const r of this.colsToUse){const i=this.getTextForColumn(r,e);le(i)&&t.push(i)}return t.join("\n")}}],dependsOn:[yh,Qm]},$D={moduleName:"QuickFilter",version:he,apiFunctions:{isQuickFilterPresent:function LD(e){return!!e.quickFilter?.isFilterPresent()},getQuickFilter:function OD(e){return e.quickFilter?.getText()},resetQuickFilter:function BD(e){e.quickFilter?.resetCache()}},dependsOn:[UD]},jD={moduleName:"ExternalFilter",version:he,dependsOn:[yh]},Eh=(e,t,r)=>{const{editModelSvc:i}=e,s=i?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,n=i?.getRowValidationModel().getRowValidation(t)?.errorMessages,o=s||n;return o?.length?o.join(r("tooltipValidationErrorSeparator",". ")):void 0},Jm={moduleName:"Tooltip",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,r,i){e&&t.destroyBean(e);const s=this.gos,n=bc(s),{column:o,eGui:a}=t,l=o.getColDef();!i&&n&&!l.headerComponent&&(i=na(()=>a.querySelector(".ag-header-cell-text")));const c="header",u=this.beans.colNames.getDisplayNameForColumn(o,"header",!0),h=r??u;let p=this.createTooltipFeature({getGui:()=>a,getLocation:()=>c,getTooltipValue:()=>r??l?.headerTooltipValueGetter?.(_e(s,{location:c,colDef:l,column:o,value:h,valueFormatted:u}))??l?.headerTooltip,shouldDisplayTooltip:i,getAdditionalParams:()=>({column:o,colDef:o.getColDef()})});return p&&(p=t.createBean(p),t.setRefreshFunction("tooltip",()=>p.refreshTooltip())),p}setupHeaderGroupTooltip(e,t,r,i){e&&t.destroyBean(e);const s=this.gos,n=bc(s),{column:o,eGui:a}=t,l=o.getColGroupDef();!i&&n&&!l?.headerGroupComponent&&(i=na(()=>a.querySelector(".ag-header-group-text")));const c="headerGroup",u=this.beans.colNames.getDisplayNameForColumnGroup(o,"header"),h=r??u,p=this.createTooltipFeature({getGui:()=>a,getLocation:()=>c,getTooltipValue:()=>r??l?.headerTooltipValueGetter?.(_e(s,{location:c,colDef:l,column:o,value:h,valueFormatted:u}))??l?.headerTooltip,shouldDisplayTooltip:i,getAdditionalParams:()=>{const g={column:o};return l&&(g.colDef=l),g}});return p&&t.createBean(p)}enableCellTooltipFeature(e,t,r){const{beans:i}=this,{gos:s,editSvc:n}=i,{column:o,rowNode:a}=e;let l="cell";const d=bc(s);return r||(r=d&&!e.isCellRenderer()?()=>{const h=!!n?.isEditing(e);if(!h&&Eh(i,e,this.getLocaleTextFunc()))return!0;if(!o.isTooltipEnabled())return!1;const g=na(()=>{const m=e.eGui;return 0===m.children.length?m:m.querySelector(".ag-cell-value")});return!h&&g()}:()=>!n?.isEditing(e)),this.createTooltipFeature({getGui:()=>e.eGui,getLocation:()=>l,getTooltipValue:null!=t?()=>t:()=>{const f=!n?.isEditing(e)&&Eh(i,e,this.getLocaleTextFunc());if(f)return l="cellEditor",f;l="cell";const p=o.getColDef(),g=a.data;if(p.tooltipField&&le(g))return Pa(g,p.tooltipField,o.isTooltipFieldContainsDots());const m=p.tooltipValueGetter;return m?m(_e(s,{location:"cell",colDef:o.getColDef(),column:o,rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,value:e.value,valueFormatted:e.valueFormatted})):null},shouldDisplayTooltip:r,getAdditionalParams:()=>({column:o,colDef:o.getColDef(),rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,valueFormatted:e.valueFormatted})},i)}setupFullWidthRowTooltip(e,t,r,i){const s={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>r,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},n=this.beans,o=n.context;e&&t.destroyBean(e,o);const a=this.createTooltipFeature(s,n);if(a)return t.createBean(a,o)}setupCellEditorTooltip(e,t){const{beans:r}=this,{context:i}=r,s=t.getValidationElement?.(!0)||!t.isPopup?.()&&e.eGui;if(!s)return;const o=this.createTooltipFeature({getGui:()=>s,getTooltipValue:()=>Eh(r,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{const{editModelSvc:a}=r,l=a?.getRowValidationModel()?.getRowValidationMap(),c=a?.getCellValidationModel()?.getCellValidationMap();return!!l&&l.size>0||!!c&&c.size>0}},r);return o?e.createBean(o,i):void 0}initCol(e){const{colDef:t}=e;e.tooltipEnabled=le(t.tooltipField)||le(t.tooltipValueGetter)||le(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}}],dynamicBeans:{tooltipFeature:Ip,highlightTooltipFeature:class extends Ip{constructor(e,t,r){super(e,r),this.highlightTracker=t,this.onHighlight=this.onHighlight.bind(this)}postConstruct(){super.postConstruct(),this.wireHighlightListeners()}wireHighlightListeners(){this.addManagedPropertyListener("tooltipTrigger",({currentValue:e})=>{this.setTooltipMode(e)}),this.setTooltipMode(this.gos.get("tooltipTrigger")),this.highlightTracker.addEventListener("itemHighlighted",this.onHighlight)}onHighlight(e){1===this.tooltipMode&&(e.highlighted?this.attemptToShowTooltip():this.attemptToHideTooltip())}setTooltipMode(e="focus"){this.tooltipMode="focus"===e?1:0}destroy(){this.highlightTracker.removeEventListener("itemHighlighted",this.onHighlight),super.destroy()}},tooltipStateManager:class extends cb{createTooltipComp(e,t){(function ZS(e,t){return e.getCompDetails(t.colDef,_S,"agTooltipComponent",t,!0)})(this.beans.userCompFactory,e)?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}}},userComponents:{agTooltipComponent:class extends Hd{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(e){const{value:t}=e,r=this.getGui();r.textContent=Hs(t);const i=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();r.classList.add(`ag-${i}-tooltip`)}}},dependsOn:[yc],css:[".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}"]},Oo=class{constructor(e){this.cellValueChanges=e}},Fh=class extends Oo{constructor(e,t,r,i){super(e),this.initialRange=t,this.finalRange=r,this.ranges=i}},Zm=class{constructor(e){this.actionStack=[],this.maxStackSize=e||10,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},ZD={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},Rc=class extends oc{constructor(e){super(),this.cellEditorInput=e,this.eEditor=ge}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:r}=this,{cellStartedEdit:i,eventKey:s,suppressPreventDefault:n}=e;r.getInputElement().setAttribute("title",""),t.init(r,e);let o,a=!0;i?(this.focusAfterAttached=!0,"Backspace"===s||"Delete"===s?o="":s&&1===s.length?n?a=!1:o=s:(o=t.getStartValue(),"F2"!==s&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,o=t.getStartValue()),a&&null!=o&&r.setStartValue(o),this.addGuiEventListener("keydown",l=>{const{key:c}=l;("PageUp"===c||"PageDown"===c)&&l.preventDefault()})}afterGuiAttached(){const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;Ys()||t.getFocusableElement().focus();const r=t.getInputElement();this.highlightAllOnFocus?r.select():this.cellEditorInput.setCaret?.()}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),r=e.getInputElement();t.focus(),r.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},t4={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},r4=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return t4}getAgComponents(){return[yp]}init(e,t){this.eEditor=e,this.params=t;const{min:r,max:i,step:s,colDef:n}=t;null!=r&&e.setMin(r),null!=i&&e.setMax(i),null!=s&&e.setStep(s),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),null!=this.includeTime&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:r}=this,{min:i,max:s,getValidationErrors:n}=r;let o=[];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 c=l.toLocaleDateString();o.push(a("minDateValidation",`Date must be after ${c}`,[c]))}}if(s){const l=s instanceof Date?s:new Date(s);if(t>l){const c=l.toLocaleDateString();o.push(a("maxDateValidation",`Date must be before ${c}`,[c]))}}}return o.length||(o=null),n?n({value:t,cellEditorParams:r,internalErrors:o}):o}getValue(){const{eEditor:e,params:t}=this,r=e.getDate();return le(r)||le(t.value)?r??null:t.value}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return gi(e,this.includeTime??!1)}},s4={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},n4=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return s4}getAgComponents(){return[yp]}init(e,t){this.eEditor=e,this.params=t;const{min:r,max:i,step:s,colDef:n}=t;null!=r&&e.setMin(r),null!=i&&e.setMax(i),null!=s&&e.setStep(s),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),null!=this.includeTime&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,r=e.getInputElement().value,i=this.formatDate(this.parseDate(r??void 0)),{min:s,max:n,getValidationErrors:o}=t;let a=[];if(i){const l=new Date(i),c=this.getLocaleTextFunc();if(s){const d=new Date(s);if(l<d){const u=d.toLocaleDateString();a.push(c("minDateValidation",`Date must be after ${u}`,[u]))}}if(n){const d=new Date(n);if(l>d){const u=d.toLocaleDateString();a.push(c("maxDateValidation",`Date must be before ${u}`,[u]))}}}return a.length||(a=null),o?o({value:this.getValue(),cellEditorParams:t,internalErrors:a}):a}getValue(){const{params:e,eEditor:t}=this,r=this.formatDate(t.getDate());return le(r)||le(e.value)?e.parseValue(r??""):e.value}getStartValue(){return gi(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):ni(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):gi(e??null,this.includeTime??!1)??void 0}},a4={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},c4={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},d4=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return c4}getAgComponents(){return[x2]}init(e,t){this.eEditor=e,this.params=t;const{max:r,min:i,precision:s,step:n}=t;null!=r&&e.setMax(r),null!=i&&e.setMin(i),null!=s&&e.setPrecision(s),null!=n&&e.setStep(n);const o=e.getInputElement();t.preventStepping?e.addManagedElementListeners(o,{keydown:this.preventStepping}):t.showStepperButtons&&o.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:r,getValidationErrors:i}=e,n=this.eEditor.getInputElement().valueAsNumber,o=this.getLocaleTextFunc();let a=[];return"number"==typeof n&&(null!=t&&n<t&&a.push(o("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),null!=r&&n>r&&a.push(o("maxValueValidation",`Must be less than or equal to ${r}.`,[String(r)]))),a.length||(a=null),i?i({value:n,cellEditorParams:e,internalErrors:a}):a}preventStepping(e){(e.key===U_UP||e.key===U_DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,r=e.getValue();if(!le(r)&&!le(t.value))return t.value;let i=t.parseValue(r);if(null==i)return i;if("string"==typeof i){if(""===i)return null;i=Number(i)}return isNaN(i)?null:i}getStartValue(){return this.params.value}setCaret(){Ys()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},h4={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},g4={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},p4=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return g4}getAgComponents(){return[Ul]}init(e,t){this.eEditor=e,this.params=t;const r=t.maxLength;null!=r&&e.setMaxLength(r)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:r}=e,i=this.getValue(),s=this.getLocaleTextFunc();let n=[];return null!=t&&"string"==typeof i&&i.length>t&&n.push(s("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),r?r({value:i,cellEditorParams:e,internalErrors:n}):n}getValue(){const{eEditor:e,params:t}=this,r=e.getValue();return le(r)||le(t.value)?t.parseValue(r):t.value}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){Ys()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),r=le(t)&&t.length||0;r&&e.getInputElement().setSelectionRange(r,r)}},ev=class extends Rc{constructor(){super(new p4(()=>this.getLocaleTextFunc()))}};function tv(e,t,r="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,r),"ensureVisible")}function rv(e,t,r){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,r),"ensureVisible")}var P4={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},D4=class extends Hd{constructor(e){super(P4),this.params=e}postConstruct(){Tn(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params;this.addManagedElementListeners(e,{keydown:i=>{bu(this.gos,i,t.node,t.column,!0)||t.onKeyDown(i)}})}};function Rh(e,{rowNode:t,column:r},i="ui"){const s=r.getColDef().editable,n=e.editModelSvc;return r.isColumnFunc(t,s)||!!n&&n.hasEdits({rowNode:t,column:r},{withOpenEditor:!0})}var kc=(e,t=!1)=>{if(void 0!==e)return ks(e)||t&&"editing"===e.state};function iv(e,t,r=!1){return kc(e.editModelSvc?.getEdit(t),r)}var sv=(e,t,r)=>{if(e)for(let i=0,s=e.length;i<s;++i){const n=e[i];if(n.data&&(kc(t?.getEdit({rowNode:n,column:r}))||kc(t?.getEdit({rowNode:n.pinnedSibling,column:r})))||sv(n.childrenAfterGroup,t,r))return!0}};function nv(e,t){const{column:r,rowNode:i}=t;return!(e.gos.get("groupTotalRow")&&!i?.footer)&&sv(i?.childrenAfterGroup,e.editModelSvc,r)}function ov(e,{rowNode:t,column:r}){if(t=t.pinnedSibling)return kc(e.editModelSvc?.getEdit({rowNode:t,column:r}))}var _4=class extends Q{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){const{cellCtrl:e,editSvc:t,beans:r}=this;if(t?.isBatchEditing()&&t.isEditing()){const s=iv(r,e)||nv(r,e)||ov(r,e);this.applyBatchingStyle(s)}else this.applyBatchingStyle(!1);const i=!!this.editModelSvc?.getCellValidationModel().hasCellValidation(this.cellCtrl);this.cellComp.toggleCss("ag-cell-editing-error",i)}applyBatchingStyle(e){this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&this.editSvc?.isBatchEditing())??!1)}},L4=class extends Q{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){const{rowCtrl:e,editModelSvc:t,beans:r}=this;let i=e.rowNode,s=t?.getEditRow(i);const n=this.editModelSvc?.getRowValidationModel().hasRowValidation({rowNode:i});if(!s&&i.pinnedSibling&&(i=i.pinnedSibling,s=t?.getEditRow(i)),s){const o=Array.from(s.keys()).some(a=>{const l={rowNode:i,column:a};return iv(r,l,!0)||nv(r,l)||ov(r,l)});return void this.applyStyle(n,o)}this.applyStyle(n)}applyStyle(e=!1,t=!1){const r=this.editSvc?.isBatchEditing()??!1,i="fullRow"===this.gos.get("editType");this.rowCtrl?.forEachGui(void 0,({rowComp:s})=>{s.toggleCss("ag-row-editing",i&&t),s.toggleCss("ag-row-batch-edit",i&&t&&r),s.toggleCss("ag-row-inline-editing",t),s.toggleCss("ag-row-not-inline-editing",!t),s.toggleCss("ag-row-editing-invalid",i&&t&&e)})}},H4=new Set(["undo","redo","paste","bulk","rangeSvc"]),G4=new Set(["ui","api"]),av={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},V4=new Set(Object.keys(av)),z4=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),Tc={cancel:!0,source:"api"},W4={cancel:!1,source:"api"},Bo={checkSiblings:!0},Ba={force:!0,suppressFlash:!0};function $4(e){return{rowNodes:e?Array.from(e.keys()):void 0,columns:e?[...new Set(Array.from(e.values()).flatMap(t=>Array.from(t.keys())))]:void 0}}function lv(e,t){return t??e.get("editType")??"singleCell"}var cv=class extends Q{postConstruct(){this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:this.onCellFocusChanged?.bind(this),cellFocusCleared:this.onCellFocusChanged?.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const r=e.previousParams,{editSvc:i,beans:s}=this,n="cellFocused"===e.type?e.sourceEvent:null;r&&(t=zt(s,r));const{gos:o,editModelSvc:a}=s,l="cellFocusCleared"===e.type;if(i.isEditing(void 0,{withOpenEditor:!0})){const{column:c,rowIndex:d,rowPinned:u}=e,h={column:c,rowNode:Rs(s,{rowIndex:d,rowPinned:u})},f="block"===o.get("invalidEditValueMode");if(f)return;const p=!f,g=!!a?.getCellValidationModel().hasCellValidation(h);!r&&!l||i.stopEditing(void 0,{cancel:p&&g,source:l&&p?"api":void 0,event:n})||(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"}))}t?.refreshCell({suppressFlash:!0,force:!0})}stop(e,t){const r=this.model.getEditPositions(),i={all:[],pass:[],fail:[]};for(const s of r)i.all.push(s),(this.model.getCellValidationModel().getCellValidation(s)?.errorMessages?.length??0)>0?i.fail.push(s):i.pass.push(s);if(e)for(const s of r)wc(this.beans,s,{cancel:e}),this.model.stop(s);else{const s=this.processValidationResults(i);if(s.destroy.length>0)for(const n of s.destroy)wc(this.beans,n,{event:t,cancel:e}),this.model.stop(n);if(s.keep.length>0)for(const n of s.keep){const o=zt(this.beans,n);this.editSvc?.cellEditingInvalidCommitBlocks()||o&&this.editSvc.revertSingleCellEdit(o)}}return!0}cleanupEditors({rowNode:e}={},t){Hn(this.beans,{persist:!1});const r=this.model.getEditPositions(),i=[];if(e)for(const s of r)s.rowNode!==e&&i.push(s);else for(const s of r)i.push(s);Io(this.beans,i),sh(this.beans,t)}setFocusOutOnEditor(e){e.comp?.getCellEditor()?.focusOut?.()}setFocusInOnEditor(e){const t=e.comp,r=t?.getCellEditor();if(r?.focusIn)r.focusIn();else{const i="fullRow"===this.beans.gos.get("editType");e.focusCell(i),e.onEditorAttachedFuncs.push(()=>t?.getCellEditor()?.focusIn?.())}}setupEditors(e){const{event:t,ignoreEventKey:r=!1,startedEdit:i,position:s,cells:n=this.model.getEditPositions()}=e,o=t instanceof KeyboardEvent&&!r&&t.key||void 0;!function tT(e,t,r,i,s,n){0===t.length&&r?.rowNode&&r?.column&&Mo(e,r,{key:i,event:s,cellStartedEdit:n});const{valueSvc:o,editSvc:a,editModelSvc:l}=e,{rowNode:c,column:d}=r??{};for(const u of t){const{rowNode:h,column:f}=u,p=zt(e,u);if(!p){if(h&&f){const m=o.getValue(f,h,void 0,"api"),C=(r?.rowNode===h&&r?.column===f&&i||void 0)??a?.getCellDataValue(u,!1)??o.getValueForDisplay(f,h)?.value??m??Di;l?.setEdit(u,{pendingValue:C,sourceValue:m,state:"editing"})}continue}const g=n&&c===p.rowNode&&p.column===d;Mo(e,{rowNode:c,column:p.column},{key:g?i:null,event:g?s:null,cellStartedEdit:g&&n})}}(this.beans,n,s,o,t,i)}dispatchCellEvent(e,t,r,i){const s=zt(this.beans,e);s&&this.eventSvc.dispatchEvent({...s.createEvent(t??null,r),...i})}dispatchRowEvent(e,t,r){if(r)return;const i=rh(this.beans,e);i&&this.eventSvc.dispatchEvent(i.createRowEvent(t))}shouldStop(e,t,r="ui"){const i=this.editSvc.isBatchEditing();return!(!i||"api"!==r)||(!i||"ui"!==r&&"edit"!==r)&&("api"===r||(t instanceof KeyboardEvent&&!i?"Enter"===t.key:null))}shouldCancel(e,t,r="ui"){const i=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!i&&"Escape"===t.key||i&&"api"===r||"api"===r)}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const r=[];if(e.forEach((i,s)=>{i.forEach((n,o)=>{"editing"===n.state&&r.push({...n,rowNode:s,column:o})})}),t?.update&&(e=new Map([...this.model.getEditMap(),...e])),this.model?.setEditMap(e),r.length>0){const i=r.at(-1);this.start({position:i,event:new KeyboardEvent("keydown",{key:i.pendingValue===Di?void 0:i.pendingValue}),source:"api"});const n=zt(this.beans,i);n&&this.setFocusInOnEditor(n)}}destroy(){this.cleanupEditors(),super.destroy()}},nn={moduleName:"EditCore",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new pm,this.rowValidations=new mm,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;const r=this.getEditRow(e);t?r.delete(t):r.clear(),0===r.size&&this.edits.delete(e)}getEditRow(e,t={}){if(this.suspendEdits||0===this.edits.size)return;const r=e&&this.edits.get(e);if(r)return r;if(t.checkSiblings){const i=e.pinnedSibling;if(i)return this.getEditRow(i)}}getEditRowDataValue(e,{checkSiblings:t}={}){if(!e||0===this.edits.size)return;const r=this.getEditRow(e),i=e.pinnedSibling,s=t&&i&&this.getEditRow(i);if(!r&&!s)return;const n=Object.assign({},e.data),o=(a,l)=>a.forEach(({pendingValue:c},d)=>{c!==Di&&(l[d.getColId()]=c)});return r&&o(r,n),s&&o(s,n),n}getEdit(e,t){const r=this._getEdit(e);return t&&r?{...r}:r}_getEdit(e){if(!this.suspendEdits&&0!==this.edits.size)return e.rowNode&&e.column&&this.getEditRow(e.rowNode)?.get(e.column)}getEditMap(e=!0){if(this.suspendEdits||0===this.edits.size)return new Map;if(!e)return this.edits;const t=new Map;return this.edits.forEach((r,i)=>{const s=new Map;r.forEach(({editorState:n,...o},a)=>s.set(a,{...o})),t.set(i,s)}),t}setEditMap(e){this.edits.clear(),e.forEach((t,r)=>{const i=new Map;t.forEach((s,n)=>i.set(n,{...s})),this.edits.set(r,i)})}setEdit(e,t){(0===this.edits.size||!this.edits.has(e.rowNode))&&this.edits.set(e.rowNode,new Map);const r=this._getEdit(e),i=Object.assign({editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0},...r,...t});return this.getEditRow(e.rowNode).set(e.column,i),i}clearEditValue(e){const{rowNode:t,column:r}=e;if(t)if(r){const i=this._getEdit(e);i&&(i.editorValue=void 0,i.pendingValue=i.sourceValue,i.state="changed")}else this.getEditRow(t)?.forEach(i=>{i.editorValue=void 0,i.pendingValue=i.sourceValue,i.state="changed"})}getState(e){if(!this.suspendEdits)return this.getEdit(e)?.state}getEditPositions(e){if(this.suspendEdits||0===(e??this.edits).size)return[];const t=[];return(e??this.edits).forEach((r,i)=>{for(const s of r.keys()){const{editorState:n,...o}=r.get(s);t.push({rowNode:i,column:s,...o})}}),t}hasRowEdits(e,t){return!this.suspendEdits&&0!==this.edits.size&&!!this.getEditRow(e,t)}hasEdits(e={},t={}){if(this.suspendEdits||0===this.edits.size)return!1;const{rowNode:r,column:i}=e,{withOpenEditor:s}=t;if(r){const n=this.getEditRow(r,t);return!!n&&(i?s?"editing"===this.getEdit(e)?.state:n.has(i)??!1:0!==n.size&&(!s||Array.from(n.values()).some(({state:o})=>"editing"===o)))}return s?this.getEditPositions().some(({state:n})=>"editing"===n):this.edits.size>0}start(e){const t=this.getEditRow(e.rowNode)??new Map,{rowNode:r,column:i}=e;i&&!t.has(i)&&t.set(i,{editorValue:void 0,pendingValue:Di,sourceValue:this.beans.valueSvc.getValue(i,r,!1,"api"),state:"editing",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}}),this.edits.set(r,t)}stop(e){this.hasEdits(e)&&(e?this.removeEdits(e):this.clear())}clear(){for(const e of this.edits.values())e.clear();this.edits.clear()}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(e){this.cellValidations=e}setRowValidationModel(e){this.rowValidations=e}destroy(){super.destroy(),this.clear()}},class extends Q{constructor(){super(...arguments),this.beanName="editSvc",this.batch=!1,this.stopping=!1,this.committing=!1}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:i})=>{this.stopEditing(void 0,Tc),this.createStrategy(i)});const t=(e=>()=>{const t=new Set(e.colModel.getCols()),r=e.editModelSvc.getEditMap(!0),i=new Set(r.keys());(({editModelSvc:e},t,r)=>{for(const i of t)e?.getEditRow(i)?.forEach((s,n)=>!r.has(n)&&e.removeEdits({rowNode:i,column:n}))})(e,(({rowModel:e,pinnedRowModel:t,editModelSvc:r},i)=>{const s=new Set;e.forEachNode(n=>i.has(n)&&s.add(n)),t?.forEachPinnedRow("top",n=>i.has(n)&&s.add(n)),t?.forEachPinnedRow("bottom",n=>i.has(n)&&s.add(n));for(const n of i)s.has(n)||r.removeEdits({rowNode:n});return s})(e,i),t)})(e),r=()=>{const i=this.model.getCellValidationModel().getCellValidationMap().size>0,s=this.model.getRowValidationModel().getRowValidationMap().size>0;return i||s?this.stopEditing(void 0,Tc):this.isEditing()&&(this.isBatchEditing()?Io(e,this.model.getEditPositions()):this.stopEditing(void 0,W4)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:r,filterChanged:r,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}setBatchEditing(e){e?(this.batch=!0,this.stopEditing(void 0,Tc)):(this.stopEditing(void 0,Tc),this.batch=!1)}createStrategy(e){const{beans:t,gos:r,strategy:i}=this,s=lv(r,e);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,r,i="ui"){const s=function A4(e,{column:t},r,i,s="ui"){if(r instanceof KeyboardEvent&&("Tab"===r.key||"Enter"===r.key||"F2"===r.key||"Backspace"===r.key&&i))return!0;if(r?.shiftKey&&0!=e.rangeSvc?.getCellRanges().length)return!1;const o=t?.getColDef(),a=function M4(e,t){return!0===e.get("suppressClickEdit")?0:!0===e.get("singleClickEdit")||t?.singleClickEdit?1:2}(e.gos,o),l=r?.type;return"click"===l&&1===r?.detail&&1===a||"dblclick"===l&&2===r?.detail&&2===a||"api"===s&&(i??!1)}(this.beans,e,t,r,i);return s&&(this.strategy??(this.strategy=this.createStrategy())),s}shouldStopEditing(e,t,r="ui"){return this.strategy?.shouldStop(e,t,r)??null}shouldCancelEditing(e,t,r="ui"){return this.strategy?.shouldCancel(e,t,r)??null}validateEdit(){return function nT(e){Gn(e,!0);const t=e.editModelSvc?.getCellValidationModel().getCellValidationMap();if(!t)return null;const r=[];return t.forEach((i,s)=>{i.forEach(({errorMessages:n},o)=>{r.push({column:o,rowIndex:s.rowIndex,rowPinned:s.rowPinned,messages:n??null})})}),r}(this.beans)}isEditing(e,t){return this.model.hasEdits(e,t??Bo)}isRowEditing(e,t){return(e&&this.model.hasRowEdits(e,t))??!1}startEditing(e,t){const{startedEdit:r=!0,event:i=null,source:s="ui",ignoreEventKey:n=!1,silent:o}=t;if(this.strategy??(this.strategy=this.createStrategy()),!this.isCellEditable(e,"api"))return;const a=zt(this.beans,e);if(a&&!a.comp)return void a.onCompAttachedFuncs.push(()=>this.startEditing(e,t));const l=this.shouldStartEditing(e,i,r,s);!1!==l||"api"===s?(!this.batch&&this.shouldStopEditing(e,void 0,s)&&!t.continueEditing&&this.stopEditing(void 0,{source:s}),l&&this.isBatchEditing()&&this.dispatchBatchEvent("batchEditingStarted",new Map),this.strategy.start({position:e,event:i,source:s,ignoreEventKey:n,startedEdit:r,silent:o})):this.isEditing(e)&&this.stopEditing()}stopEditing(e,t){const{event:r,cancel:i,source:s="ui",forceCancel:n,forceStop:o}=t||{},{beans:a,model:l}=this;if(V4.has(s)&&this.isBatchEditing())return this.bulkRefresh(e),!1;const c=this.committing?av[s]:s;if(!(this.committing||this.isEditing(e)||this.isBatchEditing()&&l.hasEdits(e,Bo))||!this.strategy||this.stopping)return!1;this.stopping=!0;const u=zt(a,e);u&&(u.onEditorAttachedFuncs=[]);let h=l.getEditMap(!0),f=!1;const p=!i&&(!!this.shouldStopEditing(e,r,c)||this.committing&&!this.batch)||(o??!1),g=i&&!!this.shouldCancelEditing(e,r,c)||(n??!1);if(p||g){Hn(a,{persist:!0,isCancelling:g||i,isStopping:p});const m=l.getEditMap(),v=this.processEdits(m,i,s);this.strategy?.stop(i,r);for(const w of v)l.clearEditValue(w);this.bulkRefresh(void 0,h);for(const w of l.getEditPositions(m)){const C=zt(a,w),y=ks(w);C?.refreshCell({force:!0,suppressFlash:!y})}h=m,f||(f=p)}else if(r instanceof KeyboardEvent&&this.batch&&this.strategy?.midBatchInputsAllowed(e)&&this.isEditing(e,{withOpenEditor:!0})){const{key:m}=r,v="Enter"===m,w="Escape"===m,C="Tab"===m;(v||C||w)&&(v||C?Hn(a,{persist:!0}):w&&this.revertSingleCellEdit(u),this.isBatchEditing()?this.strategy?.cleanupEditors():Io(a,l.getEditPositions(),{event:r,cancel:w}),r.preventDefault(),this.bulkRefresh(e,h,{suppressFlash:!0}),h=l.getEditMap())}else Hn(a,{persist:!0}),h=l.getEditMap();return f&&e&&this.model.removeEdits(e),this.navigateAfterEdit(t,u?.cellPosition),sh(a),this.model.hasEdits()||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap()),this.bulkRefresh(),g&&this.beans.rowRenderer.refreshRows({rowNodes:Array.from(h.keys())}),this.isBatchEditing()&&(this.beans.rowRenderer.refreshRows({suppressFlash:!0,force:!0}),f&&p&&this.dispatchBatchEvent("batchEditingStopped",h)),this.stopping=!1,f}navigateAfterEdit(e,t){if(!e||!t)return;const{event:r,suppressNavigateAfterEdit:i}=e;if(!(r instanceof KeyboardEvent)||i)return;const{key:n,shiftKey:o}=r,a=this.gos.get("enterNavigatesVerticallyAfterEdit");if("Enter"!==n||!a)return;const l=o?U_UP:U_DOWN;this.beans.navigation?.navigateToNextCell(null,l,t,!1)}processEdits(e,t=!1,r){const i=Array.from(e.keys()),s=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,n=[];for(const o of i){const a=e.get(o);for(const l of a.keys()){const c=a.get(l),d={rowNode:o,column:l},u=ks(c);!t&&u&&!s&&(this.setNodeDataValue(o,l,c.pendingValue,void 0,r)||n.push(d))}}return n}setNodeDataValue(e,t,r,i,s="edit"){const{beans:n}=this,o=zt(n,{rowNode:e,column:t}),a=G4.has(s)?"edit":s;o&&(o.suppressRefreshCell=!0),this.commitNextEdit();const l=e.setDataValue(t,r,a);return o&&(o.suppressRefreshCell=!1),i&&o?.refreshCell(Ba),l}setEditMap(e,t){this.strategy??(this.strategy=this.createStrategy()),this.strategy?.setEditMap(e,t),this.bulkRefresh();let r=Ba;t?.forceRefreshOfEditCellsOnly&&(r={...$4(e),...Ba}),this.beans.rowRenderer.refreshCells(r)}dispatchEditValuesChanged({rowNode:e,column:t},r={}){if(!e||!t||!r)return;const{pendingValue:i,sourceValue:s}=r,{rowIndex:n,rowPinned:o,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:n,rowPinned:o,column:t,source:"api",data:a,newValue:i,oldValue:s,value:i,colDef:t.getColDef()})}bulkRefresh(e={},t,r={}){const{beans:i,gos:s}=this,{editModelSvc:n}=i;rr(s)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),r):t&&n?.getEditMap(!1)?.forEach((a,l)=>{for(const c of a.keys())this.refCell({rowNode:l,column:c},a.get(c),r)}))}refCell({rowNode:e,column:t},r,i={}){const{beans:s,gos:n}=this,o=new Set([e]),a=new Set,l=e.pinnedSibling;l&&o.add(l);const c=e.sibling;c&&a.add(c);let d=e.parent;for(;d;)d.sibling?.footer&&n.get("groupTotalRow")||!d.parent&&d.sibling&&n.get("grandTotalRow")?a.add(d.sibling):a.add(d),d=d.parent;for(const u of o)this.dispatchEditValuesChanged({rowNode:u,column:t},r);for(const u of o)zt(s,{rowNode:u,column:t})?.refreshCell(i);for(const u of a)zt(s,{rowNode:u,column:t})?.refreshCell(i)}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{rowNode:r}=e,{gos:i,beans:s}=this;if(r.group)if(i.get("treeData")){if(!r.data&&!i.get("enableGroupEdit"))return!1}else if(!i.get("enableGroupEdit"))return!1;const n="fullRow"===lv(i)?function I4(e,t,r="ui"){const i=Rh(e,t,r);return!0===i||"ui"===r?i:e.colModel.getCols().some(n=>Rh(e,{rowNode:t.rowNode,column:n},r))}(s,e,t):Rh(s,e,t);return n&&(this.strategy??(this.strategy=this.createStrategy())),n}cellEditingInvalidCommitBlocks(){return"block"===this.gos.get("invalidEditValueMode")}checkNavWithValidation(e,t,r=!0){if(this.hasValidationErrors(e)){const i=zt(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),r&&(!i?.hasBrowserFocus()&&i?.focusCell(),i?.comp?.getCellEditor()?.focusIn?.()),"block-stop"):(i&&this.revertSingleCellEdit(i),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){const r=zt(this.beans,e);r?.comp?.getCellEditor()&&(Io(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),Mo(this.beans,e,{silent:!0}),Gn(this.beans),r?.refreshCell(Ba),t&&(r?.focusCell(),r?.comp?.getCellEditor()?.focusIn?.()))}hasValidationErrors(e){Gn(this.beans);const t=zt(this.beans,e);t&&(t.refreshCell(Ba),t.rowCtrl.rowEditStyleFeature?.applyRowStyles());let r=!1;return e?.rowNode?(r||(r=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(r||(r=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(r||(r=this.model.getCellValidationModel().getCellValidationMap().size>0),r||(r=this.model.getRowValidationModel().getRowValidationMap().size>0)),r}moveToNextCell(e,t,r,i="ui"){let s;const n=this.isEditing(),o=n&&"block-stop"===this.checkNavWithValidation(void 0,r);return e instanceof _o&&n&&(s=this.strategy?.moveToNextEditingCell(e,t,r,i,o)),null===s||(s=s||!!this.beans.focusSvc.focusedHeader,!1===s&&!o&&this.stopEditing()),s}getCellDataValue({rowNode:e,column:t},r=!0){if(!e||!t)return;let i=this.model.getEdit({rowNode:e,column:t});const s=e.pinnedSibling;if(s){const o=this.model.getEdit({rowNode:s,column:t});o&&(i=o)}const n=r?i?.editorValue??i?.pendingValue:i?.pendingValue;return n!==Di&&i?n:i?.sourceValue??this.valueSvc.getValue(t,e,!1,"api")}addStopEditingWhenGridLosesFocus(e){!function Zk(e,t,r){const{gos:i,popupSvc:s}=t;if(!i.get("stopEditingWhenCellsLoseFocus"))return;const n=o=>{const a=o.relatedTarget;if(null===Kd(a))return void vm(t);let l=r.some(c=>c.contains(a))&&i.isElementInThisInstance(a);l||(l=!!s&&(s.getActivePopups().some(c=>c.contains(a))||s.isElementWithinCustomPopup(a))),l||vm(t)};for(const o of r)e.addManagedElementListeners(o,{focusout:n})}(this,this.beans,e)}createPopupEditorWrapper(e){return new D4(e)}commitNextEdit(){this.committing=!0}setDataValue(e,t,r){try{if((!this.isEditing()||this.committing)&&!z4.has(r))return;const{beans:i}=this;this.strategy??(this.strategy=this.createStrategy());const s=this.isBatchEditing()?"ui":this.committing?r??"api":"api";if(!r||H4.has(r))return Cc(i,e,t,0,void 0,{persist:!0}),this.setNodeDataValue(e.rowNode,e.column,t,!0,r);const n=this.model.getEdit(e);if(n){if(n.pendingValue===t)return!1;if(n.sourceValue!==t)return Cc(i,e,t,0,void 0,{persist:!0}),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0;if(n.sourceValue===t)return i.editModelSvc?.removeEdits(e),this.dispatchEditValuesChanged(e,{...n,pendingValue:t}),!0}return Cc(i,e,t,0,void 0,{persist:!0}),this.stopEditing(e,{source:s,suppressNavigateAfterEdit:!0}),!0}finally{this.committing=!1}}handleColDefChanged(e){!function rT(e,t){const r=t.comp?.getCellEditor();if(!r?.refresh)return;const{eventKey:i,cellStartedEdit:s}=t.editCompDetails.params,{column:n}=t,o=xm(e,t,i,s),a=n.getColDef(),l=fp(e.userCompFactory,a,o);r.refresh(Sm(l.params,i))}(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){if(!this.batch||!this.model.hasRowEdits(e.rowNode,Bo))return;const{rowNode:i,column:s}=e,{compDetails:n,valueToDisplay:o}=t;if(n){const{params:l}=n;return l.data=this.model.getEditRowDataValue(i,Bo),{compDetails:n}}const a=this.model.getEditRow(e.rowNode,Bo);return void 0!==o&&a?.has(s)?{valueToDisplay:this.valueSvc.getValue(s,i)}:void 0}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,r,i){this.strategy?.dispatchCellEvent(e,t,r,i)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return _e(this.gos,{type:e,..."batchEditingStopped"===e?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},r){if(!r||0===r.length)return;const{beans:i,rangeSvc:s,valueSvc:n}=this;Hn(i,{persist:!0});const o=this.model.getEditMap(!0),a=o.get(e)?.get(t)?.pendingValue;this.batch||this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),r.forEach(c=>{if(s?.forEachRowInRange(c,d=>{const u=Rs(i,d);if(void 0===u)return;const h=o.get(u)??new Map;for(const f of c.columns)if(f&&this.isCellEditable({rowNode:u,column:f},"api")){const p=n.getValue(f,u,!0,"api");let g=n.parseValue(f,u??null,a,p);Number.isNaN(g)&&(g=null),h.set(f,{editorValue:void 0,pendingValue:g,sourceValue:p,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}h.size>0&&o.set(u,h)}),this.setEditMap(o),this.batch)return this.cleanupEditors(),sh(i),void this.bulkRefresh();this.commitNextEdit(),this.stopEditing(void 0,{source:"bulk"}),this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(o)})}),this.bulkRefresh();const l=zt(i,{rowNode:e,column:t});l&&l.focusCell(!0)}createCellStyleFeature(e,t){return new _4(e,t)}createRowStyleFeature(e,t){return new L4(e,t)}setEditingCells(e,t){const{beans:r}=this,{colModel:i,valueSvc:s}=r,n=new Map;for(let{colId:o,column:a,colKey:l,rowIndex:c,rowPinned:d,newValue:u,state:h}of e){const f=o?i.getCol(o):l?i.getCol(l):a;if(!f)continue;const p=Rs(r,{rowIndex:c,rowPinned:d});if(!p)continue;const g=s.getValue(f,p,!0,"api");if(!t?.forceRefreshOfEditCellsOnly&&!ks({pendingValue:u,sourceValue:g})&&"editing"!==h)continue;let m=n.get(p);m||(m=new Map,n.set(p,m)),void 0===u&&(u=Di),m.set(f,{editorValue:void 0,pendingValue:u,sourceValue:g,state:h??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(n,t)}onCellFocused(e){const t=zt(this.beans,e);if(!t||!this.isEditing(t,Bo))return;const r=this.model.getEdit(t);if(!r||!ks(r))return;const s=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue(s,"pendingChange")}allowedFocusTargetOnValidation(e){return zt(this.beans,e)}}],apiFunctions:{getEditingCells:function b4(e){const t=e.editModelSvc?.getEditMap(),r=[];return t?.forEach((i,s)=>{const{rowIndex:n,rowPinned:o}=s;i.forEach((a,l)=>{const{editorValue:c,pendingValue:d,sourceValue:u,state:h}=a,f=ks(a);let p=c??d;p===Di&&(p=void 0);const g={newValue:p,oldValue:u,state:h,column:l,colId:l.getColId(),colKey:l.getColId(),rowIndex:n,rowPinned:o};("editing"===h||"changed"===h&&f)&&r.push(g)})}),r},getEditRowValues:function S4(e,t){return e.editModelSvc?.getEditRowDataValue(t,{checkSiblings:!0})},getCellEditorInstances:(e,t={})=>Cm(e,t).map(r=>r.editor),startEditingCell:function F4(e,t){const{key:r,colKey:i,rowIndex:s,rowPinned:n}=t,{editSvc:o,colModel:a}=e,l=a.getCol(i);if(!l)return void ne(12,{colKey:i});const d=Rs(e,{rowIndex:s,rowPinned:n||null,column:l});d?l.isCellEditable(d)&&(null==n&&rv(e,s),tv(e,i),o?.startEditing({rowNode:d,column:l},{event:r?new KeyboardEvent("keydown",{key:r}):void 0,source:"api"})):ne(290,{rowIndex:s,rowPinned:n})},stopEditing:function y4(e,t=!1){const{editSvc:r}=e;if(r?.isBatchEditing()){if(t)for(const i of e.editModelSvc?.getEditPositions()??[])"editing"===i.state&&r.revertSingleCellEdit(i);else Hn(e,{persist:!0});Io(e,void 0,{cancel:t})}else r?.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})},isEditing:function E4(e,t){const r=zt(e,t);return e.editSvc?.isEditing(r)??!1},validateEdit:function R4(e){return e.editSvc?.validateEdit()||null}},dynamicBeans:{singleCell:class extends cv{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,r="ui"){const i=super.shouldStop(e,t,r);if(null!==i)return i;const{rowNode:s,column:n}=e||{};return this.rowNode&&this.column||!s||!n?this.rowNode!==s||this.column!==n:null}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:r,event:i,ignoreEventKey:s}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:r,event:i,ignoreEventKey:s})}dispatchRowEvent(e,t,r){}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:r}=this.beans,{rowIndex:i,column:s,rowPinned:n}=e,o=Rs(this.beans,{rowIndex:i,rowPinned:n}),a=ih(s),l=t.getCol(a),c=e.previousParams;if(c){const d=ih(c.column);if(c?.rowIndex===i&&d===a&&c?.rowPinned===n)return}r?.isEditing({rowNode:o,column:l},{withOpenEditor:!0})&&"cellFocused"===e.type||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,r,i="ui",s=!1){const n=this.beans.focusSvc.getFocusedCell();n&&(e=Do(this.beans,n)??e);const o=e.cellPosition;let a;const l="fullRow"===this.beans.gos.get("editType");l&&this.model.suspend(!0),s||(e.eGui.focus(),this.editSvc?.stopEditing(e,{source:this.editSvc?.isBatchEditing()?"ui":"api",event:r}));try{a=this.beans.navigation?.findNextCellToFocusOn(o,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(!1===a)return null;if(null==a)return!1;const c=a.cellPosition,d=e.isCellEditable(),u=a.isCellEditable(),h=c&&o.rowIndex===c.rowIndex&&o.rowPinned===c.rowPinned;d&&!s&&this.setFocusOutOnEditor(e);const f=this.gos.get("suppressStartEditOnTab");if(!h&&!s&&(super.cleanupEditors(a,!0),f?a.focusCell(!0,r):this.editSvc.startEditing(a,{startedEdit:!0,event:r,source:i,ignoreEventKey:!0})),u&&!s){if(a.focusCell(!1,r),f)a.focusCell(!0,r);else if(!a.comp?.getCellEditor()){const p=this.editSvc?.isEditing(a,{withOpenEditor:!0});Mo(this.beans,a,{event:r,cellStartedEdit:!0,silent:p}),this.setFocusInOnEditor(a),this.cleanupEditors(a)}}else u&&s&&this.setFocusInOnEditor(a),a.focusCell(!0,r);return e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},fullRow:class extends cv{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=[]}shouldStop(e,t,r="ui"){const{rowNode:i}=e||{};if(!rh(this.beans,{rowNode:this.rowNode}))return!0;const n=super.shouldStop({rowNode:this.rowNode},t,r);return null!==n?n:!!this.rowNode&&i!==this.rowNode}midBatchInputsAllowed({rowNode:e}){return!!e&&this.model.hasEdits({rowNode:e})}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:r,startedEdit:i,event:s,ignoreEventKey:n}=e,{rowNode:o}=t;this.rowNode!==o&&super.cleanupEditors(t);const a=this.beans.visibleCols.allCols,l=[],c=[];for(const d of a)d.isCellEditable(o)&&c.push(d);if(0!=c.length){this.dispatchRowEvent({rowNode:o},"rowEditingStarted",r),this.startedRows.push(o);for(const d of c){const u={rowNode:o,column:d};l.push(u),this.model.hasEdits(u)||this.model.start(u)}this.rowNode=o,this.setupEditors({cells:l,position:t,startedEdit:i,event:s,ignoreEventKey:n})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){const{rowNode:r}=this;if(r&&!this.model.hasRowEdits(r))return!1;const i=[];if(e||this.model.getEditMap().forEach((s,n)=>{if(s&&0!==s.size)for(const o of s.values())if(ks(o)){i.push(n);break}}),Gn(this.beans),!e&&"block-stop"===this.editSvc?.checkNavWithValidation({rowNode:r}))return!1;super.stop(e,t);for(const s of i)this.dispatchRowEvent({rowNode:s},"rowValueChanged");return this.cleanupEditors({rowNode:r},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,r=e.previousParams;if(r?.rowIndex===t||e.sourceEvent instanceof KeyboardEvent)return;const i=zt(this.beans,r);"block"===this.gos.get("invalidEditValueMode")&&i&&(this.model.getCellValidationModel().getCellValidation(i)||this.model.getRowValidationModel().getRowValidation(i))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);for(const r of this.startedRows)this.dispatchRowEvent({rowNode:r},"rowEditingStopped");this.startedRows.length=0}moveToNextEditingCell(e,t,r,i="ui",s=!1){const n=e.cellPosition;let o;this.model.suspend(!0);try{o=this.beans.navigation?.findNextCellToFocusOn(n,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{this.model.suspend(!1)}if(!1===o)return null;if(null==o)return!1;const a=o.cellPosition,l=e.isCellEditable(),c=o.isCellEditable(),d=a&&n.rowIndex===a.rowIndex&&n.rowPinned===a.rowPinned;l&&this.setFocusOutOnEditor(e),this.restoreEditors();const u=this.gos.get("suppressStartEditOnTab");return c&&!s?u?o.focusCell(!0,r):(o.comp?.getCellEditor()||Mo(this.beans,o,{event:r,cellStartedEdit:!0}),this.setFocusInOnEditor(o),o.focusCell(!1,r)):(c&&s&&this.setFocusInOnEditor(o),o.focusCell(!0,r)),!d&&!s&&(this.editSvc?.stopEditing({rowNode:e.rowNode},{event:r}),this.cleanupEditors(o,!0),u?o.focusCell(!0,r):this.editSvc.startEditing(o,{startedEdit:!0,event:r,source:i,ignoreEventKey:!0})),e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){this.model.getEditMap().forEach((e,t)=>e.forEach(({state:r},i)=>{if("editing"!==r)return;const s=zt(this.beans,{rowNode:t,column:i});s&&!s.comp?.getCellEditor()&&Mo(this.beans,s,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}}},dependsOn:[yc,Jm],css:[".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) textarea{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}"]},q4={moduleName:"UndoRedoEdit",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},r=null!==this.activeCellEdit&&_0(this.activeCellEdit,t),i=null!==this.activeRowEdit&&function cE(e,t){return!e&&!t||!(e&&!t||!e&&t)&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}(this.activeRowEdit,t);if(!(r||i||this.isPasting||this.isRangeInAction))return;const{rowPinned:n,rowIndex:o,column:a,oldValue:l,value:c}=e,d={rowPinned:n,rowIndex:o,columnId:a.getColId(),newValue:c,oldValue:l};this.cellValueChanges.push(d)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const r=e.get("undoRedoCellEditingLimit");if(r<=0)return;this.undoStack=new Zm(r),this.redoStack=new Zm(r),this.addListeners();const i=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:s=>{s.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:i,newColumnsLoaded:i,columnGroupOpened:i,columnRowGroupChanged:i,columnMoved:i,columnPinned:i,columnVisible:i,rowDragEnd:i}),t.whenReady(this,s=>{this.gridBodyCtrl=s.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){const{eventSvc:t,undoStack:r,redoStack:i}=this;t.dispatchEvent({type:"undoStarted",source:e});const s=this.undoRedo(r,i,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:s})}redo(e){const{eventSvc:t,undoStack:r,redoStack:i}=this;t.dispatchEvent({type:"redoStarted",source:e});const s=this.undoRedo(i,r,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:s})}undoRedo(e,t,r,i,s){if(!e)return!1;const n=e.pop();return!!n?.cellValueChanges&&(this.processAction(n,o=>o[i],s),n instanceof Fh?this.processRange(n.ranges||[n[r]]):this.processCell(n.cellValueChanges),t.push(n),!0)}processAction(e,t,r){for(const i of e.cellValueChanges){const{rowIndex:s,rowPinned:n,columnId:o}=i,l=Rs(this.beans,{rowIndex:s,rowPinned:n});l.displayed&&l.setDataValue(o,t(i),r)}}processRange(e){let t;const r=this.beans.rangeSvc;r.removeAllCellRanges(!0),e.forEach((i,s)=>{if(!i)return;const n=i.startRow,o=i.endRow;s===e.length-1&&(t={rowPinned:n.rowPinned,rowIndex:n.rowIndex,columnId:i.startColumn.getColId()},this.setLastFocusedCell(t)),r.addCellRange({rowStartIndex:n.rowIndex,rowStartPinned:n.rowPinned,rowEndIndex:o.rowIndex,rowEndPinned:o.rowPinned,columnStart:i.startColumn,columns:i.columns})})}processCell(e){const t=e[0],{rowIndex:r,rowPinned:i}=t,n=Rs(this.beans,{rowIndex:r,rowPinned:i});this.setLastFocusedCell({rowPinned:t.rowPinned,rowIndex:n.rowIndex,columnId:t.columnId})}setLastFocusedCell(e){const{rowIndex:t,columnId:r,rowPinned:i}=e,{colModel:s,focusSvc:n,rangeSvc:o}=this.beans,a=s.getCol(r);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const c={rowIndex:t,column:a,rowPinned:i};n.setFocusedCell({...c,forceBrowserFocus:!0}),o?.setRangeToCell(c)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new Oo(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const r=new Oo(this.cellValueChanges);this.pushActionsToUndoStack(r)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new Oo(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new Fh(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:r}=this.beans;e=t&&xs(r)?new Fh(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):new Oo(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1},batchEditingStarted:()=>this.startBigChange("batchEditing"),batchEditingStopped:({changes:e})=>this.stopBigChange("batchEditing",e),bulkEditingStarted:()=>this.startBigChange("bulkEditing"),bulkEditingStopped:({changes:e})=>this.stopBigChange("bulkEditing",e)})}startBigChange(e){this.updateBigChange(e,!0)}updateBigChange(e,t){"bulkEditing"===e?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if("bulkEditing"===e&&!this.bulkEditing||"batchEditing"===e&&!this.batchEditing||(this.updateBigChange(e,!1),0===t?.length))return;const r=new Oo(t??[]);this.pushActionsToUndoStack(r),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}}],apiFunctions:{undoCellEditing:function w4(e){e.undoRedo?.undo("api")},redoCellEditing:function x4(e){e.undoRedo?.redo("api")},getCurrentUndoSize:function k4(e){return e.undoRedo?.getCurrentUndoStackSize()??0},getCurrentRedoSize:function T4(e){return e.undoRedo?.getCurrentRedoStackSize()??0}},dependsOn:[nn]},X4={moduleName:"TextEditor",version:he,userComponents:{agCellEditor:ev,agTextCellEditor:ev},dependsOn:[nn]},Y4={moduleName:"NumberEditor",version:he,userComponents:{agNumberCellEditor:{classImp:class extends Rc{constructor(){super(new d4(()=>this.getLocaleTextFunc()))}}}},dependsOn:[nn]},Q4={moduleName:"DateEditor",version:he,userComponents:{agDateCellEditor:class extends Rc{constructor(){super(new r4(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},agDateStringCellEditor:class extends Rc{constructor(){super(new n4(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}}},dependsOn:[nn]},J4={moduleName:"CheckboxEditor",version:he,userComponents:{agCheckboxCellEditor:class extends oc{constructor(){super(ZD,[eu]),this.eEditor=ge}initialiseEditor(e){const t=e.value??void 0,r=this.eEditor;r.setValue(t),r.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(r,{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(),r=Me(t,e),i=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${i} (${r})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,r=this.getValue();return t?t({value:r,internalErrors:null,cellEditorParams:e}):null}}},dependsOn:[nn]},Z4={moduleName:"SelectEditor",version:he,userComponents:{agSelectCellEditor:class extends oc{constructor(){super(h4,[A2]),this.eEditor=ge,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:r,gos:i}=this,{values:s,value:n,eventKey:o}=e;if(pt(s))return void ne(58);this.startedByEnter=null!=o&&"Enter"===o;let a=!1;s.forEach(u=>{const h={value:u},f=r.formatValue(e.column,null,u);h.text=null!=f?f: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:c,valueListMaxHeight:d}=e;null!=l&&t.setPickerGap(l),null!=d&&t.setPickerMaxHeight(d),null!=c&&t.setPickerMaxWidth(c),"fullRow"!==i.get("editType")&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:r}=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 r?r({value:i,internalErrors:s,cellEditorParams:e}):s}}},dependsOn:[nn]},eA={moduleName:"LargeTextEditor",version:he,userComponents:{agLargeTextCellEditor:class extends oc{constructor(){super(a4,[w2]),this.eEditor=ge}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:r,eventKey:i,maxLength:s,cols:n,rows:o}=e;let a;this.focusAfterAttached=r,t.getInputElement().setAttribute("title",""),t.setMaxLength(s||200).setCols(n||60).setRows(o||10),r?(this.focusAfterAttached=!0,"Backspace"===i||"Delete"===i?a="":i&&1===i.length?a=i:(a=this.getStartValue(e),"F2"!==i&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=this.getStartValue(e)),null!=a&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){const{value:t}=e;return t?.toString()??t}onKeyDown(e){const t=e.key;(t===U_LEFT||t===U_UP||t===U_RIGHT||t===U_DOWN||e.shiftKey&&"Enter"===t)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:r}=this,i=this.getLocaleTextFunc();e.setInputAriaLabel(i("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),r&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:r}=t,i=e.getValue();return le(i)||le(r)?t.parseValue(i):r}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:r}=e,i=this.getLocaleTextFunc(),s=this.getValue();let n=[];return"string"==typeof s&&null!=t&&s.length>t&&n.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),r?r({value:s,internalErrors:n,cellEditorParams:e}):n}}},dependsOn:[nn]},tA={moduleName:"CustomEditor",version:he,dependsOn:[nn]};function No(e){return Ra(e)?e.pinnedSibling:e.footer?e.sibling:e}function dv(e,t){return(0!==e||0!==t)&&(e>0&&t>0?void 0:e>0)}function uv(e){const t=!1===e.isSelected(),r=e.childrenAfterFilter?.some(uv)??!1;return t||r}var pA={moduleName:"SharedRowSelection",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,xo(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;null!=t&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),function sS(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}(e))}createColumns(e,t){const i=e.treeDepth,n=(this.columns?.treeDepth??-1)==i,o=this.generateSelectionCols();if(function iS(e,t){return qs(e,t,(r,i)=>r.getColId()===i.getColId())}(o,this.columns?.list??[])&&n)return;(()=>{Ll(this.beans,this.columns?.tree),this.columns=null})();const{colGroupSvc:l}=this.beans,c=l?.findDepth(e.tree)??0,d=l?.balanceTreeForAutoCols(o,c)??[];this.columns={list:o,tree:d,treeDepth:c,map:{}},t(h=>{if(!h)return null;const f=h.filter(p=>!bs(p));return[...o,...f]})}updateColumns(e){const t=xo(e.source);for(const r of this.columns?.list??[]){const i=this.createSelectionColDef(e.currentValue);r.setColDef(i,null,t),$i(this.beans,{state:[{...i,colId:r.getColId()}]},t)}}getColumn(e){return this.columns?.list.find(t=>va(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:e,beans:t}=this,r=e.get("rowSelection");if("object"!=typeof r||!Rn(e))return!1;const i=(t.autoColSvc?.getColumns()?.length??0)>0;if("autoGroupColumn"===r.checkboxLocation&&i)return!1;const s=!!wo(r),n=Al(r);return s||n}createSelectionColDef(e){const{gos:t}=this,r=e??t.get("selectionColumnDef"),i=t.get("enableRtl"),{rowSpan:s,spanRows:n,...o}=r??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:i?"right":"left",comparator(a,l,c,d){const u=c.isSelected();return u===d.isSelected()?0:u?1:-1},editable:!1,suppressFillHandle:!0,pinned:null,...o,colId:_d,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const r=new Ks(e,null,t,!1);return this.createBean(r),[r]}onSelectionOptionsChanged(e,t,r){const n=(t&&"string"!=typeof t?wo(t):void 0)!==(e&&"string"!=typeof e?wo(e):void 0),l=(t&&"string"!=typeof t?Al(t):void 0)!==(e&&"string"!=typeof e?Al(e):void 0),c=Ml(e),d=Ml(t);(n||l||c!==d)&&this.beans.colModel.refreshAll(r)}destroy(){Ll(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e,t,r){if(!this.columns?.list.length)return;const i=e.length+t.length+r.length;if(0===i)return;const s=this.columns.list[0];s.isVisible()&&(this.beans.rowNumbersSvc?.getColumn(Ld)?2:1)===i&&(()=>{let l;switch(s.pinned){case"left":case!0:l=e;break;case"right":l=r;break;default:l=t}l&&ki(l,s)})()}}],apiFunctions:{setNodesSelected:function iA(e,t){if(!t.nodes.every(o=>o.rowPinned&&!Ra(o)?(ne(59),!1):void 0!==o.id||(ne(60),!1)))return;const{nodes:i,source:s,newValue:n}=t;e.selectionSvc?.setNodesSelected({nodes:i,source:s??"api",newValue:n})},selectAll:function sA(e,t,r="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:r,selectAll:t})},deselectAll:function nA(e,t,r="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:r,selectAll:t})},selectAllFiltered:function oA(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})},deselectAllFiltered:function aA(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})},selectAllOnCurrentPage:function lA(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})},deselectAllOnCurrentPage:function cA(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})},getSelectedNodes:function dA(e){return e.selectionSvc?.getSelectedNodes()??[]},getSelectedRows:function uA(e){return e.selectionSvc?.getSelectedRows()??[]}}},mA={moduleName:"RowSelection",version:he,rowModels:["clientSide","infinite","viewport"],beans:[class extends p3{constructor(){super(...arguments),this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();const{gos:e}=this;this.mode=Il(e),this.groupSelectsDescendants=ga(e),this.groupSelectsFiltered="filteredDescendants"===_l(e),this.masterSelectsDetail="detail"===Vg(e),this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=ga(e),r=Il(e),i="filteredDescendants"===_l(e);this.masterSelectsDetail="detail"===Vg(e),(t!==this.groupSelectsDescendants||i!==this.groupSelectsFiltered||r!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=i,this.mode=r)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,r){if(this.isRowSelectionBlocked(t))return 0;const i=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,r);if(null==i)return 0;if(this.selectionCtx.selectAll=!1,"select"in i)return i.reset?this.resetNodes():this.selectRange(i.deselect,!1,r),this.selectRange(i.select,!0,r);{const s=i.checkFilteredNodes?uv(i.node):i.newValue;return this.setNodesSelected({nodes:[i.node],newValue:s,clearSelection:i.clearSelection,keepDescendants:i.keepDescendants,event:e,source:r})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:r,nodes:i,event:s,source:n,keepDescendants:o=!1}){if(0===i.length)return 0;const{gos:a}=this;if(!Rn(a)&&e)return ne(132),0;if(i.length>1&&!this.isMultiSelect())return ne(130),0;let l=0;for(let c=0;c<i.length;c++){const u=No(i[c]);!u.rowPinned||Ra(u)?void 0!==u.id?(this.groupSelectsFiltered&&u.group&&!a.get("treeData")||this.selectRowNode(u,e,s,n)&&(this.detailSelection.delete(u.id),l++),this.groupSelectsDescendants&&u.childrenAfterGroup?.length&&(l+=this.selectChildren(u,e,n))):ne(60):ne(59)}return r||(1===i.length&&"api"===n&&this.selectionCtx.setRoot(No(i[0])),e&&(t||!this.isMultiSelect())&&(l+=this.clearOtherNodes(No(i[0]),o,n)),l>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n))),l}selectRange(e,t,r){let i=0;return e.forEach(s=>{const n=No(s);n.group&&this.groupSelectsDescendants||this.selectRowNode(n,t,void 0,r)&&i++}),i>0&&(this.updateGroupsFromChildrenSelections(r),this.dispatchSelectionChanged(r)),i}selectChildren(e,t,r){const i=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return i?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:r,nodes:i}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((r,i)=>{e(r)&&t.set(i,r)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:r,rowModel:i}=this.beans;if(!rr(r))return!1;const s=i.rootNode;if(!s)return!1;t||((t=new Ta(!0,s)).active=!1);let n=!1;return t.forEachChangedNodeDepthFirst(o=>{if(o!==s){const a=this.calculateSelectedFromChildren(o);n=this.selectRowNode(o,null!==a&&a,void 0,e)||n}}),n}clearOtherNodes(e,t,r){const i=new Map;let s=0;return this.selectedNodes.forEach(n=>{const o=n.id==e.id;if(!(t&&function gA(e,t){let r=t.parent;for(;r;){if(r===e)return!0;r=r.parent}return!1}(e,n)||o)){const l=this.selectedNodes.get(n.id);s+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:r}),this.groupSelectsDescendants&&n.parent&&i.set(n.parent.id,n.parent)}}),i.forEach(n=>{const o=this.calculateSelectedFromChildren(n);this.selectRowNode(n,null!==o&&o,void 0,r)}),s}onRowSelected(e){const t=e.node;this.groupSelectsDescendants&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}createDaemonNode(e){if(!e.id)return;const t=new Js(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){t&&e.id!==t.id&&this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t)}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.__selected=!0,this.selectedNodes.set(e.id,e)):e.__selected=!1}reset(e){const t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:e,rowModel:t}=this.beans;if(!rr(e))return;const r=t.getTopLevelNodes();if(null===r)return;const i=[];return function s(n){for(let o=0,a=n.length;o<a;o++){const l=n[o];l.isSelected()?i.push(l):l.group&&l.childrenAfterGroup&&s(l.childrenAfterGroup)}}(r),i}isEmpty(){return 0===this.getSelectionCount()}deselectAllRowNodes({source:e,selectAll:t}){const r=rr(this.gos);let i=!1;const s=n=>{const o=this.selectRowNode(No(n),!1,void 0,e);i||(i=o)};if("currentPage"===t||"filtered"===t){if(!r)return void Ct(102);this.getNodesToSelect(t).forEach(s)}else this.selectedNodes.forEach(s),this.reset(e);if(this.selectionCtx.selectAll=!1,r&&this.groupSelectsDescendants){const n=this.updateGroupsFromChildrenSelections(e);i||(i=n)}i&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,r=0;return this.getNodesToSelect(e).forEach(i=>{this.groupSelectsDescendants&&i.group||(i.isSelected()?t++:i.selectable&&r++)}),{selectedCount:t,notSelectedCount:r}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:r}=this.getSelectedCounts(e);return dv(t,r)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],r=s=>t.push(s);if("currentPage"===e)return this.forEachNodeOnPage(s=>{if(s.group){if(!s.expanded&&!s.footer){const n=o=>{r(o),o.childrenAfterFilter?.forEach(n)};return void n(s)}this.groupSelectsDescendants||r(s)}else r(s)}),t;const i=this.beans.rowModel;return"filtered"===e?(i.forEachNodeAfterFilter(r),t):(i.forEachNode(r),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:r}=this.beans,i=t.getFirstRow(),s=t.getLastRow();for(let n=i;n<=s;n++){const o=r.getRow(n);o&&e(o)}}selectAllRowNodes(e){const{gos:t,selectionCtx:r}=this;if(!Rn(t))return void ne(132);if(function zx(e){return"string"!=typeof e.get("rowSelection")}(t)&&!fa(t))return void ne(130);if(!this.canSelectAll())return;const{source:i,selectAll:s}=e;let n=!1;if(this.getNodesToSelect(s).forEach(o=>{const a=this.selectRowNode(No(o),!0,void 0,i);n||(n=a)}),r.selectAll=!0,rr(t)&&this.groupSelectsDescendants){const o=this.updateGroupsFromChildrenSelections(i);n||(n=o)}n&&this.dispatchSelectionChanged(i)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,r){if(e||(e=[]),!Array.isArray(e))return void Ct(103);const i=new Set(e),s=[];this.beans.rowModel.forEachNode(n=>{i.has(n.id)&&s.push(n)}),r&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:s,source:t})}canSelectAll(){return rr(this.beans.gos)}updateSelectable(e){const{gos:t,rowModel:r}=this.beans;if(!Rn(t))return;const i="selectableChanged",s=void 0!==e,n=rr(t)&&this.groupSelectsDescendants,o=[],a=l=>{if(!s||l.group){if(n&&l.group){const d=l.childrenAfterGroup?.some(u=>u.selectable)??!1;return void this.setRowSelectable(l,d,!0)}!this.updateRowSelectable(l,!0)&&l.isSelected()&&o.push(l)}};if(n){if(void 0===e){const l=r.rootNode;e=l?new Ta(!1,l):void 0}e?.forEachChangedNodeDepthFirst(a,!s,!s)}else r.forEachNode(a);o.length&&this.setNodesSelected({nodes:o,newValue:!1,source:i}),!s&&n&&this.updateGroupsFromChildrenSelections?.(i)}updateSelectableAfterGrouping(e){this.updateSelectable(e),this.groupSelectsDescendants&&this.updateGroupsFromChildrenSelections?.("rowGroupChanged",e)&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){if(!this.masterSelectsDetail)return;const r=e.detailNode?.detailGridInfo?.api;if(!r)return;const i=function fA(e){let t=0,r=0;return e.forEachNode(i=>{i.isSelected()?t++:i.selectable&&r++}),dv(t,r)}(r);if(e.isSelected()!==i&&this.selectRowNode(e,i,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!i){const n=this.detailSelection.get(e.id)??new Set;for(const o of r.getSelectedNodes())n.add(o.id);this.detailSelection.set(e.id,n)}}setDetailSelectionState(e,t,r){if(this.masterSelectsDetail){if(!fa(t))return void ne(269);switch(e.isSelected()){case!0:r.selectAll();break;case!1:r.deselectAll();break;case void 0:{const i=this.detailSelection.get(e.id);if(i){const s=[];for(const n of i){const o=r.getRowNode(n);o&&s.push(o)}r.setNodesSelected({nodes:s,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}}],dependsOn:[pA]};function hv(e){e.rowModel?.onRowHeightChanged()}function fv(e){e.rowAutoHeight?.active?ne(3):e.rowModel?.resetRowHeights()}var bA={moduleName:"CsrmSsrmSharedApi",version:he,apiFunctions:{expandAll:function vA(e){e.expansionSvc?.expandAll(!0)},collapseAll:function CA(e){e.expansionSvc?.expandAll(!1)}}},yA={moduleName:"RowModelSharedApi",version:he,apiFunctions:{onRowHeightChanged:hv,resetRowHeights:fv}},EA={moduleName:"SsrmInfiniteSharedApi",version:he,apiFunctions:{setRowCount:function wA(e,t,r){const i=function xP(e){const t=e.rowModel;return"serverSide"===t.getType()?t:void 0}(e);if(i)return 0===e.rowGroupColsSvc?.columns.length?t<0?void Ct(238):void i.setRowCount(t,r):void Ct(28);Sc(e)?.setRowCount(t,r)},getCacheBlockState:function xA(e){return mo(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}},isLastRowIndexKnown:function SA(e){return e.rowModel.isLastRowIndexKnown()}}},RA={moduleName:"AlignedGrids",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t="function"==typeof e;return"function"==typeof e&&(e=e()),e.map(i=>{if(!i)return Ct(18),void(t||Ct(20));if(this.isGridApi(i))return i;const s=i;return"current"in s?s.current?.api:(s.api||Ct(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){if(!this.consuming)for(const t of this.getAlignedGridApis())t.isDestroyed()||t.dispatchEvent(e)}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){"horizontal"===e.direction&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){const r=[];return e.columns?e.columns.forEach(i=>{r.push(t(i))}):e.column&&r.push(t(e.column)),r}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":ne(21)}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;if(t)for(const r of e.columnGroups){let i=null;r&&(i=t.getProvidedColGroup(r.getGroupId())),(!r||i)&&t.setColumnGroupOpened(i,r.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){const t=e.column;let r=null;const i=this.beans,{colResize:s,ctrlsSvc:n,colModel:o}=i;if(t&&(r=o.getColDefCol(t.getColId())),t&&!r)return;const a=this.getMasterColumns(e);switch(e.type){case"columnMoved":$i(i,{state:e.api.getColumnState().map(h=>({colId:h.colId})),applyOrder:!0},"alignedGridChanged");break;case"columnVisible":$i(i,{state:e.api.getColumnState().map(h=>({colId:h.colId,hide:h.hide}))},"alignedGridChanged");break;case"columnPinned":$i(i,{state:e.api.getColumnState().map(h=>({colId:h.colId,pinned:h.pinned}))},"alignedGridChanged");break;case"columnResized":{const d=e,u={};for(const h of a)u[h.getId()]={key:h.getColId(),newWidth:h.getActualWidth()};for(const h of d.flexColumns??[])u[h.getId()]&&delete u[h.getId()];s?.setColumnWidths(Object.values(u),!1,d.finished,"alignedGridChanged");break}}const c=n.getGridBodyCtrl().isVerticalScrollShowing();for(const d of this.getAlignedGridApis())d.setGridOption("alwaysShowVerticalScroll",c)}}],dependsOn:[Y0]},kA=class extends Q{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},gv(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){const{selectionSvc:t,pinnedRowModel:r,groupStage:i}=this.beans;t?.reset("rowDataChanged"),r?.isManual()&&r.reset(),this.dispatchRowDataUpdateStarted(e),this.allNodesMap=Object.create(null),this.nextId=0;const s=gv(this.rootNode),n=new Array(e.length);s._leafs=n;let o=0;const a=i?.getNestedDataGetter(),l=a?new Set:null,c=(d,u)=>{const h=d.level+1;for(let f=0,p=u.length;f<p;++f){const g=u[f];if(!g)continue;const m=this.createRowNode(g,h);if(m.sourceRowIndex=o,n[o++]=m,l&&!l.has(g)){l.add(g),m.treeParent=d;const v=a(g);v&&c(m,v)}}};c(s,e),n.length=o}setImmutableRowData(e,t){const{rootNode:r,gos:i}=this;this.dispatchRowDataUpdateStarted(t);const s=Co(i),n=e.changedRowNodes,{adds:o,updates:a}=n,l=new Set,c=[],d=this.beans.groupStage?.getNestedDataGetter();let u=!!i.get("suppressMaintainUnsortedOrder")&&void 0,h=-1,f=!1;const p=(v,w)=>{if(!u&&void 0!==u){const C=v.sourceRowIndex;u=C<=h,h=C}v.data!==w&&(v.updateData(w),o.has(v)||a.add(v),!v.selectable&&v.isSelected()&&c.push(v))},g=(v,w,C)=>{for(let y=0,k=w.length;y<k;++y){const E=w[y];if(!E)continue;let S=this.getRowNode(s({data:E,level:C}));if(S?(p(S,E),f||(f=!!d&&S.treeParent!==v)):(S=this.createRowNode(E,C),o.add(S)),!d||l.has(S)){l.add(S);continue}l.add(S),S.treeParent=v;const _=d(E);_&&g(S,_,C+1)}};g(r,t,0);const m=this.deleteUnusedNodes(l,n,c)||u||o.size>0;if(m){const v=r._leafs??(r._leafs=[]);void 0===u?MA(v,l,n):AA(v,l)&&(n.reordered=!0)}(m||f||a.size)&&(e.rowDataUpdated=!0,this.deselect(c))}deleteUnusedNodes(e,{removals:t},r){const i=this.rootNode._leafs;for(let s=0,n=i.length;s<n;s++){const o=i[s];e.has(o)||(t.add(o),o.isSelected()&&r.push(o),this.deleteNode(o))}return t.size>0}updateRowData(e,t){if(this.dispatchRowDataUpdateStarted(e.add),this.beans.groupStage?.getNestedDataGetter())return ne(268),{remove:[],update:[],add:[]};const r=[],i=Co(this.gos),s=this.executeRemove(i,e,t,r),n=this.executeUpdate(i,e,t,r),o=this.executeAdd(e,t);return this.deselect(r),{remove:s,update:n,add:o}}executeRemove(e,{remove:t},{adds:r,updates:i,removals:s},n){const o=this.rootNode._leafs,a=o?.length,l=t?.length;if(!l||!a)return[];let h,c=0,d=a,u=0;const f=new Array(l);for(let p=0;p<l;++p){const g=this.lookupNode(e,t[p]);if(!g)continue;const m=g.sourceRowIndex;m<d&&(d=m),m>u&&(u=m),g.isSelected()&&n.push(g),this.deleteNode(g),r.delete(g)?(h??(h=new Set),h.add(g)):(i.delete(g),s.add(g)),f[c++]=g}return f.length=c,c&&DA(o,d,u,s,h),f}executeUpdate(e,{update:t},{adds:r,updates:i},s){const n=t?.length;if(!n)return[];const o=new Array(n);let a=0;for(let l=0;l<n;l++){const c=t[l],d=this.lookupNode(e,c);d&&(d.updateData(c),!d.selectable&&d.isSelected()&&s.push(d),o[a++]=d,r.has(d)||i.add(d))}return o.length=a,o}executeAdd(e,t){var r;const i=(r=this.rootNode)._leafs??(r._leafs=[]),s=i.length,n=e.add,o=n?.length;if(!o)return[];const a=s+o;let l=this.sanitizeAddIndex(i,e.addIndex);if(l<s){for(let u=s-1,h=a-1;u>=l;--u){const f=i[u];f.sourceRowIndex=h,i[h--]=f}t.reordered=!0}i.length=a;const c=new Array(o),d=t.adds;for(let u=0;u<o;u++){const h=this.createRowNode(n[u],0);d.add(h),h.sourceRowIndex=l,i[l]=h,c[u]=h,l++}return c}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}deselect(e){const t="rowDataChanged",r=this.beans.selectionSvc;e.length&&r?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),r?.updateGroupsFromChildrenSelections?.(t),e.length&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:r?.getSelectedNodes()??null,serverSideState:null})}createRowNode(e,t){const r=new Js(this.beans);r.parent=this.rootNode,r.level=t,r.group=!1,r.expanded=!1,r.setDataAndId(e,String(this.nextId++));const i=r.id,s=this.allNodesMap;return s[i]&&ne(2,{nodeId:i}),s[i]=r,r}deleteNode(e){e.clearRowTopAndRowIndex();const t=e.id,r=this.allNodesMap;r[t]===e&&delete r[t];const i=e.pinnedSibling;i&&this.beans.pinnedRowModel?.pinRow(i,null)}lookupNode(e,t){if(!e)return PA(this.rootNode._leafs,t);const r=e({data:t,level:0});return this.allNodesMap[r]||(Ct(4,{id:r}),null)}sanitizeAddIndex(e,t){const r=e.length;if("number"!=typeof t||t<0||t>=r||Number.isNaN(t))return r;t=Math.ceil(t);const i=this.gos;return t>0&&i.get("treeData")&&i.get("getDataPath")&&(t=TA(e,t)),t}},TA=(e,t)=>{for(let r=0,i=e.length;r<i;r++)if(e[r]?.rowIndex==t-1)return r+1;return t},gv=e=>{e.group=!0,e.level=-1,e.id="ROOT_NODE_ID",0!==e._leafs?.length&&(e._leafs=[]);const t=[],r=[],i=[],s=[];e.childrenAfterGroup=t,e.childrenAfterSort=r,e.childrenAfterAggFilter=i,e.childrenAfterFilter=s;const n=e.sibling;return n&&(n.childrenAfterGroup=t,n.childrenAfterSort=r,n.childrenAfterAggFilter=i,n.childrenAfterFilter=s,n.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},PA=(e,t)=>{if(e)for(let r=0,i=e.length;r<i;r++){const s=e[r];if(s.data===t)return s}return Ct(5,{data:t}),null},DA=(e,t,r,i,s)=>{for(let n=t=Math.max(0,t),o=e.length;n<o;++n){const a=e[n];n<=r&&(i.has(a)||s?.has(a))||(a.sourceRowIndex=t,e[t++]=a)}e.length=t},AA=(e,t)=>{e.length=t.size;let i=0,s=!1,n=!1;for(const o of t){const a=o.sourceRowIndex;a===i?n||(n=s):(a>=0?n=!0:s=!0,o.sourceRowIndex=i,e[i]=o),++i}return n},MA=(e,t,{removals:r,adds:i})=>{const s=e.length;e.length=t.size;let n=0;for(let o=0;o<s;++o){const a=e[o];r.has(a)||(n!==o&&(a.sourceRowIndex=n,e[n]=a),++n)}for(const o of i)o.sourceRowIndex<0&&(o.sourceRowIndex=n,e[n++]=o);e.length=n},pv=e=>{const t=e.childrenAfterSort,r=e.sibling;if(r&&(r.childrenAfterSort=t),t)for(let i=0,s=t.length-1;i<=s;i++){const n=t[i],o=0===i,a=i===s;n.firstChild!==o&&(n.firstChild=o,n.dispatchRowEvent("firstChildChanged")),n.lastChild!==a&&(n.lastChild=a,n.dispatchRowEvent("lastChildChanged")),n.childIndex!==i&&(n.childIndex=i,n.dispatchRowEvent("childIndexChanged"))}},LA=(e,t,r,i)=>{let s=0,n=0;const o=r.length,a=i.length,l=new Array(o+a);let c=0;for(;s<o&&n<a;){const d=r[s],u=i[n];e.compareRowNodes(t,d,u)<0?(l[c++]=d.rowNode,++s):(l[c++]=u.rowNode,++n)}for(;s<o;)l[c++]=r[s++].rowNode;for(;n<a;)l[c++]=i[n++].rowNode;return l},mv=(e,t)=>{const r=t.childrenAfterGroup;if(r)for(let i=0,s=r.length;i<s;++i){const n=r[i];n.data&&e.push(n),n.group&&mv(e,n)}},qA={moduleName:"ClientSideRowModel",version:he,rowModels:["clientSide"],beans:[class extends Q{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.rowDataUpdatedPending=!1,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingModel=!1,this.rowNodesCountReady=!1,this.stages=[],this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=Cr(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){const t=new Js(this.beans);this.rootNode=t,this.nodeManager=this.createBean(new kA(t));const r=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:r,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:r,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){const{beans:e,stagesRefreshProps:t}=this,r=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(i=>!!i);this.stages=r;for(let i=r.length-1;i>=0;--i)for(const s of r[i].refreshProps)t.set(s,i);this.addManagedPropertyListeners([...t.keys()],i=>{const s=i.changeSet?.properties;s&&this.onPropChange(s)}),this.addManagedPropertyListener("rowData",()=>this.onPropChange(["rowData"])),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,r,i){let s,n=!1;do{s=!1;const o=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(o,r),c=Math.min(a,i);for(let d=l;d<=c;d++){const u=this.getRow(d);if(u.rowHeightEstimated){const h=$s(this.beans,u);u.setRowHeight(h.height),s=!0,n=!0}}s&&this.setRowTopAndRowIndex()}while(s);return n}onPropChange(e){const{nodeManager:t,gos:r,beans:i}=this,s=i.groupStage;if(!t)return;const n=new Set(e),o=s?.onPropChange(n);let a;n.has("rowData")?a=r.get("rowData"):o&&(a=s?.extractData()),a&&!Array.isArray(a)&&(a=null,ne(1));const l={step:"nothing",changedProps:n};a&&(!o&&!this.isEmpty()&&a.length>0&&r.exists("getRowId")&&!r.get("resetRowDataOnUpdate")?(l.keepRenderedRows=!0,l.animate=!r.get("suppressAnimationFrame"),l.changedRowNodes=new lc,t.setImmutableRowData(l,a)):(l.rowDataUpdated=!0,l.newData=!0,t.setNewRowData(a),this.rowNodesCountReady=!0));const c=l.rowDataUpdated?"group":this.getRefreshedStage(e);c&&(l.step=c,this.refreshModel(l))}getRefreshedStage(e){const{stages:t,stagesRefreshProps:r}=this,i=t.length;let s=i;for(let n=0,o=e.length;n<o&&s;++n)s=Math.min(s,r.get(e[n])??s);return s<i?t[s].step:null}setRowTopAndRowIndex(e){const{beans:t,rowsToDisplay:r}=this,i=t.environment.getDefaultRowHeight();let s=0;const n=Dr(this.gos,"normal");for(let o=0,a=r.length;o<a;++o){const l=r[o],c=l.id;if(null!=c&&e?.add(c),null==l.rowHeight){const d=$s(t,l,n,i);l.setRowHeight(d.height,d.estimated)}l.setRowTop(s),l.setRowIndex(o),s+=l.rowHeight}}clearRowTopAndRowIndex(e,t){const r=e.active,i=o=>{null!=o?.id&&!t.has(o.id)&&o.clearRowTopAndRowIndex()},s=o=>{i(o),i(o.detailNode),i(o.sibling);const a=o.childrenAfterGroup;if(o.hasChildren()&&a&&(!r||-1==o.level||o.expanded))for(let d=0,u=a.length;d<u;++d)s(a[d])},n=this.rootNode;n&&s(n)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay.length}getTopLevelRowCount(){const{rootNode:e,rowsToDisplay:t}=this;if(!e||!t.length)return 0;if(t[0]===e)return 1;const i=e.sibling?.displayed?1:0;return(e.childrenAfterSort?.length??0)+i}getTopLevelRowDisplayedIndex(e){const{beans:t,rootNode:r,rowsToDisplay:i}=this;if(!r||!i.length||i[0]===r)return e;const n=r.childrenAfterSort,o=l=>{let c=n[l];if(this.gos.get("groupHideOpenParents"))for(;c.expanded&&c.childrenAfterSort&&c.childrenAfterSort.length>0;)c=c.childrenAfterSort[0];return c.rowIndex},a=t.footerSvc;return a?a?.getTopDisplayIndex(i,e,n,o):o(e)}getTopLevelIndexFromDisplayedIndex(e){const{rootNode:t,rowsToDisplay:r}=this;if(!t||!r.length||r[0]===t)return e;let s=this.getRow(e);s.footer&&(s=s.sibling);let n=s.parent;for(;n&&n!==t;)s=n,n=s.parent;const o=t.childrenAfterSort?.indexOf(s)??-1;return o>=0?o:e}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:vo(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){const i=0===t.length||t.some(s=>s.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:i,keepRenderedRows:!0,animate:vo(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:vo(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(e){const t=new Ta(!1,this.rootNode);return t.active=e,t}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:r,rowDataUpdated:i}=e;return!(!t||r||!i||t.removals.size||t.adds.size)}refreshModel(e){const{nodeManager:t,beans:r,eventSvc:i,started:s,refreshingModel:n}=this;if(!t)return;const o=!!e.rowDataUpdated,a=e.changedPath??(e.changedPath=this.createChangePath(!e.newData&&o));if(s&&o&&i.dispatchEvent({type:"rowDataUpdated"}),!s||n||r.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(e))return void(this.rowDataUpdatedPending||(this.rowDataUpdatedPending=o));switch(this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.refreshingModel=!0,r.masterDetailSvc?.refreshModel(e),o&&"group"!==e.step&&r.colFilter?.refreshModel(),e.step){case"group":this.doGrouping(e);case"filter":this.doFilter(a);case"pivot":this.doPivot(a);case"aggregate":this.doAggregate(a);case"filter_aggregates":this.doFilterAggregates(a);case"sort":this.doSort(e.changedRowNodes,a);case"map":this.doRowsToDisplay()}const l=new Set;this.setRowTopAndRowIndex(l),this.clearRowTopAndRowIndex(a,l),this.refreshingModel=!1,i.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}isEmpty(){return!this.rootNode?._leafs?.length||!this.beans.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let r=!1,i=!1;const s=[],n=ga(this.gos);return this.forEachNodeAfterFilterAndSort(o=>{if(!i)if(r&&(o===t||o===e)&&(i=!0,n&&o.group))mv(s,o);else{if(!r){if(o!==t&&o!==e)return;r=!0,t===e&&(i=!0)}(!o.group||!n)&&s.push(o)}}),s}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay,r=t.length;if(this.isEmpty()||0===r)return-1;let i=0,s=r-1;if(e<=0)return 0;if(t[s].rowTop<=e)return s;let o=-1,a=-1;for(;;){const l=Math.floor((i+s)/2),c=t[l];if(this.isRowInPixel(c,e)||(c.rowTop<e?i=l+1:c.rowTop>e&&(s=l-1),o===i&&a===s))return l;o=i,a=s}}isRowInPixel(e,t){const r=e.rowTop;return r<=t&&r+e.rowHeight>t}forEachLeafNode(e){const t=this.rootNode?._leafs;if(t)for(let r=0,i=t.length;r<i;++r)e(t[r],r)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){const t=this.rowsToDisplay;for(let r=0,i=t.length;r<i;++r)e(t[r],r)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,r=>r.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,r=>r.childrenAfterSort)}forEachPivotNode(e,t,r){const{colModel:i,rowGroupColsSvc:s}=this.beans;if(!i.isPivotMode())return;if(!s?.columns.length)return void e(this.rootNode,0);const n=r?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,o=>o.leafGroup?null:o[n])}depthFirstSearchRowNodes(e,t=!1,r=n=>n.childrenAfterGroup,i=this.rootNode,s=0){let n=s;if(!i)return n;const o=i===this.rootNode;if(o||e(i,n++),i.hasChildren()&&!i.footer){const a=r(i);if(a){const l=this.beans.footerSvc;n=l?.addTotalRows(n,i,e,t,o,"top")??n;for(const c of a)n=this.depthFirstSearchRowNodes(e,t,r,c,n);return l?.addTotalRows(n,i,e,t,o,"bottom")??n}}return n}doAggregate(e){const t=this.rootNode;t&&this.beans.aggStage?.execute({rowNode:t,changedPath:e})}doFilterAggregates(e){const t=this.rootNode,r=this.beans.filterAggStage;r?r.execute({rowNode:t,changedPath:e}):t.childrenAfterAggFilter=t.childrenAfterFilter}doSort(e,t){const r=this.beans.sortStage;r?r.execute({rowNode:this.rootNode,changedRowNodes:e,changedPath:t}):t.forEachChangedNodeDepthFirst(i=>{i.childrenAfterSort=i.childrenAfterAggFilter.slice(0),pv(i)})}doGrouping(e){const t=this.rootNode,i=this.beans.groupStage?.execute({rowNode:t,changedRowNodes:e.changedRowNodes,changedPath:e.changedPath,afterColumnsChanged:!!e.afterColumnsChanged});if(void 0===i){const s=t._leafs;t.childrenAfterGroup=s,t.updateHasChildren();const n=t.sibling;n&&(n.childrenAfterGroup=s)}(i||e.rowDataUpdated)&&this.beans.colFilter?.refreshModel(),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){const t=this.beans.filterStage;t?t.execute({rowNode:this.rootNode,changedPath:e}):e.forEachChangedNodeDepthFirst(r=>{r.childrenAfterFilter=r.childrenAfterGroup,Lm(r)},!0)}doPivot(e){this.beans.pivotStage?.execute({rowNode:this.rootNode,changedPath:e})}getRowNode(e){const t=this.nodeManager?.getRowNode(e);return"object"==typeof t?t:"string"==typeof e&&0===e.indexOf(uu)?this.beans.groupStage?.getNode(e):void 0}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];const r=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),r)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){const e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){const{nodeManager:e,beans:t,eventSvc:r,asyncTransactions:i}=this;if(!e)return;t.valueCache?.onDataChanged();const s=[],n=[],o=new lc;for(const{rowDataTransaction:a,callback:l}of i??[]){this.rowNodesCountReady=!0;const c=e.updateRowData(a,o);s.push(c),l&&n.push(l.bind(null,c))}this.commitTransactions(o),n.length>0&&setTimeout(()=>{for(let a=0,l=n.length;a<l;a++)n[a]()},0),s.length>0&&r.dispatchEvent({type:"asyncTransactionsFlushed",results:s}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){const t=this.nodeManager;if(!t)return null;this.beans.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;const r=new lc,i=t.updateRowData(e,r);return this.commitTransactions(r),i}commitTransactions(e){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:e,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{beans:e,rootNode:t}=this,r=e.flattenStage;if(r)return void(this.rowsToDisplay=r.execute({rowNode:t}));const i=this.rootNode.childrenAfterSort??[];for(const s of i)s.setUiLevel(0);this.rowsToDisplay=i}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);const r=e.sibling;r?.setRowHeight(r.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const r=t.detailNode;r?.setRowHeight(r.rowHeight,!0);const i=t.sibling;i?.setRowHeight(i.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){e.rowHeightChanged&&!this.beans.rowAutoHeight?.active&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},class extends Q{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e){const t=this.beans.sortSvc.getSortOptions(),r=t.length>0&&!!e.changedRowNodes&&this.gos.get("deltaSort");this.sort(t,r,e.changedRowNodes,e.changedPath)}sort(e,t,r,i){const{gos:s,colModel:n,rowGroupColsSvc:o,rowNodeSorter:a,rowRenderer:l,showRowGroupCols:c}=this.beans,d=s.get("groupMaintainOrder"),u=n.getCols().some(w=>w.isRowGroupActive()),h=o?.columns,f=n.isPivotMode(),p=s.getCallback("postSortRows");let m,g=!1;if(i?.forEachChangedNodeDepthFirst(w=>{const C=f&&w.leafGroup;let y=d&&u&&!w.leafGroup;y&&(m??(m=this.shouldSortContainsGroupCols(e)),y&&(y=!m));let k=null;if(y){let E=!1;if(h){const S=w.level+1;S<h.length&&(E=null===h[S].getSort())}E||(k=(e=>{const t=e.childrenAfterSort,r=e.childrenAfterAggFilter,i=t?.length,s=r?.length;if(!i||!s)return null;const n=new Array(s),o=new Set;for(let l=0;l<s;++l)o.add(r[l]);let a=0;for(let l=0;l<i;++l){const c=t[l];o.delete(c)&&(n[a++]=c)}if(0===o.size&&a===i)return t;for(const l of o)n[a++]=l;return n.length=a,n})(w))}else!e.length||C||(k=t&&r?((e,t,r,i,s)=>{const n=t.childrenAfterAggFilter,o=t.childrenAfterSort;if(!o)return e.doFullSort(n,s);const a=new Set,l=[],{updates:c,adds:d}=r;for(let h=0,f=n.length;h<f;++h){const p=n[h];c.has(p)||d.has(p)||i&&!i.canSkip(p)?l.push({currentPos:l.length,rowNode:p}):a.add(p)}const u=o.filter(h=>a.has(h)).map((h,f)=>({currentPos:f,rowNode:h}));return l.sort((h,f)=>e.compareRowNodes(s,h,f)),LA(e,s,l,u)})(a,w,r,i,e):a.doFullSort(w.childrenAfterAggFilter,e));k||(k=w.childrenAfterAggFilter?.slice(0)??[]),g||(g=w.childrenAfterSort?.[0]!==k[0]),w.childrenAfterSort=k,pv(w),p&&p({nodes:w.childrenAfterSort})}),g&&s.get("groupHideOpenParents")){const w=c?.getShowRowGroupCols();w?.length&&l.refreshCells({columns:w,force:!0})}}shouldSortContainsGroupCols(e){const t=e.length;if(!t)return!1;if(rs(this.gos)){for(let r=0;r<t;++r){const i=e[r].column;if(i.isPrimary()&&i.isRowGroupActive())return!0}return!1}for(let r=0;r<t;++r)if(e[r].column.getColDef().showRowGroup)return!0;return!1}}],dependsOn:[km]},XA={moduleName:"ClientSideRowModelApi",version:he,apiFunctions:{onGroupExpandedOrCollapsed:function NA(e){e.expansionSvc?.onGroupExpandedOrCollapsed()},refreshClientSideRowModel:function HA(e,t){const r=sn(e);r&&((!t||"everything"===t)&&(t="group"),r.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))},isRowDataEmpty:function GA(e){return sn(e)?.isEmpty()??!0},forEachLeafNode:function VA(e,t){sn(e)?.forEachLeafNode(t)},forEachNodeAfterFilter:function zA(e,t){sn(e)?.forEachNodeAfterFilter(t)},forEachNodeAfterFilterAndSort:function WA(e,t){sn(e)?.forEachNodeAfterFilterAndSort(t)},applyTransaction:function UA(e,t){return e.frameworkOverrides.wrapIncoming(()=>sn(e)?.updateRowData(t))},applyTransactionAsync:function $A(e,t,r){e.frameworkOverrides.wrapIncoming(()=>sn(e)?.batchUpdateRowData(t,r))},flushAsyncTransactions:function jA(e){e.frameworkOverrides.wrapIncoming(()=>sn(e)?.flushAsyncTransactions())},getBestCostNodeSelection:function KA(e){return e.selectionSvc?.getBestCostNodeSelection()},resetRowHeights:fv,onRowHeightChanged:hv},dependsOn:[bA,yA]},QA={moduleName:"SharedExport",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:r,columnKeys:i,skipRowGroups:s,exportRowNumbers:n}=t,o=this.getColumnsToExport({allColumns:r,skipRowGroups:s,columnKeys:i,exportRowNumbers:n});return[this.prepareSession(o),this.prependContent(t),this.exportColumnGroups(t,o),this.exportHeaders(t,o),this.processPinnedTopRows(t,o),this.processRows(t,o),this.processPinnedBottomRows(t,o),this.appendContent(t)].reduce((a,l)=>l(a),e).parse()}processRow(e,t,r,i){const s=t.shouldRowBeSkipped||(()=>!1),o=null!=t.rowPositions||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!o,l=this.colModel.isPivotMode()?i.leafGroup:!i.group,c=!!i.footer,d=1===i.allChildrenCount&&1===i.childrenAfterGroup?.length&&function Gx(e,t){const r=e.get("groupHideParentOfSingleChild");return!!(!0===r||"leafGroupsOnly"===r&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}(this.gos,i);if(!l&&!c&&(t.skipRowGroups||d||a)||t.onlySelected&&!i.isSelected()||t.skipPinnedTop&&"top"===i.rowPinned||t.skipPinnedBottom&&"bottom"===i.rowPinned||i.stub||-1===i.level&&!l&&!c||s(_e(this.gos,{node:i})))return;const f=e.onNewBodyRow(i);if(r.forEach((p,g)=>{f.onColumn(p,g,i)}),t.getCustomContentBelowRow){const p=t.getCustomContentBelowRow(_e(this.gos,{node:i}));p&&e.addCustomContent(p)}}appendContent(e){return t=>{const r=e.appendContent;return r&&t.addCustomContent(r),t}}prependContent(e){return t=>{const r=e.prependContent;return r&&t.addCustomContent(r),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return r=>{if(!e.skipColumnGroupHeaders){const i=new op,{colGroupSvc:s}=this.beans,n=s?s.createColumnGroups({columns:t,idCreator:i,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(n,r,e.processGroupHeaderCallback)}return r}}exportHeaders(e,t){return r=>{if(!e.skipColumnHeaders){const i=r.onNewHeaderRow();t.forEach((s,n)=>{i.onColumn(s,n,void 0)})}return r}}processPinnedTopRows(e,t){return r=>{const i=this.processRow.bind(this,r,e,t);return e.rowPositions?e.rowPositions.filter(s=>"top"===s.rowPinned).sort((s,n)=>s.rowIndex-n.rowIndex).map(s=>this.pinnedRowModel?.getPinnedTopRow(s.rowIndex)).forEach(i):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("top",i),r}}processRows(e,t){return r=>{const i=this.rowModel,s=rr(this.gos),n=mo(this.gos),o=!s&&e.onlySelected,a=this.processRow.bind(this,r,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(c=>null==c.rowPinned).sort((c,d)=>c.rowIndex-d.rowIndex).map(c=>i.getRow(c.rowIndex)).forEach(a);else if(this.colModel.isPivotMode())s?i.forEachPivotNode(a,!0,"filteredAndSorted"===l):n?i.forEachNodeAfterFilterAndSort(a,!0):i.forEachNode(a);else if(e.onlySelectedAllPages||o){const c=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(c),c.forEach(a)}else"all"===l?i.forEachNode(a):s||n?i.forEachNodeAfterFilterAndSort(a,!0):i.forEachNode(a);return r}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:r}=this.beans;if(!t||!r)return;const i=t.getSortOptions(),s=(n,o)=>null!=n.rowIndex&&null!=o.rowIndex?n.rowIndex-o.rowIndex:n.level===o.level?n.parent?.id===o.parent?.id?r.compareRowNodes(i,{rowNode:n,currentPos:n.rowIndex??-1},{rowNode:o,currentPos:o.rowIndex??-1}):s(n.parent,o.parent):n.level>o.level?s(n.parent,o):s(n,o.parent);e.sort(s)}processPinnedBottomRows(e,t){return r=>{const i=this.processRow.bind(this,r,e,t);return e.rowPositions?e.rowPositions.filter(s=>"bottom"===s.rowPinned).sort((s,n)=>s.rowIndex-n.rowIndex).map(s=>this.pinnedRowModel?.getPinnedBottomRow(s.rowIndex)).forEach(i):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("bottom",i),r}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:r=!1,exportRowNumbers:i=!1,columnKeys:s}=e,{colModel:n,gos:o,visibleCols:a}=this,l=n.isPivotMode(),c=h=>!bs(h)&&(!ys(h)||i);if(s?.length)return n.getColsForKeys(s).filter(c);const d=o.get("treeData");let u=[];return u=t&&!l?n.getCols():a.allCols,u=u.filter(h=>c(h)&&(!(r&&!d)||!Od(h))),u}recursivelyAddHeaderGroups(e,t,r){const i=[];for(const s of e){const n=s;if(n.getChildren)for(const o of n.getChildren()??[])i.push(o)}e.length>0&&sr(e[0])&&this.doAddHeaderHeader(t,e,r),i&&i.length>0&&this.recursivelyAddHeaderGroups(i,t,r)}doAddHeaderHeader(e,t,r){const i=e.onNewHeaderGroupingRow();let s=0;for(const n of t){const o=n;let a;a=r?r(_e(this.gos,{columnGroup:o})):this.beans.colNames.getDisplayNameForColumnGroup(o,"header");const c=(o.isExpandable()?o.getLeafColumns():[]).reduce((d,u,h,f)=>{let p=kt(d);return"open"===u.getColumnGroupShow()?(!p||null!=p[1])&&(p=[h],d.push(p)):p&&null==p[1]&&(p[1]=h-1),h===f.length-1&&p&&null==p[1]&&(p[1]=h),d},[]);i.onColumn(o,a||"",s++,o.getLeafColumns().length-1,c)}}}]},JA=class extends RP{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:r}=e;this.suppressQuotes=t,this.columnSeparator=r}addCustomContent(e){e&&("string"==typeof e?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,"\r\n"),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((r,i)=>{0!==i&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(r.data.value||""),r.mergeAcross&&this.appendEmptyCells(r.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,r,i){0!=r&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(i)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,r){0!=t&&(this.result+=this.columnSeparator);const i=this.extractRowCellValue(e,t,t,"csv",r);this.result+=this.putInQuotes(i.valueFormatted??i.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(null==e)return'""';let t;return"string"==typeof e?t=e:"function"==typeof e.toString?t=e.toString():(ne(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+="\r\n"),this.isFirstLine=!1}},r6={moduleName:"CsvExport",version:he,beans:[class extends FP{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed())return void ne(51);const t=this.getMergedParams(e),r=this.getData(t),i=new Blob(["\ufeff",r],{type:"text/plain"}),s="function"==typeof t.fileName?t.fileName(_e(this.gos,{})):t.fileName;!function kP(e,t){const r=document.defaultView||window;if(!r)return void ne(52);const i=document.createElement("a"),s=r.URL.createObjectURL(t);i.setAttribute("href",s),i.setAttribute("download",e),i.style.display="none",document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:r})),i.remove(),r.setTimeout(()=>{r.URL.revokeObjectURL(s)},0)}(this.getFileName(s),i)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const r=t?Object.assign({},e):this.getMergedParams(e);return this.getData(r)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:r,rowGroupColsSvc:i,valueSvc:s,gos:n}=this,{processCellCallback:o,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:c,suppressQuotes:d,columnSeparator:u}=e;return new JA({colModel:t,colNames:r,valueSvc:s,gos:n,processCellCallback:o||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:c||void 0,suppressQuotes:d||!1,columnSeparator:u||",",rowGroupColsSvc:i})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}}],apiFunctions:{getDataAsCsv:function e6(e,t){return e.csvCreator?.getDataAsCsv(t)},exportDataAsCsv:function t6(e,t){e.csvCreator?.exportDataAsCsv(t)}},dependsOn:[QA]},i6=class extends Q{constructor(e,t,r){super(),this.id=e,this.parentCache=t,this.params=r,this.state="needsLoading",this.version=0,this.startRow=e*r.blockSize,this.endRow=this.startRow+r.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,r){this.successCommon(e,{rowData:t,rowCount:r})}isRequestMostRecentAndLive(e){const t=e===this.version,r=this.isAlive();return t&&r}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:r,beans:i,rowNodes:s}=this;for(let n=0;n<e;n++){const o=r+n,a=new Js(i);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(o),a.setRowTop(t*o),s.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:r,state:i}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:r,pageStatus:i}}}setDataAndId(e,t,r){le(t)?e.setDataAndId(t,r.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();pt(this.params.datasource.getRows)?ne(90):window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:r,params:{sortModel:i,filterModel:s},gos:n}=this;return{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,r),failCallback:this.pageLoadFailed.bind(this,r),sortModel:i,filterModel:s,context:_e(n,{}).context}}forEachNode(e,t,r){this.rowNodes.forEach((i,s)=>{this.startRow+s<r&&e(i,t.value++)})}getRow(e,t=!1){return t||(this.lastAccessed=this.params.lastAccessedSequence.value++),this.rowNodes[e-this.startRow]}processServerResult(e){const{rowNodes:t,beans:r}=this;t.forEach((s,n)=>{const o=e.rowData?e.rowData[n]:void 0;!s.id&&s.alreadyRendered&&o&&(t[n]=new Js(r),t[n].setRowIndex(s.rowIndex),t[n].setRowTop(s.rowTop),t[n].setRowHeight(s.rowHeight),s.clearRowTopAndRowIndex()),this.setDataAndId(t[n],o,this.startRow+n)}),this.parentCache.pageLoaded(this,null!=e.rowCount&&e.rowCount>=0?e.rowCount:void 0)}destroy(){for(const e of this.rowNodes)e.clearRowTopAndRowIndex();super.destroy()}},n6=class extends Q{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const r=Math.floor(e/this.params.blockSize);let i=this.blocks[r];if(!i){if(t)return;i=this.createBlock(r)}return i.getRow(e)}createBlock(e){const t=this.params,r=this.createBean(new i6(e,this,t));return this.blocks[r.id]=r,this.blockCount++,this.purgeBlocksIfNeeded(r),t.rowNodeBlockLoader.addBlock(r),r}refreshCache(){if(0!=this.blockCount){for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}else this.purgeCache()}destroy(){for(const e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(Us(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(o=>o!=e);t.sort((o,a)=>a.lastAccessed-o.lastAccessed);const i=this.params.maxBlocksInCache>0,s=i?this.params.maxBlocksInCache-1:null;t.forEach((o,a)=>{if("needsLoading"===o.state&&a>=1||i&&a>=s){if(this.isBlockCurrentlyDisplayed(o)||this.isBlockFocused(o))return;this.removeBlockFromCache(o)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||null!=t.rowPinned)return!1;const{startRow:r,endRow:i}=e;return t.rowIndex>=r&&t.rowIndex<i}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:r}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,r-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if("number"==typeof t&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:r,overflowSize:i}=this.params,n=(e.id+1)*r+i;this.rowCount<n&&(this.rowCount=n)}}setRowCount(e,t){this.rowCount=e,le(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const r of this.getBlocksInOrder())r.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){return Object.values(this.blocks).sort((r,i)=>r.id-i.id)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,0===this.rowCount&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const r=[];let i=-1,s=!1;const n={value:0};let o=!1;for(const l of this.getBlocksInOrder())if(!o){if(s&&i+1!==l.id){o=!0;continue}i=l.id,l.forEachNode(c=>{const d=c===e||c===t;(s||d)&&r.push(c),d&&(s=!s)},n,this.rowCount)}return o||s?[]:r}},u6={moduleName:"InfiniteRowModelCore",version:he,rowModels:["infinite"],beans:[class extends Q{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if("infinite"!==this.gos.get("rowModelType"))return;const e=this.beans,t=new Js(e);this.rootNode=t,t.level=-1,this.rowHeight=kn(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=kn(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;e=!this.cacheParams||!xn(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]),e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){return this.infiniteCache?.getRowNodesInRange(e,t)??[]}reset(){this.datasource&&(null!=Co(this.gos)||this.beans.selectionSvc?.reset("rowDataChanged"),this.resetCache())}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:r,rowNodeBlockLoader:i,eventSvc:s,gos:n}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:r?.getSortModel()??[],rowNodeBlockLoader:i,initialRowCount:n.get("infiniteInitialRowCount"),maxBlocksInCache:n.get("maxBlocksInCache"),rowHeight:kn(e),overflowSize:n.get("cacheOverflowSize"),blockSize:n.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new n6(this.cacheParams)),s.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(r=>{r.id===e&&(t=r)}),t}forEachNode(e){this.infiniteCache?.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(0!==this.rowHeight){const t=Math.floor(e/this.rowHeight),r=this.getRowCount()-1;return t>r?r:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache?.refreshCache()}purgeCache(){this.infiniteCache?.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?.isLastRowIndexKnown()??!1}setRowCount(e,t){this.infiniteCache?.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}},class extends Q{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=function Vx(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=Cr(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){ki(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),null!=this.maxConcurrentRequests&&this.activeBlockLoadsCount>=this.maxConcurrentRequests)return void Us(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");const e=null!=this.maxConcurrentRequests?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(r=>"needsLoading"===r.state).slice(0,e);this.activeBlockLoadsCount+=t.length;for(const r of t)r.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:r,state:i}=t.getBlockStateJson();e[r]=i}),e}printCacheStatus(){Us(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}}]},h6={moduleName:"InfiniteRowModel",version:he,apiFunctions:{refreshInfiniteCache:function a6(e){Sc(e)?.refreshCache()},purgeInfiniteCache:function l6(e){Sc(e)?.purgeCache()},getInfiniteRowCount:function c6(e){return Sc(e)?.getRowCount()}},dependsOn:[u6,EA]},p6={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},C6={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},b6={moduleName:"HighlightChanges",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,r=this.beans.gos.get("cellFlashDuration"),i=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];s.delete(e);const n=Date.now(),o=n+r;s.set(e,{phase:"flash",flashEndTime:o,fadeEndTime:n+r+i});const c=`ag-cell-${t}`,d=`${c}-animation`,{comp:u,eGui:{style:h}}=e;u.toggleCss(c,!0),u.toggleCss(d,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&o+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),r)}),this.nextAnimationTime=o)}advanceAnimations(){const e=Date.now();let t=null;for(const r of Object.keys(this.animations)){const i=this.animations[r],s=`ag-cell-${r}`,n=`${s}-animation`;for(const[o,a]of i){if(!o.isAlive()||!o.comp){i.delete(o);continue}const{phase:l,flashEndTime:c,fadeEndTime:d}=a,u="flash"===l?c:d;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:f,eGui:{style:p}}=o;switch(l){case"flash":f.toggleCss(s,!1),f.toggleCss(n,!0),p.transition=`background-color ${d-c}ms`,p.transitionDelay=c-e+"ms",t=Math.min(d,t??1/0),a.phase="fade";break;case"fade":f.toggleCss(s,!1),f.toggleCss(n,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),i.delete(o)}}}null==t?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const r=function aE(e){const{rowIndex:t,rowPinned:r,column:i}=e;return`${t}.${r??"null"}.${i.getId()}`}(e.cellPosition);t.cells[r]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t?.flashDuration,t?.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}}],userComponents:{agAnimateShowChangeCellRenderer:class extends ft{constructor(){super(p6),this.eValue=ge,this.eDelta=ge,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const r=Math.abs(t),i=e.formatValue(r),s=le(i)?i:r,n=t>=0,o=this.eDelta;o.textContent=n?"\u2191"+s:"\u2193"+s,o.classList.toggle("ag-value-change-delta-up",n),o.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"),Rt(this.eDelta)}refresh(e,t=!1){const{value:r,valueFormatted:i}=e,{eValue:s,lastValue:n,beans:o}=this;if(r===n||(le(i)?s.textContent=i:le(r)?s.textContent=r:Rt(s),o.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=r&&"object"==typeof r&&"toNumber"in r?r.toNumber():r,l=n&&"object"==typeof n&&"toNumber"in n?n.toNumber():n;return a!==l&&("number"==typeof a&&"number"==typeof l&&this.showDelta(e,a-l),n&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=r,!0)}},agAnimateSlideCellRenderer:class extends ft{constructor(){super(C6),this.eCurrent=ge,this.refreshCount=0,this.registerCSS(".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}")}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious?.remove();const{beans:t,eCurrent:r}=this,i=nr({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=i,i.textContent=r.textContent,this.getGui().insertBefore(i,r),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.ePrevious?.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let r=e.value;if(pt(r)&&(r=""),r===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=r;const i=this.eCurrent;return le(e.valueFormatted)?i.textContent=e.valueFormatted:le(e.value)?i.textContent=r:Rt(i),!0}}},apiFunctions:{flashCells:function S6(e,t={}){const{cellFlashSvc:r}=e;r&&e.frameworkOverrides.wrapIncoming(()=>{for(const i of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))r.flashCell(i,t)})}}};function Cv(e){return(e={...e}).version||(e.version="32.1.0"),"32.1.0"===e.version&&(e=function F6(e){return e.cellSelection=function R6(e,t){if(e&&"object"==typeof e)return e[t]}(e,"rangeSelection"),e}(e)),e.version=he,e}var T6={moduleName:"GridState",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=Cr(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=Cr(this,()=>{this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(this.updateCachedState("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowGroupExpansion",void 0)):(this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("ssrmRowGroupExpansion",void 0))},0),this.onRowSelectedDebounced=Cr(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:r}=this.beans;this.isClientSideRowModel=rr(e);const i=Cv(e.get("initialState")??{}),s=i.partialColumnState;delete i.partialColumnState,this.cachedState=i;const n=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>n(()=>this.setupStateOnGridReady(i))),(i.columnOrder||i.columnVisibility||i.columnSizing||i.columnPinning||i.columnGroup)&&r?.hideColumns("columnState");const[o,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:c})=>{"gridInitializing"===c&&(o(),n(()=>{this.setupStateOnColumnsInitialised(i,!!s),r?.revealColumns("columnState")}))},rowCountReady:()=>{a?.(),n(()=>this.setupStateOnRowCountReady(i))},firstDataRendered:()=>{l?.(),n(()=>this.setupStateOnFirstDataRendered(i))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const r=Cv(e);delete r.partialColumnState,this.cachedState=r,this.startSuppressEvents();const i="api",s=t?new Set(t):void 0;this.setGridReadyState(r,i,s),this.setColumnsInitialisedState(r,i,!!s,s),this.setRowCountState(r,i,s),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(r,i,s),this.stopSuppressEvents(i)})}setGridReadyState(e,t,r){"api"===t&&!r?.has("sideBar")&&this.beans.sideBar?.comp?.setState(e.sideBar),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,r,i){this.setColumnState(e,t,r,i),this.setColumnGroupState(e,t,i),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const r=i=>()=>this.updateColumnState([i]);this.addManagedEventListeners({columnValueChanged:r("aggregation"),columnMoved:r("columnOrder"),columnPinned:r("columnPinning"),columnResized:r("columnSizing"),columnVisible:r("columnVisibility"),columnPivotChanged:r("pivot"),columnPivotModeChanged:r("pivot"),columnRowGroupChanged:r("rowGroup"),sortChanged:r("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,r){const{filter:i,rowGroupExpansion:s,ssrmRowGroupExpansion:n,rowSelection:o,pagination:a}=e,l=(d,u)=>!r?.has(d)&&(u||"api"===t);l("filter",i)&&this.setFilterState(i),l("rowGroupExpansion",s)&&this.setRowGroupExpansionState(n,s,t),l("rowSelection",o)&&this.setRowSelectionState(o,t),l("pagination",a)&&this.setPaginationState(a,t);const c=this.updateCachedState.bind(this);c("filter",this.getFilterState()),this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(c("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),c("rowGroupExpansion",void 0)):(c("rowGroupExpansion",this.getRowGroupExpansionState()),c("ssrmRowGroupExpansion",void 0)),c("rowSelection",this.getRowSelectionState()),c("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),r=()=>{this.updateRowGroupExpansionStateTimer=0,this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(t("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),t("rowGroupExpansion",void 0)):(t("rowGroupExpansion",this.getRowGroupExpansionState()),t("ssrmRowGroupExpansion",void 0))},i=()=>t("filter",this.getFilterState()),{gos:s,colFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:i,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:r,columnRowGroupChanged:r,rowDataUpdated:()=>{(0!==s.get("groupDefaultExpanded")||s.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(r)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:o=>{(o.newPage||o.newPageSize)&&t("pagination",this.getPaginationState())}}),n&&this.addManagedListeners(n,{filterStateChanged:i})}setFirstDataRenderedState(e,t,r){const{scroll:i,cellSelection:s,focusedCell:n,columnOrder:o,rowPinning:a}=e,l=(u,h)=>!r?.has(u)&&(h||"api"===t);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(!!o?.orderedColIds,t);const c=this.updateCachedState.bind(this);c("sideBar",this.getSideBarState()),c("focusedCell",this.getFocusedCellState());const d=this.getRangeSelectionState();c("rangeSelection",d),c("cellSelection",d),c("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),r=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:r,cellFocusCleared:r,cellSelectionChanged:i=>{if(i.finished){const s=this.getRangeSelectionState();t("rangeSelection",s),t("cellSelection",s)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return function bP(e,t=!1){const r=[],i=[],s=[],n=[],o=[],a=[],l=[],c=[],d=[];let u=0;for(let h=0;h<e.length;h++){const{colId:f,sort:p,sortIndex:g,rowGroup:m,rowGroupIndex:v,aggFunc:w,pivot:C,pivotIndex:y,pinned:k,hide:E,width:S,flex:_}=e[h];d.push(f),p&&(r[g??u++]={colId:f,sort:p}),m&&(i[v??0]=f),"string"==typeof w&&s.push({colId:f,aggFunc:w}),C&&(n[y??0]=f),k&&("right"===k?a:o).push(f),E&&l.push(f),(null!=_||S)&&c.push({colId:f,flex:_??void 0,width:S})}return{sort:r.length?{sortModel:fh(r)}:void 0,rowGroup:i.length?{groupColIds:fh(i)}:void 0,aggregation:s.length?{aggregationModel:s}:void 0,pivot:n.length||t?{pivotMode:t,pivotColIds:fh(n)}:void 0,columnPinning:o.length||a.length?{leftColIds:o,rightColIds:a}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:c.length?{columnSizingModel:c}:void 0,columnOrder:d.length?{orderedColIds:d}:void 0}}(Nl(e),e.colModel.isPivotMode())}setColumnState(e,t,r,i){const{sort:s,rowGroup:n,aggregation:o,pivot:a,columnPinning:l,columnVisibility:c,columnSizing:d,columnOrder:u}=e;let h=!1;const f=(V,B)=>{const re=!(i?.has(V)||!B&&"api"!==t);return h||(h=re),re},p={},g=V=>{let B=p[V];return B||(B={colId:V},p[V]=B,B)},m={},v=f("sort",s);v&&s?.sortModel.forEach(({colId:V,sort:B},re)=>{const ue=g(V);ue.sort=B,ue.sortIndex=re}),(v||!r)&&(m.sort=null,m.sortIndex=null);const w=f("rowGroup",n);w&&n?.groupColIds.forEach((V,B)=>{const re=g(V);re.rowGroup=!0,re.rowGroupIndex=B}),(w||!r)&&(m.rowGroup=null,m.rowGroupIndex=null);const C=f("aggregation",o);C&&o?.aggregationModel.forEach(({colId:V,aggFunc:B})=>{g(V).aggFunc=B}),(C||!r)&&(m.aggFunc=null);const y=f("pivot",a);y&&(a?.pivotColIds.forEach((V,B)=>{const re=g(V);re.pivot=!0,re.pivotIndex=B}),this.gos.updateGridOptions({options:{pivotMode:!!a?.pivotMode},source:t})),(y||!r)&&(m.pivot=null,m.pivotIndex=null);const k=f("columnPinning",l);if(k){for(const V of l?.leftColIds??[])g(V).pinned="left";for(const V of l?.rightColIds??[])g(V).pinned="right"}(k||!r)&&(m.pinned=null);const E=f("columnVisibility",c);if(E)for(const V of c?.hiddenColIds??[])g(V).hide=!0;(E||!r)&&(m.hide=null);const S=f("columnSizing",d);if(S)for(const{colId:V,flex:B,width:re}of d?.columnSizingModel??[]){const ue=g(V);ue.flex=B??null,ue.width=re}(S||!r)&&(m.flex=null);const _=u?.orderedColIds,M=!!_?.length&&!i?.has("columnOrder"),H=M?_.map(V=>g(V)):Object.values(p);(H.length||h)&&(this.columnStates=H,$i(this.beans,{state:H,applyOrder:M,defaultState:m},t))}setColumnPivotState(e,t){const r=this.columnStates;this.columnStates=void 0;const i=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:n,colGroupSvc:o}=s;if(n?.isPivotResultColsPresent()){if(r){const a=[];for(const l of r)n.getPivotResultCol(l.colId)&&a.push(l);$i(s,{state:a,applyOrder:e},t)}i&&o?.setColumnGroupState(i,t)}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(e)return function _m(e){const t=[];for(const{groupId:r,open:i}of e)i&&t.push(r);return t.length?{openColumnGroupIds:t}:void 0}(e.getColumnGroupState())}setColumnGroupState(e,t,r){const i=this.beans.colGroupSvc;if(!i||r?.has("columnGroup")||"api"!==t&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const s=new Set(e.columnGroup?.openColumnGroupIds),o=i.getColumnGroupState().map(({groupId:a})=>{const l=s.has(a);return l&&s.delete(a),{groupId:a,open:l}});for(const a of s)o.push({groupId:a,open:!0});o.length&&(this.columnGroupStates=o),i.setColumnGroupState(o,t)}getFilterState(){const e=this.beans.filterManager;let t=e?.getFilterModel();t&&0===Object.keys(t).length&&(t=void 0);const r=e?.getFilterState(),i=e?.getAdvFilterModel()??void 0;return t||i||r?{filterModel:t,columnFilterState:r,advancedFilterModel:i}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:r,columnFilterState:i,advancedFilterModel:s}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(void 0!==r||void 0!==i)&&t?.setFilterState(r??null,i??null,"columnFilter"),void 0!==s&&t?.setAdvFilterModel(s??null,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:r,type:i,startRow:s,endRow:n,columns:o,startColumn:a}=t;return{id:r,type:i,startRow:s,endRow:n,colIds:o.map(l=>l.getColId()),startColId:a.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:r,colModel:i,visibleCols:s}=this.beans;if(!xs(t)||!r)return;const n=[];for(const o of e?.cellRanges??[]){const a=[];for(const c of o.colIds){const d=i.getCol(c);d&&a.push(d)}if(!a.length)continue;let l=i.getCol(o.startColId);if(!l){const c=s.allCols,d=new Set(a);l=c.find(u=>d.has(u))}n.push({...o,columns:a,startColumn:l})}r.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:r}=e?.getVScrollPosition()??{top:0};return r||t?{top:r,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:r}=e??{top:0,left:0},{frameworkOverrides:i,rowRenderer:s,animationFrameSvc:n,ctrlsSvc:o}=this.beans;i.wrapIncoming(()=>{o.get("center").setCenterViewportScrollLeft(r),o.getScrollFeature()?.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),n?.flushAllFrames()})}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:r,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:r,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:r}=this.beans;if(!e)return void t.clearFocusedCell();const{colId:i,rowIndex:s,rowPinned:n}=e;t.setFocusedCell({column:r.getCol(i),rowIndex:s,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const r=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();return r||i?{page:r,pageSize:i}:void 0}setPaginationState(e,t){const{pagination:r,gos:i}=this.beans;if(!r)return;const{pageSize:s,page:n}=e??{page:0,pageSize:i.get("paginationPageSize")},o="gridInitializing"===t;s&&!i.get("paginationAutoPageSize")&&r.setPageSize(s,o?"initialState":"pageSizeSelector"),"number"==typeof n&&(o?r.setPage(n):r.goToPage(n))}getRowSelectionState(){const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return t&&(Array.isArray(t)||!1!==t.selectAll&&!1!==t.selectAllChildren||t?.toggledNodes?.length)?t:void 0}setRowSelectionState(e,t){this.beans.selectionSvc?.setSelectionState(e,t,"api"===t)}getRowGroupExpansionState(){const{expansionSvc:e}=this.beans;if(e)return e.getExpansionState()}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,r){const i=this.beans.expansionSvc;i&&i.setExpansionState(t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]},r)}updateColumnState(e){const t=this.getColumnState();let r=!1;const i=this.cachedState;for(const s of Object.keys(t))xn(t[s],i[s])||(r=!0);this.cachedState={...i,...t},r&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const r=this.cachedState[e];this.setCachedStateValue(e,t),xn(t,r)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)"rowSelection"===t&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){this.suppressEvents=!0,this.beans.colAnimation?.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.beans.colAnimation?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}}],apiFunctions:{getState:function y6(e){return e.stateSvc?.getState()??{}},setState:function E6(e,t,r){return e.stateSvc?.setState(t,r)}}},Na="paginationPageSizeSelector",G6={tag:"span",cls:"ag-paging-page-size"},z6={selector:"AG-PAGE-SIZE-SELECTOR",component:class extends ft{constructor(){super(G6),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(Na,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&this.reloadPageSizesSelector()}reset(){Rt(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&!1!==this.gos.get(Na)}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),r=!t||!e.includes(t);if(r){const s=this.gos.exists("paginationPageSize"),n=!0!==this.gos.get(Na);ne(94,{pageSizeSet:s,pageSizesSet:n,pageSizeOptions:e,paginationPageSizeOption:t}),n||ne(95,{paginationPageSizeOption:t,paginationPageSizeSelector:Na}),e.unshift("")}const i=String(r?"":t);this.selectPageSizeComp?(qs(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(i,!0)):this.createPageSizeSelectorComp(e,i),this.hasEmptyOption=r}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const r=this.getLocaleTextFunc(),i=r("pageSizeSelectorLabel","Page Size:"),s=r("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new ru).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(s).setLabel(i).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const t=this.gos.get(Na);return Array.isArray(t)&&t?.length?[...t].sort((r,i)=>r-i):[20,50,100]}destroy(){this.toggleSelectDisplay(!1),super.destroy()}}},$6={selector:"AG-PAGINATION",component:class extends k0{constructor(){super(),this.btFirst=ge,this.btPrevious=ge,this.btNext=ge,this.btLast=ge,this.lbRecordCount=ge,this.lbFirstRowOnPage=ge,this.lbLastRowOnPage=ge,this.lbCurrent=ge,this.lbTotal=ge,this.pageSizeComp=ge,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:var(--ag-pagination-panel-height);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}")}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[z6]);const{btFirst:t,btPrevious:r,btNext:i,btLast:s}=this;this.activateTabIndex([t,r,i,s]),t.insertAdjacentElement("afterbegin",Ti(e?"last":"first",this.beans)),r.insertAdjacentElement("afterbegin",Ti(e?"next":"previous",this.beans)),i.insertAdjacentElement("afterbegin",Ti(e?"previous":"next",this.beans)),s.insertAdjacentElement("afterbegin",Ti(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(n):function ky(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}(this.beans,n),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}]){const{el:t,fn:r}=e;this.addManagedListeners(t,{click:r,keydown:i=>{("Enter"===i.key||" "===i.key)&&(i.preventDefault(),r())}})}(function Ry(e,t,r){t.addManagedElementListeners(r,{keydown:i=>{if(!i.defaultPrevented&&"Tab"===i.key){const s=i.shiftKey;An(e,r,!1,s)||Po(e,s)&&i.preventDefault()}}})})(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):function EP(e,t){if("number"!=typeof e)return"";const r=t(),i=r("thousandSeparator",","),s=r("decimalSeparator",".");return e.toString().replace(".",s).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${i}`)}(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),r=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=0===e,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const i=this.isZeroPagesToDisplay();this.nextButtonDisabled=e===r-1||i,this.lastButtonDisabled=!t||i||e===r-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){(function nt(e,t){Tr(e,"disabled",t)})(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&0===t}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),r=this.pagination.getMasterRowCount(),i=e?r:null,s=this.pagination.getCurrentPage(),n=this.pagination.getPageSize();let o,a;this.isZeroPagesToDisplay()?o=a=0:(o=n*s+1,a=o+n-1,e&&a>i&&(a=i));const c=!e&&r<o+n-1,d=this.formatNumber(o);let u;this.lbFirstRowOnPage.textContent=d;const h=this.getLocaleTextFunc();u=c?h("pageLastRowUnknown","?"):this.formatNumber(a),this.lbLastRowOnPage.textContent=u;const g=this.formatNumber(t>0?s+1:0);let m,v;if(this.lbCurrent.textContent=g,e)m=this.formatNumber(t),v=this.formatNumber(i);else{const w=h("more","more");m=w,v=w}this.lbTotal.textContent=m,this.lbRecordCount.textContent=v,this.announceAriaStatus(d,u,v,g,m)}announceAriaStatus(e,t,r,i,s){const n=this.getLocaleTextFunc(),o=n("page","Page"),a=n("to","to"),l=n("of","of"),c=`${e} ${a} ${t} ${l} ${r}`,d=`${o} ${i} ${l} ${s}`;c!==this.ariaRowStatus&&(this.ariaRowStatus=c,this.ariaAnnounce?.announceValue(c,"paginationRow")),d!==this.ariaPageStatus&&(this.ariaPageStatus=d,this.ariaAnnounce?.announceValue(d,"paginationPage"))}}},K6={moduleName:"Pagination",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return $6}isPaginateChildRows(){const e=this.gos;return!!(e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren"))||e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||"number"!=typeof t)return;const{editSvc:r}=this.beans;r?.isEditing()&&(r.isBatchEditing()?r.cleanupEditors():r.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){if(!this.active)return;let t=e;this.paginateChildRows||(t=this.beans.rowModel.getTopLevelIndexFromDisplayedIndex?.(e)??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return!this.active||e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return le(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:le(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:le(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:le(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(void 0===this.pageSizeAutoCalculated)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const r=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,0!==this.currentPage&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,0!==this.currentPage&&this.goToFirstPage()}r!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0)return void this.setZeroRows();const r=this.pageSize,i=t-1;this.totalPages=Math.floor(i/r)+1,this.adjustCurrentPageIfInvalid();const s=this.currentPage;let o=r*(s+1)-1;if(o>i&&(o=i),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(r*s),o===i)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(o+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,0===e)return void this.setZeroRows();const{pageSize:t,currentPage:r}=this,i=e-1;this.totalPages=Math.floor(i/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*r,this.bottomDisplayedRowIndex=t*(r+1)-1,this.bottomDisplayedRowIndex>i&&(this.bottomDisplayedRowIndex=i)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:r=!1,newPageSize:i=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:r,newPageSize:i,keepRenderedRows:t})}},class extends Q{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||null==this.centerRowsCtrl}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,r=()=>{const i=Math.max(kn(t),1),s=Math.floor(e/i);t.pagination.setPageSize(s,"autoCalculated")};this.isBodyRendered?Cr(this,r,50)():(r(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}}],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:function P6(e){return e.rowModel.isLastRowIndexKnown()},paginationGetPageSize:function D6(e){return e.pagination?.getPageSize()??100},paginationGetCurrentPage:function A6(e){return e.pagination?.getCurrentPage()??0},paginationGetTotalPages:function M6(e){return e.pagination?.getTotalPages()??1},paginationGetRowCount:function I6(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()},paginationGoToNextPage:function _6(e){e.pagination?.goToNextPage()},paginationGoToPreviousPage:function L6(e){e.pagination?.goToPreviousPage()},paginationGoToFirstPage:function O6(e){e.pagination?.goToFirstPage()},paginationGoToLastPage:function B6(e){e.pagination?.goToLastPage()},paginationGoToPage:function N6(e,t){e.pagination?.goToPage(t)}},dependsOn:[yc]},iM={moduleName:"RowApi",version:he,apiFunctions:{redrawRows:function q6(e,t={}){const r=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(r))},setRowNodeExpanded:function wv(e,t,r,i,s){t&&(i&&t.parent&&-1!==t.parent.level&&wv(e,t.parent,r,i,s),t.setExpanded(r,void 0,s))},getRowNode:function X6(e,t){return e.rowModel.getRowNode(t)},addRenderedRowListener:function Y6(e,t,r,i){e.rowRenderer.addRenderedRowListener(t,r,i)},getRenderedNodes:function Q6(e){return e.rowRenderer.getRenderedNodes()},forEachNode:function J6(e,t,r){e.rowModel.forEachNode(t,r)},getFirstDisplayedRowIndex:function Z6(e){return e.rowRenderer.firstRenderedRow},getLastDisplayedRowIndex:function eM(e){return e.rowRenderer.lastRenderedRow},getDisplayedRowAtIndex:function tM(e,t){return e.rowModel.getRow(t)},getDisplayedRowCount:function rM(e){return e.rowModel.getRowCount()}}},sM={moduleName:"ScrollApi",version:he,apiFunctions:{getVerticalPixelRange:function m4(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()},getHorizontalPixelRange:function v4(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()},ensureColumnVisible:tv,ensureIndexVisible:rv,ensureNodeVisible:function C4(e,t,r=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,r),"ensureVisible")}}},hM={moduleName:"RenderApi",version:he,apiFunctions:{setGridAriaProperty:function nM(e,t,r){if(!t)return;const i=e.ctrlsSvc.getGridBodyCtrl().eGridBody,s=`aria-${t}`;null===r?i.removeAttribute(s):i.setAttribute(s,r)},refreshCells:function oM(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))},refreshHeader:function aM(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})},isAnimationFrameQueueEmpty:function lM(e){return e.animationFrameSvc?.isQueueEmpty()??!0},flushAllAnimationFrames:function cM(e){e.animationFrameSvc?.flushAllFrames()},getSizesForCurrentTheme:function dM(e){return{rowHeight:kn(e),headerHeight:ya(e)}},getCellRendererInstances:function uM(e,t={}){const r=[];for(const n of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const o=n.getCellRenderer();null!=o&&r.push(xa(o))}if(t.columns?.length)return r;const i=[],s=lh(t.rowNodes);for(const n of e.rowRenderer.getAllRowCtrls()){if(s&&!ch(n.rowNode,s)||!n.isFullWidth())continue;const o=n.getFullWidthCellRenderers();for(let a=0;a<o.length;a++){const l=o[a];null!=l&&i.push(xa(l))}}return[...i,...r]}}};function xv({colAutosize:e,visibleCols:t},r,i){Array.isArray(r)?e?.autoSizeCols({colKeys:r,skipHeader:i,source:"api"}):e?.autoSizeCols({...r,colKeys:r.colIds??t.allCols,source:"api"})}function mM(e,t,r={}){const i=r.minWidth??e.getMinWidth();t<i&&(t=i);const s=r.maxWidth??e.getMaxWidth();return t>s&&(t=s),t}function Sv({ctrlsSvc:e,scrollVisibleSvc:t}){const r=e.getGridBodyCtrl(),s=r.isVerticalScrollShowing()?t.getScrollbarWidth():0;return Ut(r.eGridBody)-s}var vM={moduleName:"ColumnAutoSize",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let r=!1;const i=t.type;if("fitGridWidth"===i||"fitProvidedWidth"===i)r=!0;else if("fitCellContents"===i){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const s=e.get("rowData");r=null!=s&&s.length>0&&rr(e)}r&&this.beans.colDelayRenderSvc?.hideColumns(i)}}autoSizeCols(e){const{eventSvc:t,visibleCols:r}=this.beans;this.innerAutoSizeCols(e).then(i=>{const s=c=>So(t,Array.from(c),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return s(i);const n=Sv(this.beans),l=e.colKeys.filter(c=>!(bs(c)||ys(c)||(c=>r.leftCols.some(d=>va(d,c)))(c)||(c=>r.rightCols.some(d=>va(d,c)))(c)));this.sizeColumnsToFit(n,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:e.columnLimits?.map(c=>({...c,key:c.colId})),colKeys:l,onlyScaleUp:!0}),s(i)})}innerAutoSizeCols(e){return new Promise((t,r)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,r));const{colKeys:i,skipHeader:s,skipHeaderGroups:n,stopAtGroup:o,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:c=[],source:d="api"}=e,{animationFrameSvc:u,renderStatus:h,colModel:f,autoWidthCalc:p,visibleCols:g}=this.beans;if(u?.flushAllFrames(),this.timesDelayed<5&&h&&(!h.areHeaderCellsRendered()||!h.areCellsRendered()))return this.timesDelayed++,void setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,r)});this.timesDelayed=0;const m=new Set;let v=-1;const w=Object.fromEntries(c.map(({colId:k,...E})=>[k,E])),C=s??this.gos.get("skipHeaderOnAutoSize"),y=n??C;for(;0!==v;){v=0;const k=[];for(const E of i){if(!E||rS(E))continue;const S=f.getCol(E);if(!S||m.has(S))continue;const _=p.getPreferredWidthForColumn(S,C);if(_>0){const M=w[S.colId]??{};M.minWidth??(M.minWidth=l),M.maxWidth??(M.maxWidth=a);const H=mM(S,_,M);S.setActualWidth(H,d),m.add(S),v++}k.push(S)}k.length&&g.refresh(d)}y||this.autoSizeColumnGroupsByColumns(i,d,o),t(m)})}autoSizeColumn(e,t,r){this.autoSizeCols({colKeys:[e],skipHeader:r,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,r){const{colModel:i,ctrlsSvc:s}=this.beans,n=new Set,o=i.getColsForKeys(e);for(const l of o){let c=l.getParent();for(;c&&c!=r;)c.isPadding()||n.add(c),c=c.getParent()}let a;for(const l of n){for(const c of s.getHeaderRowContainerCtrls())if(a=c.getHeaderCtrlForColumn(l),a)break;a?.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){this.shouldQueueResizeOperations?this.pushResizeOperation(()=>this.autoSizeAllColumns(e)):this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const r=this.gos.get("skipHeaderOnAutoSize"),i=()=>{this.autoSizeColumn(t,"uiColumnResized",r)};e.addEventListener("dblclick",i);const s=new Bn(e);return s.addEventListener("doubleTap",i),()=>{e.removeEventListener("dblclick",i),s.destroy()}}addColumnGroupResize(e,t,r){const i=this.gos.get("skipHeaderOnAutoSize"),s=()=>{const n=[],o=t.getDisplayedLeafColumns();for(const a of o)a.getColDef().suppressAutoSize||n.push(a.getColId());n.length>0&&this.autoSizeCols({colKeys:n,skipHeader:i,stopAtGroup:t,source:"uiColumnResized"}),r()};return e.addEventListener("dblclick",s),()=>e.removeEventListener("dblclick",s)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const r=Sv(this.beans);r>0?this.sizeColumnsToFit(r,"sizeColumnsToFit",!1,e):void 0===t?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):100===t?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):500===t?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):ne(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",r,i){if(this.shouldQueueResizeOperations)return void this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,r,i));const s={};for(const{key:p,...g}of i?.columnLimits??[])s["string"==typeof p?p:p.getColId()]=g;const n=this.beans.visibleCols.allCols;if(e<=0||!n.length)return;const o=Ss(n);if(i?.onlyScaleUp&&o>e||e===o&&n.every(g=>{if(g.colDef.suppressSizeToFit)return!0;const m=s?.[g.getId()],v=m?.minWidth??i?.defaultMinWidth,w=m?.maxWidth??i?.defaultMaxWidth,C=g.getActualWidth();return(null==v||C>=v)&&(null==w||C<=w)}))return;const l=[],c=[];for(const p of n){const g=i?.colKeys?.some(m=>va(p,m))??!0;p.getColDef().suppressSizeToFit||!g?c.push(p):l.push(p)}const d=l.slice(0);let u=!1;const h=p=>{ki(l,p),c.push(p)};for(const p of l){p.resetActualWidth(t);const g=s?.[p.getId()],m=g?.minWidth??i?.defaultMinWidth,v=g?.maxWidth??i?.defaultMaxWidth,w=p.getActualWidth();"number"==typeof m&&w<m?p.setActualWidth(m,t,!0):"number"==typeof v&&w>v&&p.setActualWidth(v,t,!0)}for(;!u;){u=!0;const p=e-Ss(c);if(p<=0)for(const g of l){const m=s?.[g.getId()]?.minWidth??i?.defaultMinWidth??g.minWidth;g.setActualWidth(m,t,!0)}else{const g=p/Ss(l);let m=p;for(let v=l.length-1;v>=0;v--){const w=l[v],C=s?.[w.getId()],y=C?.minWidth??i?.defaultMinWidth,k=C?.maxWidth??i?.defaultMaxWidth,E=w.getMinWidth(),S=w.getMaxWidth(),_="number"==typeof y&&y>E?y:E,M="number"==typeof k&&k<S?k:S;let H=Math.round(w.getActualWidth()*g);H<_?(H=_,h(w),u=!1):H>M?(H=M,h(w),u=!1):0===v&&(H=m),w.setActualWidth(H,t,!0),m-=H}}}for(const p of d)p.fireColumnWidthChangedEvent(t);const f=this.beans.visibleCols;f.setLeftValues(t),f.updateBodyWidths(),!r&&So(this.eventSvc,d,!0,t)}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,r=e.get("autoSizeStrategy");"fitGridWidth"!==r?.type&&"fitProvidedWidth"!==r?.type||setTimeout(()=>{if(!this.isAlive())return;const i=r.type;if("fitGridWidth"===i){const{columnLimits:s,defaultMinWidth:n,defaultMaxWidth:o}=r,a=s?.map(({colId:l,minWidth:c,maxWidth:d})=>({key:l,minWidth:c,maxWidth:d}));this.sizeColumnsToFitGridBody({defaultMinWidth:n,defaultMaxWidth:o,columnLimits:a})}else"fitProvidedWidth"===i&&this.sizeColumnsToFit(r.width,"sizeColumnsToFit");t?.revealColumns(i)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{if(!this.isAlive())return;const r="autosizeColumns";e?this.autoSizeCols({...t,source:r,colKeys:e}):this.autoSizeAllColumns({...t,source:r}),this.beans.colDelayRenderSvc?.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}}],apiFunctions:{sizeColumnsToFit:function fM(e,t){"number"==typeof t?e.colAutosize?.sizeColumnsToFit(t,"api"):e.colAutosize?.sizeColumnsToFitGridBody(t)},autoSizeColumns:xv,autoSizeAllColumns:function gM(e,t){t&&"object"==typeof t?xv(e,t):e.colAutosize?.autoSizeAllColumns({source:"api",skipHeader:t})}},dependsOn:[j0]},EM={moduleName:"PinnedRow",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:e}=this,t=()=>{const r=e.get("enableRowPinning"),i=Og(e),n=!!r||"pinnedBottom"===i||"pinnedTop"===i,o=n?this.inner instanceof E0:this.inner instanceof S0;this.inner&&o&&this.destroyBean(this.inner),(o||!this.inner)&&(this.inner=this.createManagedBean(n?new S0:new E0))};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,r){return this.inner.pinRow(e,t,r)}ensureRowHeightsValid(){return this.inner.ensureRowHeightsValid()}getPinnedRowById(e,t){return this.inner.getPinnedRowById(e,t)}getPinnedTopTotalHeight(){return this.inner.getPinnedTopTotalHeight()}getPinnedBottomTotalHeight(){return this.inner.getPinnedBottomTotalHeight()}getPinnedTopRowCount(){return this.inner.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.inner.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.inner.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.inner.getPinnedBottomRow(e)}forEachPinnedRow(e,t){return this.inner.forEachPinnedRow(e,t)}getPinnedState(){return this.inner.getPinnedState()}setPinnedState(e){return this.inner.setPinnedState(e)}setGrandTotalPinned(e){return this.inner.setGrandTotalPinned(e)}getGrandTotalPinned(){return this.inner.getGrandTotalPinned()}}],css:[".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}"],apiFunctions:{getPinnedTopRowCount:function wM(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0},getPinnedBottomRowCount:function xM(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0},getPinnedTopRow:function SM(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)},getPinnedBottomRow:function bM(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)},forEachPinnedRow:function yM(e,t,r){return e.pinnedRowModel?.forEachPinnedRow(t,r)}},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},FM=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column===this.col&&e.rowPinned==this.firstNode.rowPinned&&this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){const e=this.firstNode.__autoHeights?.[this.col.getColId()];if(null==e)return;let t=0;for(const r of this.spannedNodes)r!==this.lastNode&&(t+=r.rowHeight);return e-t}},RM=class extends Q{constructor(e){super(),this.column=e}buildCache(e){const{column:t,beans:{gos:r,pinnedRowModel:i,rowModel:s,valueSvc:n,pagination:o}}=this,{colDef:a}=t,l=this.getNodeMap(e),c=new Map,d=r.getCallback("isFullWidthRow"),u=a.equals,h=a.spanRows,f="function"==typeof h;let m,p=null,g=null;const v=(C,y)=>{p=C,g=null,m=y},w=C=>{const y=!(C.isExpandable()||C.group||C.detail||d&&d({rowNode:C}));if(null==C.rowIndex||!y)return void v(null,null);if(null==p||C.level!==p.level||C.footer||g&&C.rowIndex-1!==g?.getLastNode().rowIndex)return void v(C,n.getValue(t,C));const k=n.getValue(t,C);if(f){const E=_e(r,{valueA:m,nodeA:p,valueB:k,nodeB:C,column:t,colDef:a});if(!h(E))return void v(C,k)}else if(u?!u(m,k):m!==k)return void v(C,k);if(!g){const E=l?.get(p);E?.firstNode===p?(E.reset(),g=E):g=new FM(t,p),c.set(p,g)}g.addSpannedNode(C),c.set(C,g)};switch(e){case"center":s.forEachDisplayedNode?.(C=>{(!o||o.isRowInPage(C.rowIndex))&&w(C)}),this.centerValueNodeMap=c;break;case"top":i?.forEachPinnedRow("top",w),this.topValueNodeMap=c;break;case"bottom":i?.forEachPinnedRow("bottom",w),this.bottomValueNodeMap=c}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},TM=class extends _o{constructor(e,t,r){super(e.col,e.firstNode,r,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,r,i,s,n,o){this.eWrapper=r,super.setComp(e,t,r,i,s,n,o),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||null==t.rowIndex||dt(e,t.rowIndex)}setAriaRowSpan(){!function Bt(e,t){Xr(e,"rowspan",t)}(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(nc(t))return void(this.focusedCellPosition=void 0);const r=this.isCellFocused();r||(this.focusedCellPosition=void 0),e&&r&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},PM=class extends xc{onRowIndexChanged(){super.onRowIndexChanged();for(const e of this.getAllCellCtrls())e.refreshAriaRowIndex()}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){const t=this.beans.rowSpanSvc?.getCellSpan(e,this.rowNode);if(t&&t.firstNode===this.rowNode)return new TM(t,this,this.beans)}isCorrectCtrlForSpan(e){const t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);return!(!t||t.firstNode!==this.rowNode)&&e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},AM={moduleName:"CellSpan",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=Cr(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=Cr(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 r=this.createManagedBean(new RM(e));this.spanningColumns.set(e,r),r.buildCache("top"),r.buildCache("bottom"),r.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(null!=this.pinnedTimeout)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t?.createCtrls("top"),t?.createCtrls("bottom")},0)}else null==this.modelTimeout&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t?.createCtrls("center")},0))}buildModelCaches(){null!=this.modelTimeout&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){null!=this.pinnedTimeout&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const r=this.spanningColumns.get(e);return!!r&&r.isCellSpanning(t)}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:r}=this.beans,s=e.rowIndex,n=this.spanningColumns.get(e.column);if(!n)return;let o;switch(e.rowPinned){case"top":o=t?.getPinnedTopRow(s);break;case"bottom":o=t?.getPinnedBottomRow(s);break;default:o=r.getRow(s)}return o?n.getCellSpan(o):void 0}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const r=this.spanningColumns.get(e);if(r)return r.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[r,i]of this.spanningColumns)i.isCellSpanning(e)&&t(r,i.getCellSpan(e))}destroy(){super.destroy(),this.spanningColumns.clear()}},class extends Q{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,r=this.getCtrlsMap(e),i=r.size,s=this.getAllRelevantRowControls(e),n=new Map;let o=!1;for(const l of s)l.isAlive()&&t?.forEachSpannedColumn(l.rowNode,(c,d)=>{if(n.has(d.firstNode))return;const u=r.get(d.firstNode);if(u)return n.set(d.firstNode,u),void r.delete(d.firstNode);o=!0;const h=new PM(d.firstNode,this.beans,!1,!1,!1);n.set(d.firstNode,h)});if(this.setCtrlsMap(e,n),o||n.size!==i){for(const l of r.values())l.destroyFirstPass(!0),l.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,r=t?.getCellSpanByPosition(e);if(!r)return;const i=this.getCtrlsMap(e.rowPinned).get(r.firstNode);return i?i.getAllCellCtrls().find(s=>s.column===e.column):void 0}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}}]},MM=class extends Q{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,r=e.colDef,i=r.cellClassRules,s=this.getCellClassParams(e,r);oh(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,r=t.cellStyle;if(!r)return;let i;i="function"==typeof r?r(this.getCellClassParams(e,t)):r,i&&this.cellComp.setUserStyles(i)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,r=e.colDef,i=this.getCellClassParams(e,r);for(const n of this.staticClasses)t.toggleCss(n,!1);const s=this.beans.cellStyles.getStaticCellClasses(r,i);this.staticClasses=s;for(const n of s)t.toggleCss(n,!0)}getCellClassParams(e,t){const{value:r,rowNode:i}=this.cellCtrl;return _e(this.beans.gos,{value:r,data:i.data,node:i,colDef:t,column:e,rowIndex:i.rowIndex})}},_M={moduleName:"CellStyle",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,r,i){oh(this.beans.expressionSvc,void 0,e.cellClassRules,t,r,i),this.processStaticCellClasses(e,t,r)}getStaticCellClasses(e,t){const{cellClass:r}=e;if(!r)return[];let i;return i="function"==typeof r?r(t):r,"string"==typeof i&&(i=[i]),i||[]}createCellCustomStyleFeature(e,t){return new MM(e,t)}processStaticCellClasses(e,t,r){this.getStaticCellClasses(e,t).forEach(s=>{r(s)})}}]},LM={moduleName:"RowStyle",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const r=this.gos,i=o=>{if("string"==typeof o)e.push(o);else if(Array.isArray(o))for(const a of o)e.push(a)},s=r.get("rowClass");s&&i(s);const n=r.getCallback("getRowClass");n&&i(n({data:t.data,node:t,rowIndex:t.rowIndex}))}preProcessRowClassRules(e,t){this.processRowClassRules(t,r=>{e.push(r)},()=>{})}processRowClassRules(e,t,r){const{gos:i,expressionSvc:s}=this.beans,n=_e(i,{data:e.data,node:e,rowIndex:e.rowIndex});oh(s,void 0,i.get("rowClassRules"),n,t,r)}processStylesFromGridOptions(e){const t=this.gos,r=t.get("rowStyle"),i=t.getCallback("getRowStyle");let s;if(i&&(s=i({data:e.data,node:e,rowIndex:e.rowIndex})),s||r)return Object.assign({},r,s)}}]},BM=class extends Q{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=r=>{const{beans:i,gos:s,element:n,columns:o}=this,a=i.colHover;if(r??s.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(n,{mouseover:a.setMouseOver.bind(a,o),mouseout:a.clearMouseOver.bind(a)});else{for(const c of this.destroyManagedListeners)c();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},GM={moduleName:"ColumnHover",version:he,beans:[class extends Q{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,r){const i=()=>{const s=this.isHovered(r);t.toggleCss("ag-column-hover",s)};e.addManagedEventListeners({columnHoverChanged:i}),i()}onCellColumnHover(e,t){if(!t)return;const r=this.isHovered(e);t.toggleCss("ag-column-hover",r)}addHeaderFilterColumnHoverListener(e,t,r,i){this.createHoverFeature(e,[r],i);const s=()=>{const n=this.isHovered(r);t.toggleCss("ag-column-hover",n)};e.addManagedEventListeners({columnHoverChanged:s}),s()}createHoverFeature(e,t,r){e.createManagedBean(new BM(t,r))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}}],apiFunctions:{isColumnHovered:function OM(e,t){return!!e.colHover?.isHovered(t)}}},jM={moduleName:"EventApi",version:he,apiFunctions:{addEventListener:function zM(e,t,r){e.apiEventSvc?.addListener(t,r)},addGlobalListener:function UM(e,t){e.apiEventSvc?.addGlobalListener(t)},removeEventListener:function WM(e,t,r){e.apiEventSvc?.removeListener(t,r)},removeGlobalListener:function $M(e,t){e.apiEventSvc?.removeGlobalListener(t)}},beans:[class extends Q{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addListener(e,t){const r=this.wrapSvc?.wrap(e,t)??t,i=!vc.has(e),s=i?this.asyncListeners:this.syncListeners;s.has(e)||s.set(e,new Set),s.get(e).add(r),this.eventSvc.addListener(e,r,i)}removeListener(e,t){const r=this.wrapSvc?.unwrap(e,t)??t,s=!!this.asyncListeners.get(e)?.delete(r);s||this.syncListeners.get(e)?.delete(r),this.eventSvc.removeListener(e,r,s)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,r=(n,o)=>{vc.has(n)&&t(n,o)},i=(n,o)=>{vc.has(n)||t(n,o)};this.globalListenerPairs.set(e,{syncListener:r,asyncListener:i});const s=this.eventSvc;s.addGlobalListener(r,!1),s.addGlobalListener(i,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:r,globalListenerPairs:i}=this,s=r?.unwrapGlobal(e)??e;if(i.has(s)){const{syncListener:o,asyncListener:a}=i.get(s);t.removeGlobalListener(o,!1),t.removeGlobalListener(a,!0),i.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((r,i)=>{r.forEach(s=>this.eventSvc.removeListener(i,s,t)),r.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const r of e)this.eventSvc.removeGlobalListener(r,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:r,asyncListener:i})=>{t.removeGlobalListener(r,!1),t.removeGlobalListener(i,!0)}),e.clear()}}]},KM={moduleName:"Locale",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");return t?function vx(e){return(t,r,i)=>e({key:t,defaultValue:r,variableValues:i})}(t):function Cx(e){return(t,r,i)=>{let s=e?.[t];if(s&&i?.length){let n=0;for(;!(n>=i.length||-1===s.indexOf("${variable}"));)s=s.replace("${variable}",i[n++])}return s??r}}(e.get("localeText"))}}]},XM={moduleName:"RowAutoHeight",version:he,beans:[class extends Q{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=Cr(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){const{visibleCols:e,rowModel:t,rowSpanSvc:r,pinnedRowModel:i}=this.beans,s=e.autoHeightCols;let n=!1;const o=a=>{const l=a.__autoHeights;let c=$s(this.beans,a).height;for(const d of s){let u=l?.[d.getColId()];const h=r?.getCellSpan(d,a);if(h){if(h.getLastNode()!==a)continue;if(u=r?.getCellSpan(d,a)?.getLastNodeAutoHeight(),!u)return}if(null==u){if(this.colSpanSkipCell(d,a))continue;return}c=Math.max(u,c)}c!==a.rowHeight&&(a.setRowHeight(c),n=!0)};i?.forEachPinnedRow?.("top",o),i?.forEachPinnedRow?.("bottom",o),t.forEachDisplayedNode?.(o),n&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,r){if(e.__autoHeights??(e.__autoHeights={}),null==t)return void delete e.__autoHeights[r.getId()];const i=e.__autoHeights[r.getId()];e.__autoHeights[r.getId()]=t,i!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:r,colViewport:i,visibleCols:s}=this.beans;if(!r.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)}return!n.includes(e)}setupCellAutoHeight(e,t,r){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const i=t.parentElement,{rowNode:s,column:n}=e,o=this.beans,a=d=>{if(this.beans.editSvc?.isEditing(e)||!e.isAlive()||!r.isAlive())return;const{paddingTop:u,paddingBottom:h,borderBottomWidth:f,borderTopWidth:p}=Gt(i),v=t.offsetHeight+(u+h+f+p);!(d<5)||It(o)?.contains(t)&&0!=v?this.setRowAutoHeight(s,v,n):window.setTimeout(()=>a(d+1),0)},l=()=>a(0);l();const c=zs(o,t,l);return r.addDestroyFunc(()=>{c(),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:r}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(r).filter(s=>s.isAutoHeight())),0!==t.length){if(!r.__autoHeights)return!1;for(const i of t){const s=r.__autoHeights[i.getColId()];if(!s||r.rowHeight<s)return!1}}return!0}}]},bv={moduleName:"AllCommunity",version:he,dependsOn:[qA,r6,h6,HP,X4,Y4,Q4,J4,Z4,eA,tA,q4,VD,zD,WD,GD,$D,jD,T6,RA,K6,Y0,iM,sM,hM,vM,yE,EM,mA,rP,_M,GM,LM,jM,nP,b6,Jm,KM,XM,bE,XA,AM]},I=Ft(5547),ZM=Ft(9079),kh=Ft(4015);let eI=(()=>{class e{constructor(){this.vcr=(0,G.WQX)(I.c1b)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=I.VBU({type:e,selectors:[["ag-component-container"]],standalone:!1,decls:0,vars:0,template:function(i,s){},encapsulation:2})}}return e})(),Th=0;const rI=new Set(["doesFilterPass","isFilterActive"]);let Fv=(()=>{class e extends yP{setViewContainerRef(r,i){this.viewContainerRef=r,this.angularFrameworkOverrides=i}createWrapper(r){const i=this.angularFrameworkOverrides,s=this;s.compShards??=function tI(e){const t=new Map;for(let r=0;r<16;r++){const i=e.createComponent(eI);t.set(r,i),vr(i.location.nativeElement)}return t}(this.viewContainerRef);const o=new class n extends iI{init(l){i.runInsideAngular(()=>{super.init(l),this._componentRef.changeDetectorRef.detectChanges()})}createComponent(){return s.createComponent(r)}hasMethod(l){return null!=o.getFrameworkComponentInstance()[l]}callMethod(l,c){const d=this.getFrameworkComponentInstance(),u=d[l];return rI.has(l)?u.apply(d,c):i.runInsideAngular(()=>u.apply(d,c))}addMethod(l,c){o[l]=c}};return o}createComponent(r){return Th=(Th+1)%16,this.compShards.get(Th).instance.vcr.createComponent(r)}static{this.\u0275fac=(()=>{let r;return function(s){return(r||(r=I.xGo(e)))(s||e)}})()}static{this.\u0275prov=G.jDH({token:e,factory:e.\u0275fac})}}return e})();class iI{init(t){this._params=t,this._componentRef=this.createComponent(),this._agAwareComponent=this._componentRef.instance,this._frameworkComponentInstance=this._componentRef.instance,this._eGui=this._componentRef.location.nativeElement,vr(this._eGui),this._agAwareComponent.agInit(this._params)}getGui(){return this._eGui}getRootElement(){return this._eGui.firstChild}destroy(){this._frameworkComponentInstance&&"function"==typeof this._frameworkComponentInstance.destroy&&this._frameworkComponentInstance.destroy(),this._componentRef?.destroy()}getFrameworkComponentInstance(){return this._frameworkComponentInstance}}class Rv{constructor(t){this.frameworkOverrides=t,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(t,r){const{frameworkOverrides:i,wrappedListeners:s}=this;let n=r;if(i.shouldWrapOutgoing){n=a=>{i.wrapOutgoing(()=>r(a))};let o=s.get(t);o||(o=new Map,s.set(t,o)),o.set(r,n)}return n}wrapGlobal(t){const{frameworkOverrides:r,wrappedGlobalListeners:i}=this;let s=t;return r.shouldWrapOutgoing&&(s=(n,o)=>{r.wrapOutgoing(()=>t(n,o))},i.set(t,s)),s}unwrap(t,r){const{wrappedListeners:i}=this,s=i.get(t);if(s){const n=s.get(r);if(n)return s.delete(r),0===s.size&&i.delete(t),n}return r}unwrapGlobal(t){const{wrappedGlobalListeners:r}=this,i=r.get(t);return i?(r.delete(t),i):t}}let kv=(()=>{class e extends T0{constructor(r){super("angular"),this._ngZone=r,this.batchFrameworkComps=!0,this.isRunningWithinTestZone=!1,this.wrapIncoming=(i,s)=>this.runOutside(i,s),this.wrapOutgoing=i=>this.runInsideAngular(i),this.isRunningWithinTestZone=window?.AG_GRID_UNDER_TEST??!!window?.Zone?.AsyncTestZoneSpec,this.runOutside=this._ngZone?this.isRunningWithinTestZone?(i,s)=>"resize-observer"===s||"popupPositioning"===s?this._ngZone.runOutsideAngular(i):i():i=>this._ngZone.runOutsideAngular(i):i=>i()}get shouldWrapOutgoing(){return this._ngZone&&G.SKi.isInAngularZone()}createLocalEventListenerWrapper(r,i){if(this.shouldWrapOutgoing)return r??(i.setFrameworkOverrides(this),new Rv(this))}createGlobalEventListenerWrapper(){return new Rv(this)}isFrameworkComponent(r){if(!r)return!1;const i=r.prototype;return i&&"agInit"in i}runInsideAngular(r){return!this._ngZone||G.SKi.isInAngularZone()?r():this._ngZone.run(r)}runOutsideAngular(r,i){return this.runOutside(r,i)}static{this.\u0275fac=function(i){return new(i||e)(G.KVO(G.SKi))}}static{this.\u0275prov=G.jDH({token:e,factory:e.\u0275fac})}}return e})(),sI=(()=>{class e{constructor(r,i,s,n){this._viewContainerRef=i,this._angularFrameworkOverrides=s,this._frameworkCompWrapper=n,this._initialised=!1,this._destroyed=!1,this._holdEvents=!0,this._fullyReady=new Promise(o=>{this._resolveFullyReady=o}),this.statusBar=void 0,this.sideBar=void 0,this.suppressContextMenu=void 0,this.preventDefaultOnContextMenu=void 0,this.allowContextMenuWithControlKey=void 0,this.columnMenu=void 0,this.suppressMenuHide=void 0,this.enableBrowserTooltips=void 0,this.tooltipTrigger=void 0,this.tooltipShowDelay=void 0,this.tooltipHideDelay=void 0,this.tooltipMouseTrack=void 0,this.tooltipShowMode=void 0,this.tooltipInteraction=void 0,this.popupParent=void 0,this.copyHeadersToClipboard=void 0,this.copyGroupHeadersToClipboard=void 0,this.clipboardDelimiter=void 0,this.suppressCopyRowsToClipboard=void 0,this.suppressCopySingleCellRanges=void 0,this.suppressLastEmptyLineOnPaste=void 0,this.suppressClipboardPaste=void 0,this.suppressClipboardApi=void 0,this.suppressCutToClipboard=void 0,this.columnDefs=void 0,this.defaultColDef=void 0,this.defaultColGroupDef=void 0,this.columnTypes=void 0,this.dataTypeDefinitions=void 0,this.maintainColumnOrder=void 0,this.enableStrictPivotColumnOrder=void 0,this.suppressFieldDotNotation=void 0,this.headerHeight=void 0,this.groupHeaderHeight=void 0,this.floatingFiltersHeight=void 0,this.pivotHeaderHeight=void 0,this.pivotGroupHeaderHeight=void 0,this.hidePaddedHeaderRows=void 0,this.allowDragFromColumnsToolPanel=void 0,this.suppressMovableColumns=void 0,this.suppressColumnMoveAnimation=void 0,this.suppressMoveWhenColumnDragging=void 0,this.suppressDragLeaveHidesColumns=void 0,this.suppressGroupChangesColumnVisibility=void 0,this.suppressMakeColumnVisibleAfterUnGroup=void 0,this.suppressRowGroupHidesColumns=void 0,this.colResizeDefault=void 0,this.suppressAutoSize=void 0,this.autoSizePadding=void 0,this.skipHeaderOnAutoSize=void 0,this.autoSizeStrategy=void 0,this.components=void 0,this.editType=void 0,this.suppressStartEditOnTab=void 0,this.getFullRowEditValidationErrors=void 0,this.invalidEditValueMode=void 0,this.singleClickEdit=void 0,this.suppressClickEdit=void 0,this.readOnlyEdit=void 0,this.stopEditingWhenCellsLoseFocus=void 0,this.enterNavigatesVertically=void 0,this.enterNavigatesVerticallyAfterEdit=void 0,this.enableCellEditingOnBackspace=void 0,this.undoRedoCellEditing=void 0,this.undoRedoCellEditingLimit=void 0,this.defaultCsvExportParams=void 0,this.suppressCsvExport=void 0,this.defaultExcelExportParams=void 0,this.suppressExcelExport=void 0,this.excelStyles=void 0,this.findSearchValue=void 0,this.findOptions=void 0,this.quickFilterText=void 0,this.cacheQuickFilter=void 0,this.includeHiddenColumnsInQuickFilter=void 0,this.quickFilterParser=void 0,this.quickFilterMatcher=void 0,this.applyQuickFilterBeforePivotOrAgg=void 0,this.excludeChildrenWhenTreeDataFiltering=void 0,this.enableAdvancedFilter=void 0,this.alwaysPassFilter=void 0,this.includeHiddenColumnsInAdvancedFilter=void 0,this.advancedFilterParent=void 0,this.advancedFilterBuilderParams=void 0,this.advancedFilterParams=void 0,this.suppressAdvancedFilterEval=void 0,this.suppressSetFilterByDefault=void 0,this.enableFilterHandlers=void 0,this.filterHandlers=void 0,this.enableCharts=void 0,this.chartThemes=void 0,this.customChartThemes=void 0,this.chartThemeOverrides=void 0,this.chartToolPanelsDef=void 0,this.chartMenuItems=void 0,this.loadingCellRenderer=void 0,this.loadingCellRendererParams=void 0,this.loadingCellRendererSelector=void 0,this.localeText=void 0,this.masterDetail=void 0,this.keepDetailRows=void 0,this.keepDetailRowsCount=void 0,this.detailCellRenderer=void 0,this.detailCellRendererParams=void 0,this.detailRowHeight=void 0,this.detailRowAutoHeight=void 0,this.context=void 0,this.alignedGrids=void 0,this.tabIndex=void 0,this.rowBuffer=void 0,this.valueCache=void 0,this.valueCacheNeverExpires=void 0,this.enableCellExpressions=void 0,this.suppressTouch=void 0,this.suppressFocusAfterRefresh=void 0,this.suppressBrowserResizeObserver=void 0,this.suppressPropertyNamesCheck=void 0,this.suppressChangeDetection=void 0,this.debug=void 0,this.loading=void 0,this.overlayLoadingTemplate=void 0,this.loadingOverlayComponent=void 0,this.loadingOverlayComponentParams=void 0,this.suppressLoadingOverlay=void 0,this.overlayNoRowsTemplate=void 0,this.noRowsOverlayComponent=void 0,this.noRowsOverlayComponentParams=void 0,this.suppressNoRowsOverlay=void 0,this.pagination=void 0,this.paginationPageSize=void 0,this.paginationPageSizeSelector=void 0,this.paginationAutoPageSize=void 0,this.paginateChildRows=void 0,this.suppressPaginationPanel=void 0,this.pivotMode=void 0,this.pivotPanelShow=void 0,this.pivotMaxGeneratedColumns=void 0,this.pivotDefaultExpanded=void 0,this.pivotColumnGroupTotals=void 0,this.pivotRowTotals=void 0,this.pivotSuppressAutoColumn=void 0,this.suppressExpandablePivotGroups=void 0,this.functionsReadOnly=void 0,this.aggFuncs=void 0,this.suppressAggFuncInHeader=void 0,this.alwaysAggregateAtRootLevel=void 0,this.aggregateOnlyChangedColumns=void 0,this.suppressAggFilteredOnly=void 0,this.removePivotHeaderRowWhenSingleValueColumn=void 0,this.animateRows=void 0,this.cellFlashDuration=void 0,this.cellFadeDuration=void 0,this.allowShowChangeAfterFilter=void 0,this.domLayout=void 0,this.ensureDomOrder=void 0,this.enableCellSpan=void 0,this.enableRtl=void 0,this.suppressColumnVirtualisation=void 0,this.suppressMaxRenderedRowRestriction=void 0,this.suppressRowVirtualisation=void 0,this.rowDragManaged=void 0,this.rowDragInsertDelay=void 0,this.suppressRowDrag=void 0,this.suppressMoveWhenRowDragging=void 0,this.rowDragEntireRow=void 0,this.rowDragMultiRow=void 0,this.rowDragText=void 0,this.dragAndDropImageComponent=void 0,this.dragAndDropImageComponentParams=void 0,this.fullWidthCellRenderer=void 0,this.fullWidthCellRendererParams=void 0,this.embedFullWidthRows=void 0,this.groupDisplayType=void 0,this.groupDefaultExpanded=void 0,this.autoGroupColumnDef=void 0,this.groupMaintainOrder=void 0,this.groupSelectsChildren=void 0,this.groupLockGroupColumns=void 0,this.groupAggFiltering=void 0,this.groupTotalRow=void 0,this.grandTotalRow=void 0,this.suppressStickyTotalRow=void 0,this.groupSuppressBlankHeader=void 0,this.groupSelectsFiltered=void 0,this.showOpenedGroup=void 0,this.groupHideParentOfSingleChild=void 0,this.groupRemoveSingleChildren=void 0,this.groupRemoveLowestSingleChildren=void 0,this.groupHideOpenParents=void 0,this.groupAllowUnbalanced=void 0,this.rowGroupPanelShow=void 0,this.groupRowRenderer=void 0,this.groupRowRendererParams=void 0,this.treeData=void 0,this.treeDataChildrenField=void 0,this.treeDataParentIdField=void 0,this.rowGroupPanelSuppressSort=void 0,this.suppressGroupRowsSticky=void 0,this.groupHierarchyConfig=void 0,this.pinnedTopRowData=void 0,this.pinnedBottomRowData=void 0,this.enableRowPinning=void 0,this.isRowPinnable=void 0,this.isRowPinned=void 0,this.rowModelType=void 0,this.rowData=void 0,this.asyncTransactionWaitMillis=void 0,this.suppressModelUpdateAfterUpdateTransaction=void 0,this.datasource=void 0,this.cacheOverflowSize=void 0,this.infiniteInitialRowCount=void 0,this.serverSideInitialRowCount=void 0,this.suppressServerSideFullWidthLoadingRow=void 0,this.cacheBlockSize=void 0,this.maxBlocksInCache=void 0,this.maxConcurrentDatasourceRequests=void 0,this.blockLoadDebounceMillis=void 0,this.purgeClosedRowNodes=void 0,this.serverSideDatasource=void 0,this.serverSideSortAllLevels=void 0,this.serverSideEnableClientSideSort=void 0,this.serverSideOnlyRefreshFilteredGroups=void 0,this.serverSidePivotResultFieldSeparator=void 0,this.viewportDatasource=void 0,this.viewportRowModelPageSize=void 0,this.viewportRowModelBufferSize=void 0,this.alwaysShowHorizontalScroll=void 0,this.alwaysShowVerticalScroll=void 0,this.debounceVerticalScrollbar=void 0,this.suppressHorizontalScroll=void 0,this.suppressScrollOnNewData=void 0,this.suppressScrollWhenPopupsAreOpen=void 0,this.suppressAnimationFrame=void 0,this.suppressMiddleClickScrolls=void 0,this.suppressPreventDefaultOnMouseWheel=void 0,this.scrollbarWidth=void 0,this.rowSelection=void 0,this.cellSelection=void 0,this.rowMultiSelectWithClick=void 0,this.suppressRowDeselection=void 0,this.suppressRowClickSelection=void 0,this.suppressCellFocus=void 0,this.suppressHeaderFocus=void 0,this.selectionColumnDef=void 0,this.rowNumbers=void 0,this.suppressMultiRangeSelection=void 0,this.enableCellTextSelection=void 0,this.enableRangeSelection=void 0,this.enableRangeHandle=void 0,this.enableFillHandle=void 0,this.fillHandleDirection=void 0,this.suppressClearOnFillReduction=void 0,this.sortingOrder=void 0,this.accentedSort=void 0,this.unSortIcon=void 0,this.suppressMultiSort=void 0,this.alwaysMultiSort=void 0,this.multiSortKey=void 0,this.suppressMaintainUnsortedOrder=void 0,this.icons=void 0,this.rowHeight=void 0,this.rowStyle=void 0,this.rowClass=void 0,this.rowClassRules=void 0,this.suppressRowHoverHighlight=void 0,this.suppressRowTransform=void 0,this.columnHoverHighlight=void 0,this.gridId=void 0,this.deltaSort=void 0,this.treeDataDisplayType=void 0,this.enableGroupEdit=void 0,this.initialState=void 0,this.theme=void 0,this.loadThemeGoogleFonts=void 0,this.themeCssLayer=void 0,this.styleNonce=void 0,this.themeStyleContainer=void 0,this.getContextMenuItems=void 0,this.getMainMenuItems=void 0,this.postProcessPopup=void 0,this.processUnpinnedColumns=void 0,this.processCellForClipboard=void 0,this.processHeaderForClipboard=void 0,this.processGroupHeaderForClipboard=void 0,this.processCellFromClipboard=void 0,this.sendToClipboard=void 0,this.processDataFromClipboard=void 0,this.isExternalFilterPresent=void 0,this.doesExternalFilterPass=void 0,this.getChartToolbarItems=void 0,this.createChartContainer=void 0,this.focusGridInnerElement=void 0,this.navigateToNextHeader=void 0,this.tabToNextHeader=void 0,this.navigateToNextCell=void 0,this.tabToNextCell=void 0,this.getLocaleText=void 0,this.getDocument=void 0,this.paginationNumberFormatter=void 0,this.getGroupRowAgg=void 0,this.isGroupOpenByDefault=void 0,this.ssrmExpandAllAffectsAllRows=void 0,this.initialGroupOrderComparator=void 0,this.processPivotResultColDef=void 0,this.processPivotResultColGroupDef=void 0,this.getDataPath=void 0,this.getChildCount=void 0,this.getServerSideGroupLevelParams=void 0,this.isServerSideGroupOpenByDefault=void 0,this.isApplyServerSideTransaction=void 0,this.isServerSideGroup=void 0,this.getServerSideGroupKey=void 0,this.getBusinessKeyForNode=void 0,this.getRowId=void 0,this.resetRowDataOnUpdate=void 0,this.processRowPostCreate=void 0,this.isRowSelectable=void 0,this.isRowMaster=void 0,this.fillOperation=void 0,this.postSortRows=void 0,this.getRowStyle=void 0,this.getRowClass=void 0,this.getRowHeight=void 0,this.isFullWidthRow=void 0,this.isRowValidDropPosition=void 0,this.toolPanelVisibleChanged=new G.bkB,this.toolPanelSizeChanged=new G.bkB,this.columnMenuVisibleChanged=new G.bkB,this.contextMenuVisibleChanged=new G.bkB,this.cutStart=new G.bkB,this.cutEnd=new G.bkB,this.pasteStart=new G.bkB,this.pasteEnd=new G.bkB,this.columnVisible=new G.bkB,this.columnPinned=new G.bkB,this.columnResized=new G.bkB,this.columnMoved=new G.bkB,this.columnValueChanged=new G.bkB,this.columnPivotModeChanged=new G.bkB,this.columnPivotChanged=new G.bkB,this.columnGroupOpened=new G.bkB,this.newColumnsLoaded=new G.bkB,this.gridColumnsChanged=new G.bkB,this.displayedColumnsChanged=new G.bkB,this.virtualColumnsChanged=new G.bkB,this.columnEverythingChanged=new G.bkB,this.columnsReset=new G.bkB,this.columnHeaderMouseOver=new G.bkB,this.columnHeaderMouseLeave=new G.bkB,this.columnHeaderClicked=new G.bkB,this.columnHeaderContextMenu=new G.bkB,this.componentStateChanged=new G.bkB,this.cellValueChanged=new G.bkB,this.cellEditRequest=new G.bkB,this.rowValueChanged=new G.bkB,this.cellEditingStarted=new G.bkB,this.cellEditingStopped=new G.bkB,this.rowEditingStarted=new G.bkB,this.rowEditingStopped=new G.bkB,this.bulkEditingStarted=new G.bkB,this.bulkEditingStopped=new G.bkB,this.batchEditingStarted=new G.bkB,this.batchEditingStopped=new G.bkB,this.undoStarted=new G.bkB,this.undoEnded=new G.bkB,this.redoStarted=new G.bkB,this.redoEnded=new G.bkB,this.cellSelectionDeleteStart=new G.bkB,this.cellSelectionDeleteEnd=new G.bkB,this.rangeDeleteStart=new G.bkB,this.rangeDeleteEnd=new G.bkB,this.fillStart=new G.bkB,this.fillEnd=new G.bkB,this.filterOpened=new G.bkB,this.filterChanged=new G.bkB,this.filterModified=new G.bkB,this.filterUiChanged=new G.bkB,this.floatingFilterUiChanged=new G.bkB,this.advancedFilterBuilderVisibleChanged=new G.bkB,this.findChanged=new G.bkB,this.chartCreated=new G.bkB,this.chartRangeSelectionChanged=new G.bkB,this.chartOptionsChanged=new G.bkB,this.chartDestroyed=new G.bkB,this.cellKeyDown=new G.bkB,this.gridReady=new G.bkB,this.firstDataRendered=new G.bkB,this.gridSizeChanged=new G.bkB,this.modelUpdated=new G.bkB,this.virtualRowRemoved=new G.bkB,this.viewportChanged=new G.bkB,this.bodyScroll=new G.bkB,this.bodyScrollEnd=new G.bkB,this.dragStarted=new G.bkB,this.dragStopped=new G.bkB,this.dragCancelled=new G.bkB,this.stateUpdated=new G.bkB,this.paginationChanged=new G.bkB,this.rowDragEnter=new G.bkB,this.rowDragMove=new G.bkB,this.rowDragLeave=new G.bkB,this.rowDragEnd=new G.bkB,this.rowDragCancel=new G.bkB,this.rowResizeStarted=new G.bkB,this.rowResizeEnded=new G.bkB,this.columnRowGroupChanged=new G.bkB,this.rowGroupOpened=new G.bkB,this.expandOrCollapseAll=new G.bkB,this.pivotMaxColumnsExceeded=new G.bkB,this.pinnedRowDataChanged=new G.bkB,this.pinnedRowsChanged=new G.bkB,this.rowDataUpdated=new G.bkB,this.asyncTransactionsFlushed=new G.bkB,this.storeRefreshed=new G.bkB,this.headerFocused=new G.bkB,this.cellClicked=new G.bkB,this.cellDoubleClicked=new G.bkB,this.cellFocused=new G.bkB,this.cellMouseOver=new G.bkB,this.cellMouseOut=new G.bkB,this.cellMouseDown=new G.bkB,this.rowClicked=new G.bkB,this.rowDoubleClicked=new G.bkB,this.rowSelected=new G.bkB,this.selectionChanged=new G.bkB,this.cellContextMenu=new G.bkB,this.rangeSelectionChanged=new G.bkB,this.cellSelectionChanged=new G.bkB,this.tooltipShow=new G.bkB,this.tooltipHide=new G.bkB,this.sortChanged=new G.bkB,this._nativeElement=r.nativeElement,this._fullyReady.then(()=>{this._holdEvents=!1})}ngAfterViewInit(){this._angularFrameworkOverrides.runOutsideAngular(()=>{this._frameworkCompWrapper.setViewContainerRef(this._viewContainerRef,this._angularFrameworkOverrides);const r=Object.keys(this).filter(a=>!(a.startsWith("_")||"gridOptions"==a||"modules"==a||this[a]instanceof G.bkB)),i={};for(const a of r){const l=oI(a,this[a]);i[a]=l}const s=function Yx(e,t,r){"object"!=typeof e&&(e={});const i={...e};for(const s of r){const n=t[s];typeof n<"u"&&(i[s]=n)}return i}(this.gridOptions,i,r),n={globalListener:this.globalListener.bind(this),frameworkOverrides:this._angularFrameworkOverrides,providedBeanInstances:{frameworkCompWrapper:this._frameworkCompWrapper},modules:this.modules||[],setThemeOnGridDiv:!0},o=function vP(e,t,r){if(!t)return Ct(11),{};const i=r;let s;if(!i?.setThemeOnGridDiv){const o=nr({tag:"div"});o.style.height="100%",e.appendChild(o),e=o,s=()=>e.remove()}return(new wP).create(e,t,o=>{const a=new z3(e);o.createBean(a)},void 0,r,s)}(this._nativeElement,s,n);o&&(this.api=o),this._initialised=!0,this._resolveFullyReady()})}ngOnChanges(r){this._initialised&&this._angularFrameworkOverrides.runOutsideAngular(()=>{const i={};for(const s of Object.keys(r))i[s]=r[s].currentValue;!function Qx(e,t){if(!e)return;const r={};let i=!1;for(const o of Object.keys(e))r[o]=e[o],i=!0;if(!i)return;t.dispatchEvent({type:"gridOptionsChanged",options:r});const n={type:"componentStateChanged",...r};t.dispatchEvent(n)}(i,this.api)})}ngOnDestroy(){this._initialised&&(this._destroyed=!0,this.api?.destroy())}isEmitterUsed(r){const s=this[r],n=s?.observed??s?.observers?.length>0,o=`on${r.charAt(0).toUpperCase()}${r.substring(1)}`;return n||!!this.gridOptions&&!!this.gridOptions[o]}globalListener(r,i){if(this._destroyed)return;const s=this[r];if(s&&this.isEmitterUsed(r)){const n=()=>this._angularFrameworkOverrides.runInsideAngular(()=>s.emit(i));this._holdEvents?this._fullyReady.then(()=>n()):n()}}static{this.\u0275fac=function(i){return new(i||e)(I.rXU(I.aKT),I.rXU(I.c1b),I.rXU(kv),I.rXU(Fv))}}static{this.\u0275cmp=I.VBU({type:e,selectors:[["ag-grid-angular"]],inputs:{gridOptions:"gridOptions",modules:"modules",statusBar:"statusBar",sideBar:"sideBar",suppressContextMenu:[2,"suppressContextMenu","suppressContextMenu",N.L39],preventDefaultOnContextMenu:[2,"preventDefaultOnContextMenu","preventDefaultOnContextMenu",N.L39],allowContextMenuWithControlKey:[2,"allowContextMenuWithControlKey","allowContextMenuWithControlKey",N.L39],columnMenu:"columnMenu",suppressMenuHide:[2,"suppressMenuHide","suppressMenuHide",N.L39],enableBrowserTooltips:[2,"enableBrowserTooltips","enableBrowserTooltips",N.L39],tooltipTrigger:"tooltipTrigger",tooltipShowDelay:"tooltipShowDelay",tooltipHideDelay:"tooltipHideDelay",tooltipMouseTrack:[2,"tooltipMouseTrack","tooltipMouseTrack",N.L39],tooltipShowMode:"tooltipShowMode",tooltipInteraction:[2,"tooltipInteraction","tooltipInteraction",N.L39],popupParent:"popupParent",copyHeadersToClipboard:[2,"copyHeadersToClipboard","copyHeadersToClipboard",N.L39],copyGroupHeadersToClipboard:[2,"copyGroupHeadersToClipboard","copyGroupHeadersToClipboard",N.L39],clipboardDelimiter:"clipboardDelimiter",suppressCopyRowsToClipboard:[2,"suppressCopyRowsToClipboard","suppressCopyRowsToClipboard",N.L39],suppressCopySingleCellRanges:[2,"suppressCopySingleCellRanges","suppressCopySingleCellRanges",N.L39],suppressLastEmptyLineOnPaste:[2,"suppressLastEmptyLineOnPaste","suppressLastEmptyLineOnPaste",N.L39],suppressClipboardPaste:[2,"suppressClipboardPaste","suppressClipboardPaste",N.L39],suppressClipboardApi:[2,"suppressClipboardApi","suppressClipboardApi",N.L39],suppressCutToClipboard:[2,"suppressCutToClipboard","suppressCutToClipboard",N.L39],columnDefs:"columnDefs",defaultColDef:"defaultColDef",defaultColGroupDef:"defaultColGroupDef",columnTypes:"columnTypes",dataTypeDefinitions:"dataTypeDefinitions",maintainColumnOrder:[2,"maintainColumnOrder","maintainColumnOrder",N.L39],enableStrictPivotColumnOrder:[2,"enableStrictPivotColumnOrder","enableStrictPivotColumnOrder",N.L39],suppressFieldDotNotation:[2,"suppressFieldDotNotation","suppressFieldDotNotation",N.L39],headerHeight:"headerHeight",groupHeaderHeight:"groupHeaderHeight",floatingFiltersHeight:"floatingFiltersHeight",pivotHeaderHeight:"pivotHeaderHeight",pivotGroupHeaderHeight:"pivotGroupHeaderHeight",hidePaddedHeaderRows:[2,"hidePaddedHeaderRows","hidePaddedHeaderRows",N.L39],allowDragFromColumnsToolPanel:[2,"allowDragFromColumnsToolPanel","allowDragFromColumnsToolPanel",N.L39],suppressMovableColumns:[2,"suppressMovableColumns","suppressMovableColumns",N.L39],suppressColumnMoveAnimation:[2,"suppressColumnMoveAnimation","suppressColumnMoveAnimation",N.L39],suppressMoveWhenColumnDragging:[2,"suppressMoveWhenColumnDragging","suppressMoveWhenColumnDragging",N.L39],suppressDragLeaveHidesColumns:[2,"suppressDragLeaveHidesColumns","suppressDragLeaveHidesColumns",N.L39],suppressGroupChangesColumnVisibility:"suppressGroupChangesColumnVisibility",suppressMakeColumnVisibleAfterUnGroup:[2,"suppressMakeColumnVisibleAfterUnGroup","suppressMakeColumnVisibleAfterUnGroup",N.L39],suppressRowGroupHidesColumns:[2,"suppressRowGroupHidesColumns","suppressRowGroupHidesColumns",N.L39],colResizeDefault:"colResizeDefault",suppressAutoSize:[2,"suppressAutoSize","suppressAutoSize",N.L39],autoSizePadding:"autoSizePadding",skipHeaderOnAutoSize:[2,"skipHeaderOnAutoSize","skipHeaderOnAutoSize",N.L39],autoSizeStrategy:"autoSizeStrategy",components:"components",editType:"editType",suppressStartEditOnTab:[2,"suppressStartEditOnTab","suppressStartEditOnTab",N.L39],getFullRowEditValidationErrors:"getFullRowEditValidationErrors",invalidEditValueMode:"invalidEditValueMode",singleClickEdit:[2,"singleClickEdit","singleClickEdit",N.L39],suppressClickEdit:[2,"suppressClickEdit","suppressClickEdit",N.L39],readOnlyEdit:[2,"readOnlyEdit","readOnlyEdit",N.L39],stopEditingWhenCellsLoseFocus:[2,"stopEditingWhenCellsLoseFocus","stopEditingWhenCellsLoseFocus",N.L39],enterNavigatesVertically:[2,"enterNavigatesVertically","enterNavigatesVertically",N.L39],enterNavigatesVerticallyAfterEdit:[2,"enterNavigatesVerticallyAfterEdit","enterNavigatesVerticallyAfterEdit",N.L39],enableCellEditingOnBackspace:[2,"enableCellEditingOnBackspace","enableCellEditingOnBackspace",N.L39],undoRedoCellEditing:[2,"undoRedoCellEditing","undoRedoCellEditing",N.L39],undoRedoCellEditingLimit:"undoRedoCellEditingLimit",defaultCsvExportParams:"defaultCsvExportParams",suppressCsvExport:[2,"suppressCsvExport","suppressCsvExport",N.L39],defaultExcelExportParams:"defaultExcelExportParams",suppressExcelExport:[2,"suppressExcelExport","suppressExcelExport",N.L39],excelStyles:"excelStyles",findSearchValue:"findSearchValue",findOptions:"findOptions",quickFilterText:"quickFilterText",cacheQuickFilter:[2,"cacheQuickFilter","cacheQuickFilter",N.L39],includeHiddenColumnsInQuickFilter:[2,"includeHiddenColumnsInQuickFilter","includeHiddenColumnsInQuickFilter",N.L39],quickFilterParser:"quickFilterParser",quickFilterMatcher:"quickFilterMatcher",applyQuickFilterBeforePivotOrAgg:[2,"applyQuickFilterBeforePivotOrAgg","applyQuickFilterBeforePivotOrAgg",N.L39],excludeChildrenWhenTreeDataFiltering:[2,"excludeChildrenWhenTreeDataFiltering","excludeChildrenWhenTreeDataFiltering",N.L39],enableAdvancedFilter:[2,"enableAdvancedFilter","enableAdvancedFilter",N.L39],alwaysPassFilter:"alwaysPassFilter",includeHiddenColumnsInAdvancedFilter:[2,"includeHiddenColumnsInAdvancedFilter","includeHiddenColumnsInAdvancedFilter",N.L39],advancedFilterParent:"advancedFilterParent",advancedFilterBuilderParams:"advancedFilterBuilderParams",advancedFilterParams:"advancedFilterParams",suppressAdvancedFilterEval:[2,"suppressAdvancedFilterEval","suppressAdvancedFilterEval",N.L39],suppressSetFilterByDefault:[2,"suppressSetFilterByDefault","suppressSetFilterByDefault",N.L39],enableFilterHandlers:[2,"enableFilterHandlers","enableFilterHandlers",N.L39],filterHandlers:"filterHandlers",enableCharts:[2,"enableCharts","enableCharts",N.L39],chartThemes:"chartThemes",customChartThemes:"customChartThemes",chartThemeOverrides:"chartThemeOverrides",chartToolPanelsDef:"chartToolPanelsDef",chartMenuItems:"chartMenuItems",loadingCellRenderer:"loadingCellRenderer",loadingCellRendererParams:"loadingCellRendererParams",loadingCellRendererSelector:"loadingCellRendererSelector",localeText:"localeText",masterDetail:[2,"masterDetail","masterDetail",N.L39],keepDetailRows:[2,"keepDetailRows","keepDetailRows",N.L39],keepDetailRowsCount:"keepDetailRowsCount",detailCellRenderer:"detailCellRenderer",detailCellRendererParams:"detailCellRendererParams",detailRowHeight:"detailRowHeight",detailRowAutoHeight:[2,"detailRowAutoHeight","detailRowAutoHeight",N.L39],context:"context",alignedGrids:"alignedGrids",tabIndex:"tabIndex",rowBuffer:"rowBuffer",valueCache:[2,"valueCache","valueCache",N.L39],valueCacheNeverExpires:[2,"valueCacheNeverExpires","valueCacheNeverExpires",N.L39],enableCellExpressions:[2,"enableCellExpressions","enableCellExpressions",N.L39],suppressTouch:[2,"suppressTouch","suppressTouch",N.L39],suppressFocusAfterRefresh:[2,"suppressFocusAfterRefresh","suppressFocusAfterRefresh",N.L39],suppressBrowserResizeObserver:[2,"suppressBrowserResizeObserver","suppressBrowserResizeObserver",N.L39],suppressPropertyNamesCheck:[2,"suppressPropertyNamesCheck","suppressPropertyNamesCheck",N.L39],suppressChangeDetection:[2,"suppressChangeDetection","suppressChangeDetection",N.L39],debug:[2,"debug","debug",N.L39],loading:[2,"loading","loading",N.L39],overlayLoadingTemplate:"overlayLoadingTemplate",loadingOverlayComponent:"loadingOverlayComponent",loadingOverlayComponentParams:"loadingOverlayComponentParams",suppressLoadingOverlay:[2,"suppressLoadingOverlay","suppressLoadingOverlay",N.L39],overlayNoRowsTemplate:"overlayNoRowsTemplate",noRowsOverlayComponent:"noRowsOverlayComponent",noRowsOverlayComponentParams:"noRowsOverlayComponentParams",suppressNoRowsOverlay:[2,"suppressNoRowsOverlay","suppressNoRowsOverlay",N.L39],pagination:[2,"pagination","pagination",N.L39],paginationPageSize:"paginationPageSize",paginationPageSizeSelector:"paginationPageSizeSelector",paginationAutoPageSize:[2,"paginationAutoPageSize","paginationAutoPageSize",N.L39],paginateChildRows:[2,"paginateChildRows","paginateChildRows",N.L39],suppressPaginationPanel:[2,"suppressPaginationPanel","suppressPaginationPanel",N.L39],pivotMode:[2,"pivotMode","pivotMode",N.L39],pivotPanelShow:"pivotPanelShow",pivotMaxGeneratedColumns:"pivotMaxGeneratedColumns",pivotDefaultExpanded:"pivotDefaultExpanded",pivotColumnGroupTotals:"pivotColumnGroupTotals",pivotRowTotals:"pivotRowTotals",pivotSuppressAutoColumn:[2,"pivotSuppressAutoColumn","pivotSuppressAutoColumn",N.L39],suppressExpandablePivotGroups:[2,"suppressExpandablePivotGroups","suppressExpandablePivotGroups",N.L39],functionsReadOnly:[2,"functionsReadOnly","functionsReadOnly",N.L39],aggFuncs:"aggFuncs",suppressAggFuncInHeader:[2,"suppressAggFuncInHeader","suppressAggFuncInHeader",N.L39],alwaysAggregateAtRootLevel:[2,"alwaysAggregateAtRootLevel","alwaysAggregateAtRootLevel",N.L39],aggregateOnlyChangedColumns:[2,"aggregateOnlyChangedColumns","aggregateOnlyChangedColumns",N.L39],suppressAggFilteredOnly:[2,"suppressAggFilteredOnly","suppressAggFilteredOnly",N.L39],removePivotHeaderRowWhenSingleValueColumn:[2,"removePivotHeaderRowWhenSingleValueColumn","removePivotHeaderRowWhenSingleValueColumn",N.L39],animateRows:[2,"animateRows","animateRows",N.L39],cellFlashDuration:"cellFlashDuration",cellFadeDuration:"cellFadeDuration",allowShowChangeAfterFilter:[2,"allowShowChangeAfterFilter","allowShowChangeAfterFilter",N.L39],domLayout:"domLayout",ensureDomOrder:[2,"ensureDomOrder","ensureDomOrder",N.L39],enableCellSpan:[2,"enableCellSpan","enableCellSpan",N.L39],enableRtl:[2,"enableRtl","enableRtl",N.L39],suppressColumnVirtualisation:[2,"suppressColumnVirtualisation","suppressColumnVirtualisation",N.L39],suppressMaxRenderedRowRestriction:[2,"suppressMaxRenderedRowRestriction","suppressMaxRenderedRowRestriction",N.L39],suppressRowVirtualisation:[2,"suppressRowVirtualisation","suppressRowVirtualisation",N.L39],rowDragManaged:[2,"rowDragManaged","rowDragManaged",N.L39],rowDragInsertDelay:"rowDragInsertDelay",suppressRowDrag:[2,"suppressRowDrag","suppressRowDrag",N.L39],suppressMoveWhenRowDragging:[2,"suppressMoveWhenRowDragging","suppressMoveWhenRowDragging",N.L39],rowDragEntireRow:[2,"rowDragEntireRow","rowDragEntireRow",N.L39],rowDragMultiRow:[2,"rowDragMultiRow","rowDragMultiRow",N.L39],rowDragText:"rowDragText",dragAndDropImageComponent:"dragAndDropImageComponent",dragAndDropImageComponentParams:"dragAndDropImageComponentParams",fullWidthCellRenderer:"fullWidthCellRenderer",fullWidthCellRendererParams:"fullWidthCellRendererParams",embedFullWidthRows:[2,"embedFullWidthRows","embedFullWidthRows",N.L39],groupDisplayType:"groupDisplayType",groupDefaultExpanded:"groupDefaultExpanded",autoGroupColumnDef:"autoGroupColumnDef",groupMaintainOrder:[2,"groupMaintainOrder","groupMaintainOrder",N.L39],groupSelectsChildren:[2,"groupSelectsChildren","groupSelectsChildren",N.L39],groupLockGroupColumns:"groupLockGroupColumns",groupAggFiltering:"groupAggFiltering",groupTotalRow:"groupTotalRow",grandTotalRow:"grandTotalRow",suppressStickyTotalRow:"suppressStickyTotalRow",groupSuppressBlankHeader:[2,"groupSuppressBlankHeader","groupSuppressBlankHeader",N.L39],groupSelectsFiltered:[2,"groupSelectsFiltered","groupSelectsFiltered",N.L39],showOpenedGroup:[2,"showOpenedGroup","showOpenedGroup",N.L39],groupHideParentOfSingleChild:"groupHideParentOfSingleChild",groupRemoveSingleChildren:[2,"groupRemoveSingleChildren","groupRemoveSingleChildren",N.L39],groupRemoveLowestSingleChildren:[2,"groupRemoveLowestSingleChildren","groupRemoveLowestSingleChildren",N.L39],groupHideOpenParents:[2,"groupHideOpenParents","groupHideOpenParents",N.L39],groupAllowUnbalanced:[2,"groupAllowUnbalanced","groupAllowUnbalanced",N.L39],rowGroupPanelShow:"rowGroupPanelShow",groupRowRenderer:"groupRowRenderer",groupRowRendererParams:"groupRowRendererParams",treeData:[2,"treeData","treeData",N.L39],treeDataChildrenField:"treeDataChildrenField",treeDataParentIdField:"treeDataParentIdField",rowGroupPanelSuppressSort:[2,"rowGroupPanelSuppressSort","rowGroupPanelSuppressSort",N.L39],suppressGroupRowsSticky:[2,"suppressGroupRowsSticky","suppressGroupRowsSticky",N.L39],groupHierarchyConfig:"groupHierarchyConfig",pinnedTopRowData:"pinnedTopRowData",pinnedBottomRowData:"pinnedBottomRowData",enableRowPinning:"enableRowPinning",isRowPinnable:"isRowPinnable",isRowPinned:"isRowPinned",rowModelType:"rowModelType",rowData:"rowData",asyncTransactionWaitMillis:"asyncTransactionWaitMillis",suppressModelUpdateAfterUpdateTransaction:[2,"suppressModelUpdateAfterUpdateTransaction","suppressModelUpdateAfterUpdateTransaction",N.L39],datasource:"datasource",cacheOverflowSize:"cacheOverflowSize",infiniteInitialRowCount:"infiniteInitialRowCount",serverSideInitialRowCount:"serverSideInitialRowCount",suppressServerSideFullWidthLoadingRow:[2,"suppressServerSideFullWidthLoadingRow","suppressServerSideFullWidthLoadingRow",N.L39],cacheBlockSize:"cacheBlockSize",maxBlocksInCache:"maxBlocksInCache",maxConcurrentDatasourceRequests:"maxConcurrentDatasourceRequests",blockLoadDebounceMillis:"blockLoadDebounceMillis",purgeClosedRowNodes:[2,"purgeClosedRowNodes","purgeClosedRowNodes",N.L39],serverSideDatasource:"serverSideDatasource",serverSideSortAllLevels:[2,"serverSideSortAllLevels","serverSideSortAllLevels",N.L39],serverSideEnableClientSideSort:[2,"serverSideEnableClientSideSort","serverSideEnableClientSideSort",N.L39],serverSideOnlyRefreshFilteredGroups:[2,"serverSideOnlyRefreshFilteredGroups","serverSideOnlyRefreshFilteredGroups",N.L39],serverSidePivotResultFieldSeparator:"serverSidePivotResultFieldSeparator",viewportDatasource:"viewportDatasource",viewportRowModelPageSize:"viewportRowModelPageSize",viewportRowModelBufferSize:"viewportRowModelBufferSize",alwaysShowHorizontalScroll:[2,"alwaysShowHorizontalScroll","alwaysShowHorizontalScroll",N.L39],alwaysShowVerticalScroll:[2,"alwaysShowVerticalScroll","alwaysShowVerticalScroll",N.L39],debounceVerticalScrollbar:[2,"debounceVerticalScrollbar","debounceVerticalScrollbar",N.L39],suppressHorizontalScroll:[2,"suppressHorizontalScroll","suppressHorizontalScroll",N.L39],suppressScrollOnNewData:[2,"suppressScrollOnNewData","suppressScrollOnNewData",N.L39],suppressScrollWhenPopupsAreOpen:[2,"suppressScrollWhenPopupsAreOpen","suppressScrollWhenPopupsAreOpen",N.L39],suppressAnimationFrame:[2,"suppressAnimationFrame","suppressAnimationFrame",N.L39],suppressMiddleClickScrolls:[2,"suppressMiddleClickScrolls","suppressMiddleClickScrolls",N.L39],suppressPreventDefaultOnMouseWheel:[2,"suppressPreventDefaultOnMouseWheel","suppressPreventDefaultOnMouseWheel",N.L39],scrollbarWidth:"scrollbarWidth",rowSelection:"rowSelection",cellSelection:"cellSelection",rowMultiSelectWithClick:[2,"rowMultiSelectWithClick","rowMultiSelectWithClick",N.L39],suppressRowDeselection:[2,"suppressRowDeselection","suppressRowDeselection",N.L39],suppressRowClickSelection:[2,"suppressRowClickSelection","suppressRowClickSelection",N.L39],suppressCellFocus:[2,"suppressCellFocus","suppressCellFocus",N.L39],suppressHeaderFocus:[2,"suppressHeaderFocus","suppressHeaderFocus",N.L39],selectionColumnDef:"selectionColumnDef",rowNumbers:"rowNumbers",suppressMultiRangeSelection:[2,"suppressMultiRangeSelection","suppressMultiRangeSelection",N.L39],enableCellTextSelection:[2,"enableCellTextSelection","enableCellTextSelection",N.L39],enableRangeSelection:[2,"enableRangeSelection","enableRangeSelection",N.L39],enableRangeHandle:[2,"enableRangeHandle","enableRangeHandle",N.L39],enableFillHandle:[2,"enableFillHandle","enableFillHandle",N.L39],fillHandleDirection:"fillHandleDirection",suppressClearOnFillReduction:[2,"suppressClearOnFillReduction","suppressClearOnFillReduction",N.L39],sortingOrder:"sortingOrder",accentedSort:[2,"accentedSort","accentedSort",N.L39],unSortIcon:[2,"unSortIcon","unSortIcon",N.L39],suppressMultiSort:[2,"suppressMultiSort","suppressMultiSort",N.L39],alwaysMultiSort:[2,"alwaysMultiSort","alwaysMultiSort",N.L39],multiSortKey:"multiSortKey",suppressMaintainUnsortedOrder:[2,"suppressMaintainUnsortedOrder","suppressMaintainUnsortedOrder",N.L39],icons:"icons",rowHeight:"rowHeight",rowStyle:"rowStyle",rowClass:"rowClass",rowClassRules:"rowClassRules",suppressRowHoverHighlight:[2,"suppressRowHoverHighlight","suppressRowHoverHighlight",N.L39],suppressRowTransform:[2,"suppressRowTransform","suppressRowTransform",N.L39],columnHoverHighlight:[2,"columnHoverHighlight","columnHoverHighlight",N.L39],gridId:"gridId",deltaSort:[2,"deltaSort","deltaSort",N.L39],treeDataDisplayType:"treeDataDisplayType",enableGroupEdit:[2,"enableGroupEdit","enableGroupEdit",N.L39],initialState:"initialState",theme:"theme",loadThemeGoogleFonts:[2,"loadThemeGoogleFonts","loadThemeGoogleFonts",N.L39],themeCssLayer:"themeCssLayer",styleNonce:"styleNonce",themeStyleContainer:"themeStyleContainer",getContextMenuItems:"getContextMenuItems",getMainMenuItems:"getMainMenuItems",postProcessPopup:"postProcessPopup",processUnpinnedColumns:"processUnpinnedColumns",processCellForClipboard:"processCellForClipboard",processHeaderForClipboard:"processHeaderForClipboard",processGroupHeaderForClipboard:"processGroupHeaderForClipboard",processCellFromClipboard:"processCellFromClipboard",sendToClipboard:"sendToClipboard",processDataFromClipboard:"processDataFromClipboard",isExternalFilterPresent:"isExternalFilterPresent",doesExternalFilterPass:"doesExternalFilterPass",getChartToolbarItems:"getChartToolbarItems",createChartContainer:"createChartContainer",focusGridInnerElement:"focusGridInnerElement",navigateToNextHeader:"navigateToNextHeader",tabToNextHeader:"tabToNextHeader",navigateToNextCell:"navigateToNextCell",tabToNextCell:"tabToNextCell",getLocaleText:"getLocaleText",getDocument:"getDocument",paginationNumberFormatter:"paginationNumberFormatter",getGroupRowAgg:"getGroupRowAgg",isGroupOpenByDefault:"isGroupOpenByDefault",ssrmExpandAllAffectsAllRows:[2,"ssrmExpandAllAffectsAllRows","ssrmExpandAllAffectsAllRows",N.L39],initialGroupOrderComparator:"initialGroupOrderComparator",processPivotResultColDef:"processPivotResultColDef",processPivotResultColGroupDef:"processPivotResultColGroupDef",getDataPath:"getDataPath",getChildCount:"getChildCount",getServerSideGroupLevelParams:"getServerSideGroupLevelParams",isServerSideGroupOpenByDefault:"isServerSideGroupOpenByDefault",isApplyServerSideTransaction:"isApplyServerSideTransaction",isServerSideGroup:"isServerSideGroup",getServerSideGroupKey:"getServerSideGroupKey",getBusinessKeyForNode:"getBusinessKeyForNode",getRowId:"getRowId",resetRowDataOnUpdate:[2,"resetRowDataOnUpdate","resetRowDataOnUpdate",N.L39],processRowPostCreate:"processRowPostCreate",isRowSelectable:"isRowSelectable",isRowMaster:"isRowMaster",fillOperation:"fillOperation",postSortRows:"postSortRows",getRowStyle:"getRowStyle",getRowClass:"getRowClass",getRowHeight:"getRowHeight",isFullWidthRow:"isFullWidthRow",isRowValidDropPosition:"isRowValidDropPosition"},outputs:{toolPanelVisibleChanged:"toolPanelVisibleChanged",toolPanelSizeChanged:"toolPanelSizeChanged",columnMenuVisibleChanged:"columnMenuVisibleChanged",contextMenuVisibleChanged:"contextMenuVisibleChanged",cutStart:"cutStart",cutEnd:"cutEnd",pasteStart:"pasteStart",pasteEnd:"pasteEnd",columnVisible:"columnVisible",columnPinned:"columnPinned",columnResized:"columnResized",columnMoved:"columnMoved",columnValueChanged:"columnValueChanged",columnPivotModeChanged:"columnPivotModeChanged",columnPivotChanged:"columnPivotChanged",columnGroupOpened:"columnGroupOpened",newColumnsLoaded:"newColumnsLoaded",gridColumnsChanged:"gridColumnsChanged",displayedColumnsChanged:"displayedColumnsChanged",virtualColumnsChanged:"virtualColumnsChanged",columnEverythingChanged:"columnEverythingChanged",columnsReset:"columnsReset",columnHeaderMouseOver:"columnHeaderMouseOver",columnHeaderMouseLeave:"columnHeaderMouseLeave",columnHeaderClicked:"columnHeaderClicked",columnHeaderContextMenu:"columnHeaderContextMenu",componentStateChanged:"componentStateChanged",cellValueChanged:"cellValueChanged",cellEditRequest:"cellEditRequest",rowValueChanged:"rowValueChanged",cellEditingStarted:"cellEditingStarted",cellEditingStopped:"cellEditingStopped",rowEditingStarted:"rowEditingStarted",rowEditingStopped:"rowEditingStopped",bulkEditingStarted:"bulkEditingStarted",bulkEditingStopped:"bulkEditingStopped",batchEditingStarted:"batchEditingStarted",batchEditingStopped:"batchEditingStopped",undoStarted:"undoStarted",undoEnded:"undoEnded",redoStarted:"redoStarted",redoEnded:"redoEnded",cellSelectionDeleteStart:"cellSelectionDeleteStart",cellSelectionDeleteEnd:"cellSelectionDeleteEnd",rangeDeleteStart:"rangeDeleteStart",rangeDeleteEnd:"rangeDeleteEnd",fillStart:"fillStart",fillEnd:"fillEnd",filterOpened:"filterOpened",filterChanged:"filterChanged",filterModified:"filterModified",filterUiChanged:"filterUiChanged",floatingFilterUiChanged:"floatingFilterUiChanged",advancedFilterBuilderVisibleChanged:"advancedFilterBuilderVisibleChanged",findChanged:"findChanged",chartCreated:"chartCreated",chartRangeSelectionChanged:"chartRangeSelectionChanged",chartOptionsChanged:"chartOptionsChanged",chartDestroyed:"chartDestroyed",cellKeyDown:"cellKeyDown",gridReady:"gridReady",firstDataRendered:"firstDataRendered",gridSizeChanged:"gridSizeChanged",modelUpdated:"modelUpdated",virtualRowRemoved:"virtualRowRemoved",viewportChanged:"viewportChanged",bodyScroll:"bodyScroll",bodyScrollEnd:"bodyScrollEnd",dragStarted:"dragStarted",dragStopped:"dragStopped",dragCancelled:"dragCancelled",stateUpdated:"stateUpdated",paginationChanged:"paginationChanged",rowDragEnter:"rowDragEnter",rowDragMove:"rowDragMove",rowDragLeave:"rowDragLeave",rowDragEnd:"rowDragEnd",rowDragCancel:"rowDragCancel",rowResizeStarted:"rowResizeStarted",rowResizeEnded:"rowResizeEnded",columnRowGroupChanged:"columnRowGroupChanged",rowGroupOpened:"rowGroupOpened",expandOrCollapseAll:"expandOrCollapseAll",pivotMaxColumnsExceeded:"pivotMaxColumnsExceeded",pinnedRowDataChanged:"pinnedRowDataChanged",pinnedRowsChanged:"pinnedRowsChanged",rowDataUpdated:"rowDataUpdated",asyncTransactionsFlushed:"asyncTransactionsFlushed",storeRefreshed:"storeRefreshed",headerFocused:"headerFocused",cellClicked:"cellClicked",cellDoubleClicked:"cellDoubleClicked",cellFocused:"cellFocused",cellMouseOver:"cellMouseOver",cellMouseOut:"cellMouseOut",cellMouseDown:"cellMouseDown",rowClicked:"rowClicked",rowDoubleClicked:"rowDoubleClicked",rowSelected:"rowSelected",selectionChanged:"selectionChanged",cellContextMenu:"cellContextMenu",rangeSelectionChanged:"rangeSelectionChanged",cellSelectionChanged:"cellSelectionChanged",tooltipShow:"tooltipShow",tooltipHide:"tooltipHide",sortChanged:"sortChanged"},features:[I.Jv_([kv,Fv]),I.OA$],decls:0,vars:0,template:function(i,s){},encapsulation:2})}}return e})();const nI=new Set(um);function oI(e,t){return nI.has(e)?""===t||"false"!==t&&t:t}let aI=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=I.$C({type:e})}static{this.\u0275inj=G.G2t({})}}return e})();var Ph=Ft(6939),Tv=Ft(63),lI=Ft(6117),cI=Ft(356),dI=Ft(6279),uI=Ft(29),Dh=Ft(1696),Pv=Ft(3319);const hI=(e,t)=>t.label;function fI(e,t){if(1&e&&I.nrm(0,"cue-svg-icon",10),2&e){const r=I.XpG().$implicit;I.Y8G("name",r.icon)}}function gI(e,t){if(1&e){const r=I.RV6();I.j41(0,"cue-menu-item",9),I.bIt("click",function(s){const n=G.eBV(r).$implicit,o=I.XpG(3);return G.Njj(o.handleClick(s,n))}),I.nVh(1,fI,1,1,"cue-svg-icon",10),I.EFF(2),I.k0s()}if(2&e){const r=t.$implicit;I.R7$(),I.vxM(r.icon?1:-1),I.R7$(),I.SpI("",r.label," ")}}function pI(e,t){if(1&e){const r=I.RV6();I.j41(0,"cue-menu",5,0)(2,"cue-button",6,1),I.bIt("click",function(){G.eBV(r);const s=I.XpG(2);return G.Njj(s.onMenuButtonClick())}),I.nrm(4,"cue-button-icon",7),I.k0s(),I.j41(5,"cue-menu-wrap",8),I.bIt("click",function(s){G.eBV(r);const n=I.XpG(2);return G.Njj(n.onMenuItemContainerClick(s))}),I.Z7z(6,gI,3,2,"cue-menu-item",null,hI),I.k0s()()}if(2&e){const r=I.XpG(2);I.R7$(2),I.Y8G("variant",r.settings().buttonVariant)("size",r.settings().buttonSize),I.R7$(2),I.Y8G("icon",r.settings().buttonIcon),I.R7$(2),I.Dyx(r.menuItems())}}function mI(e,t){if(1&e){const r=I.RV6();I.j41(0,"div",3),I.bIt("mouseleave",function(){G.eBV(r);const s=I.XpG();return G.Njj(s.onMouseLeave())})("wheel",function(s){G.eBV(r);const n=I.XpG();return G.Njj(n.onWheel(s))})("scroll",function(s){G.eBV(r);const n=I.XpG();return G.Njj(n.onScroll(s))}),I.j41(1,"div",4),I.nVh(2,pI,8,3,"cue-menu",5),I.k0s()()}if(2&e){const r=I.XpG();I.Aen(r.containerStyles()),I.R7$(2),I.vxM(r.visible()?2:-1)}}class Dv{mode="none";buttonIcon="more-vert";buttonVariant="accent";buttonSize="xs"}let vI=(()=>{class e{portal;overlay=(0,G.WQX)(Tv.hJ);overlayRef=null;visible=(0,N.hFB)(!1);data=(0,N.hFB)(null);settings=(0,N.hFB)(new Dv);menuItems=(0,N.hFB)([]);positionConfig=(0,N.hFB)(null);bgColor=(0,N.hFB)("transparent");containerEl=(0,N.hFB)(null);visibilityChange=(0,N.CGW)();_globalMouseTracker=null;_isMenuOpen=!1;containerStyles=(0,qr.EW)(()=>`\n pointer-events: none; \n background: linear-gradient(to left, ${this.bgColor()} 20px, transparent 100%);\n height: 100%;\n width: 100%;\n `);constructor(){(0,G.QZP)(()=>{const r=this.positionConfig();this.visible()&&r?(this.attachOverlay(r),this.startGlobalMouseTracking(r)):(this.detachOverlay(),this.stopGlobalMouseTracking())})}ngOnDestroy(){this.stopGlobalMouseTracking(),this.detachOverlay()}startGlobalMouseTracking(r){this.stopGlobalMouseTracking();let i=0;this._globalMouseTracker=n=>{const o=Date.now();if(o-i<50)return;i=o;const a=n.clientX,l=n.clientY;!(a>=r.x-10&&a<=r.x+r.width+10&&l>=r.y-10&&l<=r.y+r.height+10)&&!this._isMenuOpen&&setTimeout(()=>{this.visibilityChange.emit(!1)},100)},this._globalMouseTracker&&document.addEventListener("mousemove",this._globalMouseTracker,{passive:!0})}stopGlobalMouseTracking(){this._globalMouseTracker&&(document.removeEventListener("mousemove",this._globalMouseTracker),this._globalMouseTracker=null)}attachOverlay(r){const i=this.adjustForPaginator(r);if(!this.overlayRef){const n=this.overlay.position().flexibleConnectedTo({x:i.x,y:i.y,width:i.width,height:i.height}).withPositions([{originX:"start",originY:"top",overlayX:"start",overlayY:"top"}]).withPush(!1);this.overlayRef=this.overlay.create({positionStrategy:n,width:i.width,height:i.height,hasBackdrop:!1,panelClass:["cell-overlay-panel"],scrollStrategy:this.overlay.scrollStrategies.noop()})}const s=this.overlay.position().flexibleConnectedTo({x:i.x,y:i.y,width:i.width,height:i.height}).withPositions([{originX:"start",originY:"top",overlayX:"start",overlayY:"top"}]).withPush(!1);this.overlayRef.updatePositionStrategy(s),this.overlayRef.updateSize({width:i.width,height:i.height}),this.overlayRef.hasAttached()||(this.overlayRef.attach(this.portal),setTimeout(()=>{const n=this.overlayRef?.overlayElement;n&&(n.style.pointerEvents="none",n.style.setProperty("pointer-events","none","important"))},0))}detachOverlay(){this.overlayRef&&this.overlayRef.hasAttached()&&this.overlayRef.detach()}adjustForPaginator(r){let i={...r};const s=this.containerEl()??document.documentElement,n=s.querySelector(".ag-header");if(n){const a=n.getBoundingClientRect();if(i.y<a.bottom){const c=Math.max(0,i.y+i.height-a.bottom),d=Math.max(i.y,a.bottom);if(c<10)return{...i,height:0};i={...i,y:d,height:c}}}const o=s.querySelector(".cue-paginator");if(o){const a=o.getBoundingClientRect();if(i.y+i.height>a.top){const c=Math.max(0,a.top-i.y);if(c<10)return{...i,height:0};i={...i,height:c}}}return i}handleClick(r,i){r.stopPropagation(),this._isMenuOpen=!1,i.action(this.data()),this.detachOverlay(),this.stopGlobalMouseTracking(),this.visibilityChange.emit(!1)}onMouseLeave(){this._isMenuOpen||(this.stopGlobalMouseTracking(),this.visibilityChange.emit(!1))}onWheel(r){return!0}onScroll(r){return!0}onMenuButtonClick(){this._isMenuOpen=!0,setTimeout(()=>{const r=i=>{const s=i.target;!s.closest("cue-menu-wrap")&&!s.closest("cue-button")&&(this._isMenuOpen=!1,document.removeEventListener("click",r))};document.addEventListener("click",r,{capture:!0})},0)}onMenuItemContainerClick(r){this._isMenuOpen=!1}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=I.VBU({type:e,selectors:[["cue-cell-overlay"]],viewQuery:function(i,s){if(1&i&&I.GBs(Ph.bV,5),2&i){let n;I.mGM(n=I.lsd())&&(s.portal=n.first)}},inputs:{visible:[1,"visible"],data:[1,"data"],settings:[1,"settings"],menuItems:[1,"menuItems"],positionConfig:[1,"positionConfig"],bgColor:[1,"bgColor"],containerEl:[1,"containerEl"]},outputs:{visibilityChange:"visibilityChange"},decls:1,vars:0,consts:[["menu",""],["trigger",""],["cdkPortal",""],[1,"overlay-container",3,"mouseleave","wheel","scroll"],[1,"overlay-content"],["positioning","bottomleft"],["trigger","",3,"click","variant","size"],[3,"icon"],["menu","",3,"click"],[3,"click"],["before","",3,"name"]],template:function(i,s){1&i&&I.DNE(0,mI,3,3,"ng-template",2)},dependencies:[Ph.jc,Ph.bV,Tv.z_,lI.W,uI.A,Dh.$,Pv.a,cI.M,dI.D],styles:["[_nghost-%COMP%] .cell-overlay-panel{pointer-events:none!important}.overlay-container[_ngcontent-%COMP%]{pointer-events:auto;display:flex;align-items:center;justify-content:flex-end;padding:0 8px;box-sizing:border-box;height:100%;width:100%}.overlay-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;pointer-events:auto}"],changeDetection:0})}return e})();function wI(e,t){const r={browserColorScheme:"light",fontFamily:"var(--cue-font-family)",fontSize:`var(--cue-font-${e}-size)`,dataFontSize:`var(--cue-font-${e}-size)`,headerFontSize:`var(--cue-font-${e}-size)`,backgroundColor:"transparent",foregroundColor:"blue",textColor:"var(--cue-text-primary)",borderColor:"transparent",rowHeight:`var(--cue-table-${e}-row-height)`,headerHeight:`var(--cue-table-${e}-header-height)`,headerColumnResizeHandleColor:"var(--cue-table-secondary-text-color)",headerColumnResizeHandleWidth:1,columnBorder:!1,wrapperBorder:!0,headerRowBorder:!1,rowBorder:{style:"solid",width:1,color:"var(--cue-table-border-color)"},headerBackgroundColor:"transparent",headerTextColor:"var(--cue-table-header-foreground-color)",menuBackgroundColor:"var(--cue-menu-background-color)",menuBorder:"1px solid var(--cue-border-color)",menuTextColor:"var(--cue-menu-foreground-color)",borderRadius:"var(--cue-menu-border-radius)",inputBackgroundColor:"var(--cue-menu-item-background-color)",inputFocusBackgroundColor:"var(--cue-menu-item-focus-background-color)",inputIconColor:"var(--cue-menu-foreground-color)",pickerButtonFocusBackgroundColor:"var(--cue-menu-item-focus-background-color)",pickerListBackgroundColor:"var(--cue-menu-background-color)",selectCellBackgroundColor:"var(--cue-menu-background-color)",pinnedRowBackgroundColor:"var(--cue-table-selected-color)",pinnedRowTextColor:"var(--cue-table-selected-text-color)",panelBackgroundColor:"var(--cue-menu-background-color)",tabBackgroundColor:"var(--cue-menu-background-color)",tooltipBackgroundColor:"var(--cue-menu-background-color)",tooltipTextColor:"var(--cue-menu-foreground-color)",checkboxUncheckedBorderColor:"var(--cue-border-color)",checkboxCheckedBorderColor:"var(--cue-border-color)",checkboxIndeterminateBorderColor:"var(--cue-border-color)",rowHoverColor:"var(--cue-table-row-hover-bg)"};return t&&(r.selectedRowBackgroundColor="var(--cue-table-selected-color)"),XR.withParams(r).withPart(xI)}const xI=(e=>{const t=[];if("image"===e.type){const{icons:r,mask:i}=e;for(const s of Object.keys(r)){const n=au(r[s]);t.push(i?`.ag-icon-${s}::before { mask-image: ${n}; }`:`.ag-icon-${s}::before { background-image: ${n}; ${em} }`)}}if("font"===e.type){const{family:r,weight:i,color:s,icons:n}=e;let o=em;r&&(o+=` font-family: ${ou(r)};`),i&&(o+=` font-weight: ${Dp(i)};`),s&&(o+=` color: ${jl(s)};`);for(const a of Object.keys(n))t.push(`.ag-icon-${a}::before { content: ${JSON.stringify(n[a])}; ${o} }`)}return gt({css:t.join(";\n"),cssImports:e.cssImports})})({type:"image",mask:!0,icons:{filter:{svg:Ft(5869).filter}}});var SI=Ft(9615),bI=Ft(5970),Av=Ft(5381),Mv=Ft(2245),Iv=Ft(7888);const yI=(e,t,r)=>({startIndex:e,endIndex:t,totalItems:r});function EI(e,t){if(1&e){const r=I.RV6();I.j41(0,"cue-flexcontainer",3)(1,"cue-typography",4),I.EFF(2),I.nI1(3,"transloco"),I.k0s(),I.j41(4,"cue-select",5),I.mxI("valueChange",function(s){G.eBV(r);const n=I.XpG();return I.DH7(n.pageSize,s)||(n.pageSize=s),G.Njj(s)}),I.k0s()(),I.nrm(5,"span",6)}if(2&e){const r=I.XpG();I.R7$(),I.Y8G("noWrap",!0),I.R7$(),I.JRh(I.bMT(3,5,"components.paginator.itemsPerPage")),I.R7$(2),I.R50("value",r.pageSize),I.Y8G("options",r.pageSizeOptions())("underline",!1)}}function FI(e,t){if(1&e){const r=I.RV6();I.j41(0,"cue-button",7),I.bIt("click",function(){G.eBV(r);const s=I.XpG();return G.Njj(s.first())}),I.nrm(1,"cue-button-icon",8),I.k0s(),I.j41(2,"cue-button",7),I.bIt("click",function(){G.eBV(r);const s=I.XpG();return G.Njj(s.back())}),I.nrm(3,"cue-button-icon",9),I.k0s()}}function RI(e,t){if(1&e){const r=I.RV6();I.j41(0,"cue-button",7),I.bIt("click",function(){G.eBV(r);const s=I.XpG();return G.Njj(s.next())}),I.nrm(1,"cue-button-icon",10),I.k0s(),I.j41(2,"cue-button",7),I.bIt("click",function(){G.eBV(r);const s=I.XpG();return G.Njj(s.last())}),I.nrm(3,"cue-button-icon",11),I.k0s()}}let kI=(()=>{class e{pageSizeOptions=(0,N.hFB)([5,10,25,100]);size=(0,N.hFB)(111);pageSize=(0,N.geq)(10);menuPosition=(0,N.hFB)("topright");autoAdjust=(0,N.hFB)(!0);currentPage=(0,N.CGW)();_startIndex=(0,G.vPA)(0);_endIndex=(0,G.vPA)(0);anythingToPaginate=(0,qr.EW)(()=>{const r=this.adjustedPageSizeOptions()[this.adjustedPageSizeOptions().length-1];return this.size()>r});startIndex=(0,qr.EW)(()=>this._startIndex()+1);endIndex=(0,qr.EW)(()=>Math.min(this._endIndex(),this.size()));isFirstPage=(0,qr.EW)(()=>0===this._startIndex());isLastPage=(0,qr.EW)(()=>this._endIndex()>=this.size());adjustedPageSizeOptions=(0,qr.EW)(()=>{let r=this.pageSizeOptions();if(!this.autoAdjust())return r;const i=r[r.length-1],s=this.size();return s<i&&(r=r.filter(n=>n<=s),r.length||(r=[s])),r});constructor(){(0,G.QZP)(()=>{this._resetPagination()}),(0,G.QZP)(()=>{this.currentPage.emit({startIndex:this._startIndex(),endIndex:this._endIndex(),pageSize:this.pageSize()})})}setSize(r){this.pageSize.set(r),this._resetPagination()}next(){const r=this._endIndex();this._startIndex.set(r),this._endIndex.set(r+this.pageSize())}back(){const r=Math.max(0,this._startIndex()-this.pageSize());this._startIndex.set(r),this._endIndex.set(r+this.pageSize())}first(){this._startIndex.set(0),this._endIndex.set(this.pageSize())}last(){const r=Math.max(0,this.size()-(this.size()%this.pageSize()||this.pageSize()));this._startIndex.set(r),this._endIndex.set(this.size())}_resetPagination(){this._startIndex.set(0),this._endIndex.set(Math.min(this.pageSize(),this.size()))}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=I.VBU({type:e,selectors:[["cue-paginator"]],inputs:{pageSizeOptions:[1,"pageSizeOptions"],size:[1,"size"],pageSize:[1,"pageSize"],menuPosition:[1,"menuPosition"],autoAdjust:[1,"autoAdjust"]},outputs:{pageSize:"pageSizeChange",currentPage:"currentPage"},decls:8,vars:11,consts:[["direction","row","justify","end","align","center",1,"paginator",2,"width","calc(100% - 4px)","padding","0 2px"],["size","s"],["direction","row","gap","s"],["direction","row","gap","s","align","center"],["size","s",3,"noWrap"],["size","xs","menuPosition","topright",3,"valueChange","value","options","underline"],[2,"flex","1"],["size","xs","variant","tertiary",3,"click"],["icon","paginator-first"],["icon","paginator-back"],["icon","paginator-next"],["icon","paginator-last"]],template:function(i,s){1&i&&(I.j41(0,"cue-flexcontainer",0),I.nVh(1,EI,6,7),I.j41(2,"cue-typography",1),I.EFF(3),I.nI1(4,"transloco"),I.k0s(),I.j41(5,"cue-flexcontainer",2),I.nVh(6,FI,4,0),I.nVh(7,RI,4,0),I.k0s()()),2&i&&(I.R7$(),I.vxM(!s.autoAdjust()||s.anythingToPaginate()?1:-1),I.R7$(2),I.JRh(I.i5U(4,4,"components.paginator.currentDisplay",I.sMw(7,yI,s.startIndex(),s.endIndex(),s.size()))),I.R7$(3),I.vxM(s.isFirstPage()?-1:6),I.R7$(),I.vxM(s.isLastPage()?-1:7))},dependencies:[Av.n,Mv.o,Dh.$,Pv.a,Iv.l,kh.Kj],styles:[".paginator[_ngcontent-%COMP%]{color:var(--cue-paginator-text-color);padding-top:3px;padding-bottom:3px}"],changeDetection:0})}return e})();function TI(e,t){if(1&e){const r=I.RV6();I.j41(0,"ag-grid-angular",4),I.bIt("gridReady",function(s){G.eBV(r);const n=I.XpG();return G.Njj(n.onGridReady(s))})("selectionChanged",function(s){G.eBV(r);const n=I.XpG();return G.Njj(n.onSelectionChanged(s))})("cellValueChanged",function(s){G.eBV(r);const n=I.XpG();return G.Njj(n.onCellValueChanged(s))})("filterChanged",function(){G.eBV(r);const s=I.XpG();return G.Njj(s.onFilterChanged())})("modelUpdated",function(){G.eBV(r);const s=I.XpG();return G.Njj(s.onModelUpdated())}),I.k0s()}if(2&e){const r=I.XpG();I.Aen(r.style()),I.HbH("ag-theme-custom ag-theme-custom-"+r.size()),I.Y8G("rowData",r.rowData())("columnDefs",r.columnDefs())("gridOptions",r.gridOptionsInternal())("pagination",!0)("paginationPageSize",r.paginationPageSize())("suppressPaginationPanel",!0)("rowSelection",r.rowSelection())("enableCellTextSelection",r.enableCellTextSelection())("ensureDomOrder",!0)}}function PI(e,t){if(1&e&&(I.j41(0,"div",5)(1,"div",6),I.nrm(2,"div",7),I.j41(3,"span"),I.EFF(4,"Loading grid..."),I.k0s()()()),2&e){const r=I.XpG();I.Aen(r.style())}}function DI(e,t){if(1&e){const r=I.RV6();I.nrm(0,"div",8),I.j41(1,"cue-paginator",9),I.mxI("pageSizeChange",function(s){G.eBV(r);const n=I.XpG();return I.DH7(n.paginationPageSize,s)||(n.paginationPageSize=s),G.Njj(s)}),I.bIt("currentPage",function(s){G.eBV(r);const n=I.XpG();return G.Njj(n.onPageChange(s))}),I.k0s()}if(2&e){const r=I.XpG();I.R7$(),I.Y8G("size",r.totalRowCount()),I.R50("pageSize",r.paginationPageSize)}}kd.registerModules([bv]);let AI=(()=>{class e{rowData=(0,N.hFB)([]);columnDefs=(0,N.hFB)([]);gridOptions=(0,N.hFB)({});size=(0,N.hFB)("m");rowSelection=(0,N.hFB)(void 0);height=(0,N.hFB)(null);paginationPageSize=(0,N.geq)(10);showPaginator=(0,N.hFB)(!0);enableCellTextSelection=(0,N.hFB)(!0);noRowsText=(0,N.hFB)("No rows to display");overlaySettings=(0,N.hFB)(new Dv);overlayActions=(0,N.hFB)([]);selectedRows=(0,N.CGW)();hoveredCell=(0,N.CGW)();cellValueChanged=(0,N.CGW)();visibleRows=(0,N.CGW)();gridApiReady=(0,N.CGW)();_filteredRowCount=(0,G.vPA)(0);totalRowCount=(0,qr.EW)(()=>this._filteredRowCount()||this.rowData().length);clickableRows=(0,qr.EW)(()=>"singleRow"===this.rowSelection()?.mode);bgColor=(0,G.vPA)("transparent");_stylesLoaded=(0,G.vPA)(!1);gridApi;_hostEl=(0,G.WQX)(I.aKT);constructor(){this.setAgGridCssProperties(),(0,G.QZP)(()=>{const r=this.noRowsText(),i=this.rowData();this.gridApi&&(this.gridApi.setGridOption("overlayNoRowsTemplate",r),0===i.length?(this.gridApi.hideOverlay(),setTimeout(()=>{this.gridApi.showNoRowsOverlay()},0)):this.gridApi.hideOverlay())}),(0,G.QZP)(()=>{const r=this._localeText();this.gridApi&&r&&Object.keys(r).length>0&&(this.gridApi.setGridOption("localeText",r),this.gridApi.refreshHeader(),this.gridApi.getColumns()?.forEach(i=>{this.gridApi.destroyFilter(i)}))}),(0,G.QZP)(()=>{this.size(),this.setAgGridCssProperties()}),(0,G.QZP)(()=>{this.columnDefs(),this.gridApi&&setTimeout(()=>{this.gridApi&&this.gridApi.refreshCells({force:!0})},0)}),this._onScroll=()=>{this.overlayVisible.set(!1),this.currentCellData.set(null)},window.addEventListener("scroll",this._onScroll,!0),this._onHideCellOverlay=()=>{this.overlayVisible.set(!1),this.currentCellData.set(null)},window.addEventListener("cue-hide-cell-overlay",this._onHideCellOverlay),this._visibilityObserver=new IntersectionObserver(r=>{0===r[0]?.intersectionRatio&&(this.overlayVisible.set(!1),this.currentCellData.set(null))}),this._visibilityObserver.observe(this._hostEl.nativeElement)}_onScroll;_onHideCellOverlay;_visibilityObserver;onGridReady(r){this.gridApi=r.api,this.gridApiReady.emit(r.api);const i=this._localeText();i&&Object.keys(i).length>0&&this.gridApi.setGridOption("localeText",i),this._updateFilteredRowCount(),r.api.addEventListener("filterChanged",()=>{this._updateFilteredRowCount()}),this.initializeGridLayout()}setAgGridCssProperties(){const r=this.size(),i=this._hostEl.nativeElement,n={xs:{rowHeight:"32px",headerHeight:"36px",fontSize:"12px"},s:{rowHeight:"36px",headerHeight:"42px",fontSize:"13px"},m:{rowHeight:"42px",headerHeight:"48px",fontSize:"14px"},l:{rowHeight:"48px",headerHeight:"54px",fontSize:"16px"},xl:{rowHeight:"54px",headerHeight:"60px",fontSize:"18px"}}[r];i.style.setProperty("--ag-row-height",n.rowHeight),i.style.setProperty("--ag-header-height",n.headerHeight),i.style.setProperty("--ag-font-size",n.fontSize),this._stylesLoaded.set(!0)}initializeGridLayout(){this.gridApi&&requestAnimationFrame(()=>{this.gridApi&&(this.gridApi.refreshCells({force:!0}),this.gridApi.sizeColumnsToFit(),this.gridApi.dispatchEvent({type:"gridSizeChanged"}))})}onSelectionChanged(r){const i=r.api.getSelectedRows();this.selectedRows.emit(i),this.overlayVisible.set(!1)}onCellValueChanged(r){if(this.cellValueChanged.emit(r),this.gridApi){const i=this.gridApi.getSelectedRows(),s=r.node;i.some(o=>o===s.data)&&this.selectedRows.emit(i)}}onFilterChanged(){this._emitVisibleRows()}onModelUpdated(){this._emitVisibleRows()}_emitVisibleRows(){if(this.gridApi){const r=[];this.gridApi.forEachNodeAfterFilter(i=>{r.push(i.data)}),this.visibleRows.emit(r)}}onPageChange(r){if(this.gridApi){const i=Math.floor(r.startIndex/r.pageSize);this.gridApi.paginationGoToPage(i)}}_transloco=(0,G.WQX)(kh.JO);_localeText=(0,ZM.ot)(this._transloco.selectTranslateObject("components.agGrid.localeText"),{initialValue:{}});gridOptionsInternal=(0,qr.EW)(()=>{const r=this.size(),i=this.clickableRows(),s=this.noRowsText(),n=this.enableCellTextSelection(),o=this.gridOptions();return{theme:wI(r,i),overlayNoRowsTemplate:s,enableCellTextSelection:n,...i?{getRowStyle:()=>({cursor:"pointer"})}:{},processDataFromClipboard:l=>l.data,processCellFromClipboard:l=>l.value,...o}});ngOnDestroy(){this._onScroll&&window.removeEventListener("scroll",this._onScroll,!0),this._onHideCellOverlay&&window.removeEventListener("cue-hide-cell-overlay",this._onHideCellOverlay),this._visibilityObserver&&this._visibilityObserver.disconnect()}style=(0,qr.EW)(()=>({height:this.height()??`var(--cue-table-${this.size()}-height)`}));_updateFilteredRowCount(){if(this.gridApi){const r=this.gridApi.getDisplayedRowCount();this._filteredRowCount.set(r)}}copyToClipboard(){this.gridApi&&this.gridApi.copySelectedRowsToClipboard()}copySelectedRangeToClipboard(){this.gridApi&&this.gridApi.copySelectedRangeToClipboard()}selectAll(){this.gridApi&&this.gridApi.selectAll()}deselectAll(){this.gridApi&&this.gridApi.deselectAll()}overlayVisible=(0,G.vPA)(!1);overlayPosition=(0,G.vPA)(null);currentCellData=(0,G.vPA)(null);onGridMouseOver(r){const i=r.target,s=this.overlaySettings().mode;"none"!==s&&("cell"===s?this.handleCellHover(i):"row"===s&&this.handleRowHover(i))}onGridMouseOut(r){const i=r.target,s=this.overlaySettings().mode,n=r.relatedTarget;if("none"===s)return;const o=document.querySelector(".overlay-container");if(o&&n&&o.contains(n))return;const a=r.currentTarget,l=!i.closest(".ag-row")&&!i.closest(".ag-cell"),c=n&&a.contains(n)&&!n.closest(".ag-row")&&!n.closest(".ag-cell")&&!n.closest(".cue-paginator");if(l||c)return this.overlayVisible.set(!1),void this.currentCellData.set(null);"cell"===s?i.closest(".ag-cell")||(this.overlayVisible.set(!1),this.currentCellData.set(null)):"row"===s&&(i.closest(".ag-row")||(this.overlayVisible.set(!1),this.currentCellData.set(null)))}handleCellHover(r){this.overlayVisible.set(!1),this.currentCellData.set(null);const i=r.closest(".ag-cell");if(i&&this.gridApi){const s=i.getBoundingClientRect(),n=i.closest(".ag-row");if(n){const o=parseInt(n.getAttribute("row-index")||"0",10),a=i.getAttribute("col-id");if(null!==a){const l=this.gridApi.getDisplayedRowAtIndex(o),c=this.gridApi.getColumn(a);if(l&&c){const d={rowData:l.data,colDef:c.getColDef(),value:l.data[a],rowIndex:o,columnIndex:c.getInstanceId()||0,cellRect:s};this.currentCellData.set(d),this.overlayPosition.set({x:s.left,y:s.top,width:s.width,height:s.height}),this.hoveredCell.emit(d),this.overlayVisible.set(!0)}}}}}handleRowHover(r){this.overlayVisible.set(!1),this.currentCellData.set(null);const i=r.closest(".ag-row");if(i&&this.gridApi){const s=parseInt(i.getAttribute("row-index")||"0",10),n=this.gridApi.getDisplayedRowAtIndex(s);if(n){const o=i.getBoundingClientRect(),a=i.querySelector(".ag-cell:last-child"),l=a?a.getBoundingClientRect():o,c=this.columnDefs()[0]?.field||"",d=this.gridApi.getColumn(c),u={rowData:n.data,colDef:d?.getColDef()||{},value:n.data[c],rowIndex:s,columnIndex:0,cellRect:l};this.currentCellData.set(u),this.overlayPosition.set({x:l.left,y:l.top,width:l.width,height:l.height}),this.overlayVisible.set(!0)}}}handleOverlayAction(r){const i=this.currentCellData();i&&(r(i),this.overlayVisible.set(!1))}onOverlayVisibilityChange(r){this.overlayVisible.set(r)}onContainerResize(){this.gridApi&&this.gridApi.sizeColumnsToFit()}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=I.VBU({type:e,selectors:[["cue-ag-grid"]],inputs:{rowData:[1,"rowData"],columnDefs:[1,"columnDefs"],gridOptions:[1,"gridOptions"],size:[1,"size"],rowSelection:[1,"rowSelection"],height:[1,"height"],paginationPageSize:[1,"paginationPageSize"],showPaginator:[1,"showPaginator"],enableCellTextSelection:[1,"enableCellTextSelection"],noRowsText:[1,"noRowsText"],overlaySettings:[1,"overlaySettings"],overlayActions:[1,"overlayActions"]},outputs:{paginationPageSize:"paginationPageSizeChange",selectedRows:"selectedRows",hoveredCell:"hoveredCell",cellValueChanged:"cellValueChanged",visibleRows:"visibleRows",gridApiReady:"gridApiReady"},decls:5,vars:11,consts:[["cueResized","",1,"grid-container",3,"mouseover","mouseout","cueBgColor","resized"],[3,"class","style","rowData","columnDefs","gridOptions","pagination","paginationPageSize","suppressPaginationPanel","rowSelection","enableCellTextSelection","ensureDomOrder"],[1,"grid-loading-placeholder",3,"style"],[3,"visibilityChange","settings","visible","menuItems","positionConfig","data","bgColor","containerEl"],[3,"gridReady","selectionChanged","cellValueChanged","filterChanged","modelUpdated","rowData","columnDefs","gridOptions","pagination","paginationPageSize","suppressPaginationPanel","rowSelection","enableCellTextSelection","ensureDomOrder"],[1,"grid-loading-placeholder"],[1,"loading-content"],[1,"loading-spinner"],[2,"height","20px"],[1,"cue-paginator",3,"pageSizeChange","currentPage","size","pageSize"]],template:function(i,s){1&i&&(I.j41(0,"div",0),I.bIt("mouseover",function(o){return s.onGridMouseOver(o)})("mouseout",function(o){return s.onGridMouseOut(o)})("cueBgColor",function(o){return s.bgColor.set(o)})("resized",function(){return s.onContainerResize()}),I.nVh(1,TI,1,13,"ag-grid-angular",1)(2,PI,5,2,"div",2),I.j41(3,"cue-cell-overlay",3),I.bIt("visibilityChange",function(o){return s.onOverlayVisibilityChange(o)}),I.k0s(),I.nVh(4,DI,2,2),I.k0s()),2&i&&(I.AVh("styles-loading",!s._stylesLoaded()),I.R7$(),I.vxM(s._stylesLoaded()?1:2),I.R7$(2),I.Y8G("settings",s.overlaySettings())("visible",s.overlayVisible())("menuItems",s.overlayActions())("positionConfig",s.overlayPosition())("data",s.currentCellData())("bgColor",s.bgColor())("containerEl",s._hostEl.nativeElement),I.R7$(),I.vxM(s.rowData().length&&s.showPaginator()?4:-1))},dependencies:[aI,sI,kI,vI,SI.k,bI.C],styles:[".cell-overlay-panel[_ngcontent-%COMP%]{z-index:1}.cell-overlay-panel[_ngcontent-%COMP%] .overlay-container[_ngcontent-%COMP%]{height:100%;width:100%}.grid-container[_ngcontent-%COMP%]{position:relative;height:100%;width:100%;display:flex;flex-direction:column;z-index:1;min-height:0}.grid-container.styles-loading[_ngcontent-%COMP%]{opacity:.9}.grid-container[_ngcontent-%COMP%]:not(.styles-loading){opacity:1}.grid-loading-placeholder[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;min-height:200px;background:transparent}.grid-loading-placeholder[_ngcontent-%COMP%] .loading-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:12px;color:var(--cue-color-text-secondary, #666)}.grid-loading-placeholder[_ngcontent-%COMP%] .loading-content[_ngcontent-%COMP%] .loading-spinner[_ngcontent-%COMP%]{width:24px;height:24px;border:2px solid var(--cue-color-border, #e0e0e0);border-top:2px solid var(--cue-color-primary, #007bff);border-radius:50%;animation:_ngcontent-%COMP%_spin 1s linear infinite}.grid-loading-placeholder[_ngcontent-%COMP%] .loading-content[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:14px;font-family:var(--cue-font-family, sans-serif)}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}} .ag-theme-custom{height:100%;width:100%;display:flex;flex-direction:column;flex:1 1 auto;min-height:0;--ag-row-height: var(--cue-table-m-row-height, 42px);--ag-header-height: var(--cue-table-m-header-height, 48px);--ag-font-size: var(--cue-font-m-size, 14px);--ag-font-family: var(--cue-font-family, sans-serif)} .ag-theme-custom.ag-theme-custom-xs{--ag-row-height: var(--cue-table-xs-row-height, 32px);--ag-header-height: var(--cue-table-xs-header-height, 36px);--ag-font-size: var(--cue-font-xs-size, 12px)} .ag-theme-custom.ag-theme-custom-s{--ag-row-height: var(--cue-table-s-row-height, 36px);--ag-header-height: var(--cue-table-s-header-height, 42px);--ag-font-size: var(--cue-font-s-size, 13px)} .ag-theme-custom.ag-theme-custom-m{--ag-row-height: var(--cue-table-m-row-height, 42px);--ag-header-height: var(--cue-table-m-header-height, 48px);--ag-font-size: var(--cue-font-m-size, 14px)} .ag-theme-custom.ag-theme-custom-l{--ag-row-height: var(--cue-table-l-row-height, 48px);--ag-header-height: var(--cue-table-l-header-height, 54px);--ag-font-size: var(--cue-font-l-size, 16px)} .ag-theme-custom.ag-theme-custom-xl{--ag-row-height: var(--cue-table-xl-row-height, 54px);--ag-header-height: var(--cue-table-xl-header-height, 60px);--ag-font-size: var(--cue-font-xl-size, 18px)} .ag-theme-custom .ag-root-wrapper{display:flex;flex-direction:column;flex:1 1 auto;min-height:0} .ag-theme-custom .ag-root-wrapper-body{display:flex;flex-direction:column;flex:1 1 auto;min-height:0} .ag-theme-custom .ag-root{display:flex;flex-direction:column;flex:1 1 auto;min-height:0} .ag-theme-custom .ag-body{flex:1 1 auto;min-height:0} .ag-theme-custom .ag-body-viewport{flex:1 1 auto;min-height:0;overflow-y:auto} .ag-theme-custom .ag-body-viewport-wrapper{flex:1 1 auto;min-height:0} .ag-theme-custom .ag-body-horizontal-scroll{flex-shrink:0} .ag-theme-custom .ag-header{position:sticky;top:0;z-index:2;background:inherit;flex-shrink:0} .ag-theme-custom .ag-floating-top{flex-shrink:0} .ag-theme-custom .ag-floating-bottom{flex-shrink:0} .ag-theme-custom .ag-status-bar{flex-shrink:0} .ag-theme-custom .ag-paging-panel{flex-shrink:0} .ag-row .ag-cell{display:flex;justify-content:flex-start;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} .ag-cell-wrapper{display:flex;align-items:center;justify-content:inherit;flex:1;min-width:0;width:100%} .ag-cell-value{display:flex;align-items:center;justify-content:inherit;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-user-select:text;user-select:text} .ag-cell.ag-cell-range-selected .ag-cell-value, .ag-cell.ag-cell-focus .ag-cell-value{white-space:normal;word-wrap:break-word;overflow-wrap:break-word} .ag-picker-field-wrapper, .ag-list-item{color:var(--cue-menu-foreground-color)!important} .ag-row.ag-row-selected .ag-cell, .ag-row.ag-row-selected .ag-cell .ag-cell-value{color:var(--cue-table-selected-text-color)!important} .ag-row:hover .ag-cell, .ag-row:hover .ag-cell .ag-cell-value{color:var(--cue-table-highlight-text-color)!important} .ag-row.ag-row-selected:hover .ag-cell, .ag-row.ag-row-selected:hover .ag-cell .ag-cell-value{color:var(--cue-table-selected-text-color)!important} .ag-cell:focus, .ag-cell.ag-cell-focus{border:none!important;outline:none!important} .ag-cell.ag-cell-range-selected{border:none!important;background-color:transparent!important} .ag-cell.ag-cell-range-single-cell{border:none!important;background-color:transparent!important} .header-align-left .ag-header-cell-label{justify-content:flex-start} .header-align-center .ag-header-cell-label{justify-content:center} .header-align-right .ag-header-cell-label{justify-content:flex-end} .cue-paginator{position:sticky;bottom:0;z-index:2;background:inherit;flex-shrink:0;margin-top:auto}"],changeDetection:0})}return e})(),II=(()=>{class e{appendClassToParentRow=(0,N.hFB)(!0);fileOverClass=(0,N.hFB)("file-hover");dropEnabled=(0,N.hFB)(!0);filesDropped=(0,N.CGW)();filesHovered=(0,N.CGW)();onDragOver(r){this.dropEnabled()&&(r.preventDefault(),r.stopPropagation(),this._appendFileHoverClass(r.target),this.filesHovered.emit(!0))}onDragLeave(r){r.preventDefault(),r.stopPropagation(),this._removeFileHoverClass(r.target),this.filesHovered.emit(!1)}onDrop(r){var i=this;return(0,_r.A)(function*(){if(r instanceof DragEvent&&r.dataTransfer){r.preventDefault(),i._removeFileHoverClass(r.target);const s=yield function MI(e){function t(i,s=""){return new Promise(n=>{i&&(i.isFile?i.file(o=>{o.filepath=s+o.name,r.push(o),n(o)}):i.isDirectory&&i.createReader().readEntries(a=>{const l=[];for(const c of a)l.push(t(c,s+i.name+"/"));n(Promise.all(l))}))})}const r=[];return new Promise(i=>{const s=[];for(const n of e)s.push(t(n.webkitGetAsEntry()));Promise.all(s).then(()=>{const n=[".DS_Store"],o=r.filter(a=>!n.includes(a.name));console.info(`${o.length} files dropped`),i(o)})})}(r.dataTransfer.items);i.filesDropped.emit(s),i.filesHovered.emit(!1)}})()}_appendFileHoverClass(r){if(this.appendClassToParentRow()){const i=this._getParentRow(r);i?i.classList.add(this.fileOverClass()):r.classList.add(this.fileOverClass())}else r.classList.add(this.fileOverClass())}_removeFileHoverClass(r){if(this.appendClassToParentRow()){const i=this._getParentRow(r);i?i.classList.remove(this.fileOverClass()):r.classList.remove(this.fileOverClass())}else r.classList.remove(this.fileOverClass())}_getParentRow(r){for(;r;){if("TR"===r.tagName)return r;r=r.parentNode}return null}static \u0275fac=function(i){return new(i||e)};static \u0275dir=I.FsC({type:e,selectors:[["","cueFileDrop",""]],hostBindings:function(i,s){1&i&&I.bIt("dragover",function(o){return s.onDragOver(o)})("dragleave",function(o){return s.onDragLeave(o)})("drop",function(o){return s.onDrop(o)})},inputs:{appendClassToParentRow:[1,"appendClassToParentRow"],fileOverClass:[1,"fileOverClass"],dropEnabled:[1,"dropEnabled"]},outputs:{filesDropped:"filesDropped",filesHovered:"filesHovered"}})}return e})();function Ah(){return Ah=(0,_r.A)(function*(e){return new Promise((t,r)=>{const i=document.createElement("input");i.style.display="none",i.setAttribute("type","file"),void 0!==e&&i.setAttribute("accept",e),document.body.appendChild(i),i.click(),i.addEventListener("change",s=>{const n=s.target?.files[0];i.remove(),n&&t(n),r()})})}),Ah.apply(this,arguments)}var vi=1200,Vn=1252,_I=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],Oh={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},Ac=function(e){-1!=_I.indexOf(e)&&(Vn=Oh[0]=e)},Ai=function(e){vi=e,Ac(e)};function Mc(){Ai(1200),function LI(){Ac(1252)}()}function Ic(e){for(var t=[],r=0,i=e.length;r<i;++r)t[r]=e.charCodeAt(r);return t}function _v(e){for(var t=[],r=0;r<e.length>>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r+1)+(e.charCodeAt(2*r)<<8));return t.join("")}var lt,Ho=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1);return 255==t&&254==r?function OI(e){for(var t=[],r=0;r<e.length>>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r)+(e.charCodeAt(2*r+1)<<8));return t.join("")}(e.slice(2)):254==t&&255==r?_v(e.slice(2)):65279==t?e.slice(1):e},Ga=function(t){return String.fromCharCode(t)},Bh=function(t){return String.fromCharCode(t)},on="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function za(e){for(var t="",r=0,i=0,s=0,n=0,o=0,a=0,l=0,c=0;c<e.length;)n=(r=e.charCodeAt(c++))>>2,o=(3&r)<<4|(i=e.charCodeAt(c++))>>4,a=(15&i)<<2|(s=e.charCodeAt(c++))>>6,l=63&s,isNaN(i)?a=l=64:isNaN(s)&&(l=64),t+=on.charAt(n)+on.charAt(o)+on.charAt(a)+on.charAt(l);return t}function Ci(e){var t="",n=0,o=0,a=0,l=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var c=0;c<e.length;)n=on.indexOf(e.charAt(c++)),o=on.indexOf(e.charAt(c++)),t+=String.fromCharCode(n<<2|o>>4),64!==(a=on.indexOf(e.charAt(c++)))&&(t+=String.fromCharCode((15&o)<<4|a>>2)),64!==(l=on.indexOf(e.charAt(c++)))&&(t+=String.fromCharCode((3&a)<<6|l));return t}var tt=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),Ts=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(t,r){return r?new Buffer(t,r):new Buffer(t)}:Buffer.from.bind(Buffer)}return function(){}}();function an(e){return tt?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function Lv(e){return tt?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var wi=function(t){return tt?Ts(t,"binary"):t.split("").map(function(r){return 255&r.charCodeAt(0)})};function ln(e){if(Array.isArray(e))return e.map(function(i){return String.fromCharCode(i)}).join("");for(var t=[],r=0;r<e.length;++r)t[r]=String.fromCharCode(e[r]);return t.join("")}function Nh(e){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return Nh(new Uint8Array(e));for(var t=new Array(e.length),r=0;r<e.length;++r)t[r]=e[r];return t}var br=tt?function(e){return Buffer.concat(e.map(function(t){return Buffer.isBuffer(t)?t:Ts(t)}))}:function(e){if(typeof Uint8Array<"u"){var t=0,r=0;for(t=0;t<e.length;++t)r+=e[t].length;var i=new Uint8Array(r),s=0;for(t=0,r=0;t<e.length;r+=s,++t)if(s=e[t].length,e[t]instanceof Uint8Array)i.set(e[t],r);else{if("string"==typeof e[t])throw"wtf";i.set(new Uint8Array(e[t]),r)}return i}return[].concat.apply([],e.map(function(n){return Array.isArray(n)?n:[].slice.call(n)}))},Hr=/\u0000/g,Ua=/[\u0001-\u0006]/g;function Go(e){for(var t="",r=e.length-1;r>=0;)t+=e.charAt(r--);return t}function Ki(e,t){var r=""+e;return r.length>=t?r:Zt("0",t-r.length)+r}function Hh(e,t){var r=""+e;return r.length>=t?r:Zt(" ",t-r.length)+r}function _c(e,t){var r=""+e;return r.length>=t?r:r+Zt(" ",t-r.length)}var Ov=Math.pow(2,32);function Vo(e,t){return e>Ov||e<-Ov?function HI(e,t){var r=""+Math.round(e);return r.length>=t?r:Zt("0",t-r.length)+r}(e,t):function GI(e,t){var r=""+e;return r.length>=t?r:Zt("0",t-r.length)+r}(Math.round(e),t)}function Lc(e,t){return e.length>=7+(t=t||0)&&103==(32|e.charCodeAt(t))&&101==(32|e.charCodeAt(t+1))&&110==(32|e.charCodeAt(t+2))&&101==(32|e.charCodeAt(t+3))&&114==(32|e.charCodeAt(t+4))&&97==(32|e.charCodeAt(t+5))&&108==(32|e.charCodeAt(t+6))}var Bv=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],Gh=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]],Be={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"\u4e0a\u5348/\u4e0b\u5348 "hh"\u6642"mm"\u5206"ss"\u79d2 "'},Nv={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},zI={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function Oc(e,t,r){for(var i=e<0?-1:1,s=e*i,n=0,o=1,a=0,l=1,c=0,d=0,u=Math.floor(s);c<t&&(a=(u=Math.floor(s))*o+n,d=u*c+l,!(s-u<5e-8));)s=1/(s-u),n=o,o=a,l=c,c=d;if(d>t&&(c>t?(d=l,a=n):(d=c,a=o)),!r)return[0,i*a,d];var h=Math.floor(i*a/d);return[h,i*a-h*d,d]}function cn(e,t,r){if(e>2958465||e<0)return null;var i=0|e,s=Math.floor(86400*(e-i)),n=0,o=[],a={D:i,T:s,u:86400*(e-i)-s,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(a.u)<1e-6&&(a.u=0),t&&t.date1904&&(i+=1462),a.u>.9999&&(a.u=0,86400==++s&&(a.T=s=0,++i,++a.D)),60===i)o=r?[1317,10,29]:[1900,2,29],n=3;else if(0===i)o=r?[1317,8,29]:[1900,1,0],n=6;else{i>60&&--i;var l=new Date(1900,0,1);l.setDate(l.getDate()+i-1),o=[l.getFullYear(),l.getMonth()+1,l.getDate()],n=l.getDay(),i<60&&(n=(n+6)%7),r&&(n=function qI(e,t){t[0]-=581;var r=e.getDay();return e<60&&(r=(r+6)%7),r}(l,o))}return a.y=o[0],a.m=o[1],a.d=o[2],a.S=s%60,s=Math.floor(s/60),a.M=s%60,s=Math.floor(s/60),a.H=s,a.q=n,a}var Hv=new Date(1899,11,31,0,0,0),WI=Hv.getTime(),UI=new Date(1900,2,1,0,0,0);function Gv(e,t){var r=e.getTime();return t?r-=1262304e5:e>=UI&&(r+=864e5),(r-(WI+6e4*(e.getTimezoneOffset()-Hv.getTimezoneOffset())))/864e5}function Vh(e){return-1==e.indexOf(".")?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function $a(e){var r,t=Math.floor(Math.log(Math.abs(e))*Math.LOG10E);return r=t>=-4&&t<=-1?e.toPrecision(10+t):Math.abs(t)<=9?function jI(e){var t=e<0?12:11,r=Vh(e.toFixed(12));return r.length<=t||(r=e.toPrecision(10)).length<=t?r:e.toExponential(5)}(e):10===t?e.toFixed(10).substr(0,12):function KI(e){var t=Vh(e.toFixed(11));return t.length>(e<0?12:11)||"0"===t||"-0"===t?e.toPrecision(6):t}(e),Vh(function $I(e){return-1==e.indexOf("E")?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}(r.toUpperCase()))}function zn(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(0|e)===e?e.toString(10):$a(e);case"undefined":return"";case"object":if(null==e)return"";if(e instanceof Date)return xi(14,Gv(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function XI(e,t,r,i){var l,s="",n=0,o=0,a=r.y,c=0;switch(e){case 98:a=r.y+543;case 121:switch(t.length){case 1:case 2:l=a%100,c=2;break;default:l=a%1e4,c=4}break;case 109:switch(t.length){case 1:case 2:l=r.m,c=t.length;break;case 3:return Gh[r.m-1][1];case 5:return Gh[r.m-1][0];default:return Gh[r.m-1][2]}break;case 100:switch(t.length){case 1:case 2:l=r.d,c=t.length;break;case 3:return Bv[r.q][0];default:return Bv[r.q][1]}break;case 104:switch(t.length){case 1:case 2:l=1+(r.H+11)%12,c=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:l=r.H,c=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:l=r.M,c=t.length;break;default:throw"bad minute format: "+t}break;case 115:if("s"!=t&&"ss"!=t&&".0"!=t&&".00"!=t&&".000"!=t)throw"bad second format: "+t;return 0!==r.u||"s"!=t&&"ss"!=t?(o=i>=2?3===i?1e3:100:1===i?10:1,(n=Math.round(o*(r.S+r.u)))>=60*o&&(n=0),"s"===t?0===n?"0":""+n/o:(s=Ki(n,2+i),"ss"===t?s.substr(0,2):"."+s.substr(2,t.length-1))):Ki(r.S,t.length);case 90:switch(t){case"[h]":case"[hh]":l=24*r.D+r.H;break;case"[m]":case"[mm]":l=60*(24*r.D+r.H)+r.M;break;case"[s]":case"[ss]":l=60*(60*(24*r.D+r.H)+r.M)+Math.round(r.S+r.u);break;default:throw"bad abstime format: "+t}c=3===t.length?1:2;break;case 101:l=a,c=1}return c>0?Ki(l,c):""}function dn(e){if(e.length<=3)return e;for(var r=e.length%3,i=e.substr(0,r);r!=e.length;r+=3)i+=(i.length>0?",":"")+e.substr(r,3);return i}var Vv=/%/g;function zv(e,t){var r,i=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(0==t)return"0.0E+0";if(t<0)return"-"+zv(e,-t);var s=e.indexOf(".");-1===s&&(s=e.indexOf("E"));var n=Math.floor(Math.log(t)*Math.LOG10E)%s;if(n<0&&(n+=s),-1===(r=(t/Math.pow(10,n)).toPrecision(i+1+(s+n)%s)).indexOf("e")){var o=Math.floor(Math.log(t)*Math.LOG10E);for(-1===r.indexOf(".")?r=r.charAt(0)+"."+r.substr(1)+"E+"+(o-r.length+n):r+="E+"+(o-n);"0."===r.substr(0,2);)r=(r=r.charAt(0)+r.substr(2,s)+"."+r.substr(2+s)).replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(a,l,c,d){return l+c+d.substr(0,(s+n)%s)+"."+d.substr(n)+"E"})}else r=t.toExponential(i);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}var Wv=/# (\?+)( ?)\/( ?)(\d+)/,Uv=/^#*0*\.([0#]+)/,$v=/\).*[0#]/,jv=/\(###\) ###\\?-####/;function Zr(e){for(var r,t="",i=0;i!=e.length;++i)switch(r=e.charCodeAt(i)){case 35:break;case 63:t+=" ";break;case 48:t+="0";break;default:t+=String.fromCharCode(r)}return t}function Kv(e,t){var r=Math.pow(10,t);return""+Math.round(e*r)/r}function qv(e,t){var r=e-Math.floor(e),i=Math.pow(10,t);return t<(""+Math.round(r*i)).length?0:Math.round(r*i)}function Mi(e,t,r){if(40===e.charCodeAt(0)&&!t.match($v)){var i=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?Mi("n",i,r):"("+Mi("n",i,-r)+")"}if(44===t.charCodeAt(t.length-1))return function QI(e,t,r){for(var i=t.length-1;44===t.charCodeAt(i-1);)--i;return Ps(e,t.substr(0,i),r/Math.pow(10,3*(t.length-i)))}(e,t,r);if(-1!==t.indexOf("%"))return function YI(e,t,r){var i=t.replace(Vv,""),s=t.length-i.length;return Ps(e,i,r*Math.pow(10,2*s))+Zt("%",s)}(e,t,r);if(-1!==t.indexOf("E"))return zv(t,r);if(36===t.charCodeAt(0))return"$"+Mi(e,t.substr(" "==t.charAt(1)?2:1),r);var s,n,o,a,l=Math.abs(r),c=r<0?"-":"";if(t.match(/^00+$/))return c+Vo(l,t.length);if(t.match(/^[#?]+$/))return"0"===(s=Vo(r,0))&&(s=""),s.length>t.length?s:Zr(t.substr(0,t.length-s.length))+s;if(n=t.match(Wv))return function JI(e,t,r){var i=parseInt(e[4],10),s=Math.round(t*i),n=Math.floor(s/i),o=s-n*i,a=i;return r+(0===n?"":""+n)+" "+(0===o?Zt(" ",e[1].length+1+e[4].length):Hh(o,e[1].length)+e[2]+"/"+e[3]+Ki(a,e[4].length))}(n,l,c);if(t.match(/^#+0+$/))return c+Vo(l,t.length-t.indexOf("0"));if(n=t.match(Uv))return s=Kv(r,n[1].length).replace(/^([^\.]+)$/,"$1."+Zr(n[1])).replace(/\.$/,"."+Zr(n[1])).replace(/\.(\d*)$/,function(p,g){return"."+g+Zt("0",Zr(n[1]).length-g.length)}),-1!==t.indexOf("0.")?s:s.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),n=t.match(/^(0*)\.(#*)$/))return c+Kv(l,n[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,n[1].length?"0.":".");if(n=t.match(/^#{1,3},##0(\.?)$/))return c+dn(Vo(l,0));if(n=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+Mi(e,t,-r):dn(""+(Math.floor(r)+function e_(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}(r,n[1].length)))+"."+Ki(qv(r,n[1].length),n[1].length);if(n=t.match(/^#,#*,#0/))return Mi(e,t.replace(/^#,#*,/,""),r);if(n=t.match(/^([0#]+)(\\?-([0#]+))+$/))return s=Go(Mi(e,t.replace(/[\\-]/g,""),r)),o=0,Go(Go(t.replace(/\\/g,"")).replace(/[0#]/g,function(p){return o<s.length?s.charAt(o++):"0"===p?"0":""}));if(t.match(jv))return"("+(s=Mi(e,"##########",r)).substr(0,3)+") "+s.substr(3,3)+"-"+s.substr(6);var d="";if(n=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(n[4].length,7),a=Oc(l,Math.pow(10,o)-1,!1),s=""+c," "==(d=Ps("n",n[1],a[1])).charAt(d.length-1)&&(d=d.substr(0,d.length-1)+"0"),s+=d+n[2]+"/"+n[3],(d=_c(a[2],o)).length<n[4].length&&(d=Zr(n[4].substr(n[4].length-d.length))+d),s+=d;if(n=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(Math.max(n[1].length,n[4].length),7),c+((a=Oc(l,Math.pow(10,o)-1,!0))[0]||(a[1]?"":"0"))+" "+(a[1]?Hh(a[1],o)+n[2]+"/"+n[3]+_c(a[2],o):Zt(" ",2*o+1+n[2].length+n[3].length));if(n=t.match(/^[#0?]+$/))return s=Vo(r,0),t.length<=s.length?s:Zr(t.substr(0,t.length-s.length))+s;if(n=t.match(/^([#0?]+)\.([#0]+)$/)){s=""+r.toFixed(Math.min(n[2].length,10)).replace(/([^0])0+$/,"$1"),o=s.indexOf(".");var u=t.indexOf(".")-o,h=t.length-s.length-u;return Zr(t.substr(0,u)+s+t.substr(t.length-h))}if(n=t.match(/^00,000\.([#0]*0)$/))return o=qv(r,n[1].length),r<0?"-"+Mi(e,t,-r):dn(function t_(e){return e<2147483647&&e>-2147483648?""+(e>=0?0|e:e-1|0):""+Math.floor(e)}(r)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(p){return"00,"+(p.length<3?Ki(0,3-p.length):"")+p})+"."+Ki(o,n[1].length);switch(t){case"###,##0.00":return Mi(e,"#,##0.00",r);case"###,###":case"##,###":case"#,###":var f=dn(Vo(l,0));return"0"!==f?c+f:"";case"###,###.00":return Mi(e,"###,##0.00",r).replace(/^0\./,".");case"#,###.00":return Mi(e,"#,##0.00",r).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function Xv(e,t){var r,i=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(0==t)return"0.0E+0";if(t<0)return"-"+Xv(e,-t);var s=e.indexOf(".");-1===s&&(s=e.indexOf("E"));var n=Math.floor(Math.log(t)*Math.LOG10E)%s;if(n<0&&(n+=s),!(r=(t/Math.pow(10,n)).toPrecision(i+1+(s+n)%s)).match(/[Ee]/)){var o=Math.floor(Math.log(t)*Math.LOG10E);-1===r.indexOf(".")?r=r.charAt(0)+"."+r.substr(1)+"E+"+(o-r.length+n):r+="E+"+(o-n),r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(a,l,c,d){return l+c+d.substr(0,(s+n)%s)+"."+d.substr(n)+"E"})}else r=t.toExponential(i);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}function ls(e,t,r){if(40===e.charCodeAt(0)&&!t.match($v)){var i=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?ls("n",i,r):"("+ls("n",i,-r)+")"}if(44===t.charCodeAt(t.length-1))return function r_(e,t,r){for(var i=t.length-1;44===t.charCodeAt(i-1);)--i;return Ps(e,t.substr(0,i),r/Math.pow(10,3*(t.length-i)))}(e,t,r);if(-1!==t.indexOf("%"))return function i_(e,t,r){var i=t.replace(Vv,""),s=t.length-i.length;return Ps(e,i,r*Math.pow(10,2*s))+Zt("%",s)}(e,t,r);if(-1!==t.indexOf("E"))return Xv(t,r);if(36===t.charCodeAt(0))return"$"+ls(e,t.substr(" "==t.charAt(1)?2:1),r);var s,n,o,a,l=Math.abs(r),c=r<0?"-":"";if(t.match(/^00+$/))return c+Ki(l,t.length);if(t.match(/^[#?]+$/))return s=""+r,0===r&&(s=""),s.length>t.length?s:Zr(t.substr(0,t.length-s.length))+s;if(n=t.match(Wv))return function ZI(e,t,r){return r+(0===t?"":""+t)+Zt(" ",e[1].length+2+e[4].length)}(n,l,c);if(t.match(/^#+0+$/))return c+Ki(l,t.length-t.indexOf("0"));if(n=t.match(Uv))return s=(s=(""+r).replace(/^([^\.]+)$/,"$1."+Zr(n[1])).replace(/\.$/,"."+Zr(n[1]))).replace(/\.(\d*)$/,function(p,g){return"."+g+Zt("0",Zr(n[1]).length-g.length)}),-1!==t.indexOf("0.")?s:s.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),n=t.match(/^(0*)\.(#*)$/))return c+(""+l).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,n[1].length?"0.":".");if(n=t.match(/^#{1,3},##0(\.?)$/))return c+dn(""+l);if(n=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+ls(e,t,-r):dn(""+r)+"."+Zt("0",n[1].length);if(n=t.match(/^#,#*,#0/))return ls(e,t.replace(/^#,#*,/,""),r);if(n=t.match(/^([0#]+)(\\?-([0#]+))+$/))return s=Go(ls(e,t.replace(/[\\-]/g,""),r)),o=0,Go(Go(t.replace(/\\/g,"")).replace(/[0#]/g,function(p){return o<s.length?s.charAt(o++):"0"===p?"0":""}));if(t.match(jv))return"("+(s=ls(e,"##########",r)).substr(0,3)+") "+s.substr(3,3)+"-"+s.substr(6);var d="";if(n=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(n[4].length,7),a=Oc(l,Math.pow(10,o)-1,!1),s=""+c," "==(d=Ps("n",n[1],a[1])).charAt(d.length-1)&&(d=d.substr(0,d.length-1)+"0"),s+=d+n[2]+"/"+n[3],(d=_c(a[2],o)).length<n[4].length&&(d=Zr(n[4].substr(n[4].length-d.length))+d),s+=d;if(n=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(Math.max(n[1].length,n[4].length),7),c+((a=Oc(l,Math.pow(10,o)-1,!0))[0]||(a[1]?"":"0"))+" "+(a[1]?Hh(a[1],o)+n[2]+"/"+n[3]+_c(a[2],o):Zt(" ",2*o+1+n[2].length+n[3].length));if(n=t.match(/^[#0?]+$/))return t.length<=(s=""+r).length?s:Zr(t.substr(0,t.length-s.length))+s;if(n=t.match(/^([#0]+)\.([#0]+)$/)){s=""+r.toFixed(Math.min(n[2].length,10)).replace(/([^0])0+$/,"$1"),o=s.indexOf(".");var u=t.indexOf(".")-o,h=t.length-s.length-u;return Zr(t.substr(0,u)+s+t.substr(t.length-h))}if(n=t.match(/^00,000\.([#0]*0)$/))return r<0?"-"+ls(e,t,-r):dn(""+r).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(p){return"00,"+(p.length<3?Ki(0,3-p.length):"")+p})+"."+Ki(0,n[1].length);switch(t){case"###,###":case"##,###":case"#,###":var f=dn(""+l);return"0"!==f?c+f:"";default:if(t.match(/\.[0#?]*$/))return ls(e,t.slice(0,t.lastIndexOf(".")),r)+Zr(t.slice(t.lastIndexOf(".")))}throw new Error("unsupported format |"+t+"|")}function Ps(e,t,r){return(0|r)===r?ls(e,t,r):Mi(e,t,r)}var Yv=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function Wn(e){for(var t=0,r="",i="";t<e.length;)switch(r=e.charAt(t)){case"G":Lc(e,t)&&(t+=6),t++;break;case'"':for(;34!==e.charCodeAt(++t)&&t<e.length;);++t;break;case"\\":case"_":t+=2;break;case"@":++t;break;case"B":case"b":if("1"===e.charAt(t+1)||"2"===e.charAt(t+1))return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"\u4e0a":if("A/P"===e.substr(t,3).toUpperCase()||"AM/PM"===e.substr(t,5).toUpperCase()||"\u4e0a\u5348/\u4e0b\u5348"===e.substr(t,5).toUpperCase())return!0;++t;break;case"[":for(i=r;"]"!==e.charAt(t++)&&t<e.length;)i+=e.charAt(t);if(i.match(Yv))return!0;break;case".":case"0":case"#":for(;t<e.length&&("0#?.,E+-%".indexOf(r=e.charAt(++t))>-1||"\\"==r&&"-"==e.charAt(t+1)&&"0#".indexOf(e.charAt(t+2))>-1););break;case"?":for(;e.charAt(++t)===r;);break;case"*":++t,(" "==e.charAt(t)||"*"==e.charAt(t))&&++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t<e.length&&"0123456789".indexOf(e.charAt(++t))>-1;);break;default:++t}return!1}var Qv=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function Jv(e,t){if(null==t)return!1;var r=parseFloat(t[2]);switch(t[1]){case"=":if(e==r)return!0;break;case">":if(e>r)return!0;break;case"<":if(e<r)return!0;break;case"<>":if(e!=r)return!0;break;case">=":if(e>=r)return!0;break;case"<=":if(e<=r)return!0}return!1}function xi(e,t,r){null==r&&(r={});var i="";switch(typeof e){case"string":i="m/d/yy"==e&&r.dateNF?r.dateNF:e;break;case"number":null==(i=14==e&&r.dateNF?r.dateNF:(null!=r.table?r.table:Be)[e])&&(i=r.table&&r.table[Nv[e]]||Be[Nv[e]]),null==i&&(i=zI[e]||"General")}if(Lc(i,0))return zn(t,r);t instanceof Date&&(t=Gv(t,r.date1904));var s=function o_(e,t){var r=function s_(e){for(var t=[],r=!1,i=0,s=0;i<e.length;++i)switch(e.charCodeAt(i)){case 34:r=!r;break;case 95:case 42:case 92:++i;break;case 59:t[t.length]=e.substr(s,i-s),s=i+1}if(t[t.length]=e.substr(s),!0===r)throw new Error("Format |"+e+"| unterminated string ");return t}(e),i=r.length,s=r[i-1].indexOf("@");if(i<4&&s>-1&&--i,r.length>4)throw new Error("cannot find right format for |"+r.join("|")+"|");if("number"!=typeof t)return[4,4===r.length||s>-1?r[r.length-1]:"@"];switch(r.length){case 1:r=s>-1?["General","General","General",r[0]]:[r[0],r[0],r[0],"@"];break;case 2:r=s>-1?[r[0],r[0],r[0],r[1]]:[r[0],r[1],r[0],"@"];break;case 3:r=s>-1?[r[0],r[1],r[0],r[2]]:[r[0],r[1],r[2],"@"]}var n=t>0?r[0]:t<0?r[1]:r[2];if(-1===r[0].indexOf("[")&&-1===r[1].indexOf("["))return[i,n];if(null!=r[0].match(/\[[=<>]/)||null!=r[1].match(/\[[=<>]/)){var o=r[0].match(Qv),a=r[1].match(Qv);return Jv(t,o)?[i,r[0]]:Jv(t,a)?[i,r[1]]:[i,r[null!=o&&null!=a?2:1]]}return[i,n]}(i,t);if(Lc(s[1]))return zn(t,r);if(!0===t)t="TRUE";else if(!1===t)t="FALSE";else if(""===t||null==t)return"";return function n_(e,t,r,i){for(var c,d,u,s=[],n="",o=0,a="",l="t",h="H";o<e.length;)switch(a=e.charAt(o)){case"G":if(!Lc(e,o))throw new Error("unrecognized character "+a+" in "+e);s[s.length]={t:"G",v:"General"},o+=7;break;case'"':for(n="";34!==(u=e.charCodeAt(++o))&&o<e.length;)n+=String.fromCharCode(u);s[s.length]={t:"t",v:n},++o;break;case"\\":var f=e.charAt(++o);s[s.length]={t:"("===f||")"===f?f:"t",v:f},++o;break;case"_":s[s.length]={t:"t",v:" "},o+=2;break;case"@":s[s.length]={t:"T",v:t},++o;break;case"B":case"b":if("1"===e.charAt(o+1)||"2"===e.charAt(o+1)){if(null==c&&null==(c=cn(t,r,"2"===e.charAt(o+1))))return"";s[s.length]={t:"X",v:e.substr(o,2)},l=a,o+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":a=a.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(t<0||null==c&&null==(c=cn(t,r)))return"";for(n=a;++o<e.length&&e.charAt(o).toLowerCase()===a;)n+=a;"m"===a&&"h"===l.toLowerCase()&&(a="M"),"h"===a&&(a=h),s[s.length]={t:a,v:n},l=a;break;case"A":case"a":case"\u4e0a":var g={t:a,v:a};if(null==c&&(c=cn(t,r)),"A/P"===e.substr(o,3).toUpperCase()?(null!=c&&(g.v=c.H>=12?"P":"A"),g.t="T",h="h",o+=3):"AM/PM"===e.substr(o,5).toUpperCase()?(null!=c&&(g.v=c.H>=12?"PM":"AM"),g.t="T",o+=5,h="h"):"\u4e0a\u5348/\u4e0b\u5348"===e.substr(o,5).toUpperCase()?(null!=c&&(g.v=c.H>=12?"\u4e0b\u5348":"\u4e0a\u5348"),g.t="T",o+=5,h="h"):(g.t="t",++o),null==c&&"T"===g.t)return"";s[s.length]=g,l=a;break;case"[":for(n=a;"]"!==e.charAt(o++)&&o<e.length;)n+=e.charAt(o);if("]"!==n.slice(-1))throw'unterminated "[" block: |'+n+"|";if(n.match(Yv)){if(null==c&&null==(c=cn(t,r)))return"";s[s.length]={t:"Z",v:n.toLowerCase()},l=n.charAt(1)}else n.indexOf("$")>-1&&(n=(n.match(/\$([^-\[\]]*)/)||[])[1]||"$",Wn(e)||(s[s.length]={t:"t",v:n}));break;case".":if(null!=c){for(n=a;++o<e.length&&"0"===(a=e.charAt(o));)n+=a;s[s.length]={t:"s",v:n};break}case"0":case"#":for(n=a;++o<e.length&&"0#?.,E+-%".indexOf(a=e.charAt(o))>-1;)n+=a;s[s.length]={t:"n",v:n};break;case"?":for(n=a;e.charAt(++o)===a;)n+=a;s[s.length]={t:a,v:n},l=a;break;case"*":++o,(" "==e.charAt(o)||"*"==e.charAt(o))&&++o;break;case"(":case")":s[s.length]={t:1===i?"t":a,v:a},++o;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(n=a;o<e.length&&"0123456789".indexOf(e.charAt(++o))>-1;)n+=e.charAt(o);s[s.length]={t:"D",v:n};break;case" ":s[s.length]={t:a,v:a},++o;break;case"$":s[s.length]={t:"t",v:"$"},++o;break;default:if(-1===",$-+/():!^&'~{}<>=\u20acacfijklopqrtuvwxzP".indexOf(a))throw new Error("unrecognized character "+a+" in "+e);s[s.length]={t:"t",v:a},++o}var w,m=0,v=0;for(o=s.length-1,l="t";o>=0;--o)switch(s[o].t){case"h":case"H":s[o].t=h,l="h",m<1&&(m=1);break;case"s":(w=s[o].v.match(/\.0+$/))&&(v=Math.max(v,w[0].length-1)),m<3&&(m=3);case"d":case"y":case"M":case"e":l=s[o].t;break;case"m":"s"===l&&(s[o].t="M",m<2&&(m=2));break;case"X":break;case"Z":m<1&&s[o].v.match(/[Hh]/)&&(m=1),m<2&&s[o].v.match(/[Mm]/)&&(m=2),m<3&&s[o].v.match(/[Ss]/)&&(m=3)}switch(m){case 0:break;case 1:c.u>=.5&&(c.u=0,++c.S),c.S>=60&&(c.S=0,++c.M),c.M>=60&&(c.M=0,++c.H);break;case 2:c.u>=.5&&(c.u=0,++c.S),c.S>=60&&(c.S=0,++c.M)}var y,C="";for(o=0;o<s.length;++o)switch(s[o].t){case"t":case"T":case" ":case"D":break;case"X":s[o].v="",s[o].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":s[o].v=XI(s[o].t.charCodeAt(0),s[o].v,c,v),s[o].t="t";break;case"n":case"?":for(y=o+1;null!=s[y]&&("?"===(a=s[y].t)||"D"===a||(" "===a||"t"===a)&&null!=s[y+1]&&("?"===s[y+1].t||"t"===s[y+1].t&&"/"===s[y+1].v)||"("===s[o].t&&(" "===a||"n"===a||")"===a)||"t"===a&&("/"===s[y].v||" "===s[y].v&&null!=s[y+1]&&"?"==s[y+1].t));)s[o].v+=s[y].v,s[y]={v:"",t:";"},++y;C+=s[o].v,o=y-1;break;case"G":s[o].t="t",s[o].v=zn(t,r)}var E,S,k="";if(C.length>0){40==C.charCodeAt(0)?(E=t<0&&45===C.charCodeAt(0)?-t:t,S=Ps("n",C,E)):(S=Ps("n",C,E=t<0&&i>1?-t:t),E<0&&s[0]&&"t"==s[0].t&&(S=S.substr(1),s[0].v="-"+s[0].v)),y=S.length-1;var _=s.length;for(o=0;o<s.length;++o)if(null!=s[o]&&"t"!=s[o].t&&s[o].v.indexOf(".")>-1){_=o;break}var M=s.length;if(_===s.length&&-1===S.indexOf("E")){for(o=s.length-1;o>=0;--o)null==s[o]||-1==="n?".indexOf(s[o].t)||(y>=s[o].v.length-1?s[o].v=S.substr(1+(y-=s[o].v.length),s[o].v.length):y<0?s[o].v="":(s[o].v=S.substr(0,y+1),y=-1),s[o].t="t",M=o);y>=0&&M<s.length&&(s[M].v=S.substr(0,y+1)+s[M].v)}else if(_!==s.length&&-1===S.indexOf("E")){for(y=S.indexOf(".")-1,o=_;o>=0;--o)if(null!=s[o]&&-1!=="n?".indexOf(s[o].t)){for(d=s[o].v.indexOf(".")>-1&&o===_?s[o].v.indexOf(".")-1:s[o].v.length-1,k=s[o].v.substr(d+1);d>=0;--d)y>=0&&("0"===s[o].v.charAt(d)||"#"===s[o].v.charAt(d))&&(k=S.charAt(y--)+k);s[o].v=k,s[o].t="t",M=o}for(y>=0&&M<s.length&&(s[M].v=S.substr(0,y+1)+s[M].v),y=S.indexOf(".")+1,o=_;o<s.length;++o)if(null!=s[o]&&(-1!=="n?(".indexOf(s[o].t)||o===_)){for(d=s[o].v.indexOf(".")>-1&&o===_?s[o].v.indexOf(".")+1:0,k=s[o].v.substr(0,d);d<s[o].v.length;++d)y<S.length&&(k+=S.charAt(y++));s[o].v=k,s[o].t="t",M=o}}}for(o=0;o<s.length;++o)null!=s[o]&&"n?".indexOf(s[o].t)>-1&&(s[o].v=Ps(s[o].t,s[o].v,E=i>1&&t<0&&o>0&&"-"===s[o-1].v?-t:t),s[o].t="t");var H="";for(o=0;o!==s.length;++o)null!=s[o]&&(H+=s[o].v);return H}(s[1],t,r,s[0])}function cs(e,t){if("number"!=typeof t){t=+t||-1;for(var r=0;r<392;++r)if(null!=Be[r]){if(Be[r]==e){t=r;break}}else t<0&&(t=r);t<0&&(t=391)}return Be[t]=e,t}function zo(){Be=function VI(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"\u4e0a\u5348/\u4e0b\u5348 "hh"\u6642"mm"\u5206"ss"\u79d2 "',e}()}var l_={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},Zv=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g,u_=function(){var e={version:"1.2.0"},r=function t(){for(var S=0,_=new Array(256),M=0;256!=M;++M)_[M]=S=1&(S=1&(S=1&(S=1&(S=1&(S=1&(S=1&(S=1&(S=M)?-306674912^S>>>1:S>>>1)?-306674912^S>>>1:S>>>1)?-306674912^S>>>1:S>>>1)?-306674912^S>>>1:S>>>1)?-306674912^S>>>1:S>>>1)?-306674912^S>>>1:S>>>1)?-306674912^S>>>1:S>>>1)?-306674912^S>>>1:S>>>1;return typeof Int32Array<"u"?new Int32Array(_):_}(),s=function i(S){var _=0,M=0,H=0,V=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(H=0;256!=H;++H)V[H]=S[H];for(H=0;256!=H;++H)for(M=S[H],_=256+H;_<4096;_+=256)M=V[_]=M>>>8^S[255&M];var B=[];for(H=1;16!=H;++H)B[H-1]=typeof Int32Array<"u"?V.subarray(256*H,256*H+256):V.slice(256*H,256*H+256);return B}(r),n=s[0],o=s[1],a=s[2],l=s[3],c=s[4],d=s[5],u=s[6],h=s[7],f=s[8],p=s[9],g=s[10],m=s[11],v=s[12],w=s[13],C=s[14];return e.table=r,e.bstr=function y(S,_){for(var M=-1^_,H=0,V=S.length;H<V;)M=M>>>8^r[255&(M^S.charCodeAt(H++))];return~M},e.buf=function k(S,_){for(var M=-1^_,H=S.length-15,V=0;V<H;)M=C[S[V++]^255&M]^w[S[V++]^M>>8&255]^v[S[V++]^M>>16&255]^m[S[V++]^M>>>24]^g[S[V++]]^p[S[V++]]^f[S[V++]]^h[S[V++]]^u[S[V++]]^d[S[V++]]^c[S[V++]]^l[S[V++]]^a[S[V++]]^o[S[V++]]^n[S[V++]]^r[S[V++]];for(H+=15;V<H;)M=M>>>8^r[255&(M^S[V++])];return~M},e.str=function E(S,_){for(var M=-1^_,H=0,V=S.length,B=0,re=0;H<V;)(B=S.charCodeAt(H++))<128?M=M>>>8^r[255&(M^B)]:B<2048?M=(M=M>>>8^r[255&(M^(192|B>>6&31))])>>>8^r[255&(M^(128|63&B))]:B>=55296&&B<57344?(B=64+(1023&B),re=1023&S.charCodeAt(H++),M=(M=(M=(M=M>>>8^r[255&(M^(240|B>>8&7))])>>>8^r[255&(M^(128|B>>2&63))])>>>8^r[255&(M^(128|re>>6&15|(3&B)<<4))])>>>8^r[255&(M^(128|63&re))]):M=(M=(M=M>>>8^r[255&(M^(224|B>>12&15))])>>>8^r[255&(M^(128|B>>6&63))])>>>8^r[255&(M^(128|63&B))];return~M},e}(),Le=function(){var l,t={};function i(x){if("/"==x.charAt(x.length-1))return-1===x.slice(0,-1).indexOf("/")?x:i(x.slice(0,-1));var R=x.lastIndexOf("/");return-1===R?x:x.slice(0,R+1)}function s(x){if("/"==x.charAt(x.length-1))return s(x.slice(0,-1));var R=x.lastIndexOf("/");return-1===R?x:x.slice(R+1)}function n(x,R){"string"==typeof R&&(R=new Date(R));var b=R.getHours();b=(b=b<<6|R.getMinutes())<<5|R.getSeconds()>>>1,x.write_shift(2,b);var F=R.getFullYear()-1980;F=(F=F<<4|R.getMonth()+1)<<5|R.getDate(),x.write_shift(2,F)}function a(x){Mr(x,0);for(var R={},b=0;x.l<=x.length-4;){var F=x.read_shift(2),T=x.read_shift(2),P=x.l+T,K={};21589===F&&(1&(b=x.read_shift(1))&&(K.mtime=x.read_shift(4)),T>5&&(2&b&&(K.atime=x.read_shift(4)),4&b&&(K.ctime=x.read_shift(4))),K.mtime&&(K.mt=new Date(1e3*K.mtime))),x.l=P,R[F]=K}return R}function c(){return l||(l={})}function d(x,R){if(80==x[0]&&75==x[1])return sx(x,R);if(109==(32|x[0])&&105==(32|x[1]))return function KV(x,R){if("mime-version:"!=we(x.slice(0,13)).toLowerCase())throw new Error("Unsupported MAD header");var b=R&&R.root||"",F=(tt&&Buffer.isBuffer(x)?x.toString("binary"):we(x)).split("\r\n"),T=0,P="";for(T=0;T<F.length;++T)if(/^Content-Location:/i.test(P=F[T])&&(P=P.slice(P.indexOf("file")),b||(b=P.slice(0,P.lastIndexOf("/")+1)),P.slice(0,b.length)!=b))for(;b.length>0&&(b=(b=b.slice(0,b.length-1)).slice(0,b.lastIndexOf("/")+1),P.slice(0,b.length)!=b););var K=(F[1]||"").match(/boundary="(.*?)"/);if(!K)throw new Error("MAD cannot find boundary");var Z="--"+(K[1]||""),Y={FileIndex:[],FullPaths:[]};S(Y);var ae,ve=0;for(T=0;T<F.length;++T){var Pe=F[T];Pe!==Z&&Pe!==Z+"--"||(ve++&&jV(Y,F.slice(ae,T),b),ae=T)}return Y}(x,R);if(x.length<512)throw new Error("CFB file size "+x.length+" < 512");var b,T,P,K,Z,X,F=512,q=[],Y=x.slice(0,512);Mr(Y,0);var ae=function u(x){if(80==x[x.l]&&75==x[x.l+1])return[0,0];x.chk(ue,"Header Signature: "),x.l+=16;var R=x.read_shift(2,"u");return[x.read_shift(2,"u"),R]}(Y);switch(b=ae[0]){case 3:F=512;break;case 4:F=4096;break;case 0:if(0==ae[1])return sx(x,R);default:throw new Error("Major Version: Expected 3 or 4 saw "+b)}512!==F&&Mr(Y=x.slice(0,F),28);var ve=x.slice(0,F);!function h(x,R){var b;switch(x.l+=2,b=x.read_shift(2)){case 9:if(3!=R)throw new Error("Sector Shift: Expected 9 saw "+b);break;case 12:if(4!=R)throw new Error("Sector Shift: Expected 12 saw "+b);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+b)}x.chk("0600","Mini Sector Shift: "),x.chk("000000000000","Reserved: ")}(Y,b);var Pe=Y.read_shift(4,"i");if(3===b&&0!==Pe)throw new Error("# Directory Sectors: Expected 0 saw "+Pe);Y.l+=4,K=Y.read_shift(4,"i"),Y.l+=4,Y.chk("00100000","Mini Stream Cutoff Size: "),Z=Y.read_shift(4,"i"),T=Y.read_shift(4,"i"),X=Y.read_shift(4,"i"),P=Y.read_shift(4,"i");for(var Ce=-1,ye=0;ye<109&&!((Ce=Y.read_shift(4,"i"))<0);++ye)q[ye]=Ce;var je=function f(x,R){for(var b=Math.ceil(x.length/R)-1,F=[],T=1;T<b;++T)F[T-1]=x.slice(T*R,(T+1)*R);return F[b-1]=x.slice(b*R),F}(x,F);m(X,P,je,F,q);var Ot=function w(x,R,b,F){var T=x.length,P=[],K=[],Z=[],X=[],q=F-1,Y=0,ae=0,ve=0,Pe=0;for(Y=0;Y<T;++Y)if(Z=[],(ve=Y+R)>=T&&(ve-=T),!K[ve]){X=[];var Ce=[];for(ae=ve;ae>=0;){Ce[ae]=!0,K[ae]=!0,Z[Z.length]=ae,X.push(x[ae]);var ye=b[Math.floor(4*ae/F)];if(F<4+(Pe=4*ae&q))throw new Error("FAT boundary crossed: "+ae+" 4 "+F);if(!x[ye]||Ce[ae=$n(x[ye],Pe)])break}P[ve]={nodes:Z,data:bC([X])}}return P}(je,K,q,F);Ot[K].name="!Directory",T>0&&Z!==re&&(Ot[Z].name="!MiniFAT"),Ot[q[0]].name="!FAT",Ot.fat_addrs=q,Ot.ssz=F;var gr=[],Fi=[],bl=[];(function C(x,R,b,F,T,P,K,Z){for(var Pe,X=0,q=F.length?2:0,Y=R[x].data,ae=0,ve=0;ae<Y.length;ae+=128){var Ce=Y.slice(ae,ae+128);Mr(Ce,64),ve=Ce.read_shift(2),Pe=zc(Ce,0,ve-q),F.push(Pe);var ye={name:Pe,type:Ce.read_shift(1),color:Ce.read_shift(1),L:Ce.read_shift(4,"i"),R:Ce.read_shift(4,"i"),C:Ce.read_shift(4,"i"),clsid:Ce.read_shift(16),state:Ce.read_shift(4,"i"),start:0,size:0};0!==Ce.read_shift(2)+Ce.read_shift(2)+Ce.read_shift(2)+Ce.read_shift(2)&&(ye.ct=y(Ce,Ce.l-8)),0!==Ce.read_shift(2)+Ce.read_shift(2)+Ce.read_shift(2)+Ce.read_shift(2)&&(ye.mt=y(Ce,Ce.l-8)),ye.start=Ce.read_shift(4,"i"),ye.size=Ce.read_shift(4,"i"),ye.size<0&&ye.start<0&&(ye.size=ye.type=0,ye.start=re,ye.name=""),5===ye.type?(X=ye.start,T>0&&X!==re&&(R[X].name="!StreamData")):ye.size>=4096?(ye.storage="fat",void 0===R[ye.start]&&(R[ye.start]=v(b,ye.start,R.fat_addrs,R.ssz)),R[ye.start].name=ye.name,ye.content=R[ye.start].data.slice(0,ye.size)):(ye.storage="minifat",ye.size<0?ye.size=0:X!==re&&ye.start!==re&&R[X]&&(ye.content=g(ye,R[X].data,(R[Z]||{}).data))),ye.content&&Mr(ye.content,0),P[Pe]=ye,K.push(ye)}})(K,Ot,je,gr,T,{},Fi,Z),function p(x,R,b){for(var F=0,T=0,P=0,K=0,Z=0,X=b.length,q=[],Y=[];F<X;++F)q[F]=Y[F]=F,R[F]=b[F];for(;Z<Y.length;++Z)T=x[F=Y[Z]].L,P=x[F].R,K=x[F].C,q[F]===F&&(-1!==T&&q[T]!==T&&(q[F]=q[T]),-1!==P&&q[P]!==P&&(q[F]=q[P])),-1!==K&&(q[K]=F),-1!==T&&F!=q[F]&&(q[T]=q[F],Y.lastIndexOf(T)<Z&&Y.push(T)),-1!==P&&F!=q[F]&&(q[P]=q[F],Y.lastIndexOf(P)<Z&&Y.push(P));for(F=1;F<X;++F)q[F]===F&&(-1!==P&&q[P]!==P?q[F]=q[P]:-1!==T&&q[T]!==T&&(q[F]=q[T]));for(F=1;F<X;++F)if(0!==x[F].type){if((Z=F)!=q[Z])do{R[F]=R[Z=q[Z]]+"/"+R[F]}while(0!==Z&&-1!==q[Z]&&Z!=q[Z]);q[F]=-1}for(R[0]+="/",F=1;F<X;++F)2!==x[F].type&&(R[F]+="/")}(Fi,bl,gr),gr.shift();var yl={FileIndex:Fi,FullPaths:bl};return R&&R.raw&&(yl.raw={header:ve,sectors:je}),yl}function g(x,R,b){for(var T=x.size,P=[],K=x.start;b&&T>0&&K>=0;)P.push(R.slice(K*B,K*B+B)),T-=B,K=$n(b,4*K);return 0===P.length?J(0):br(P).slice(0,x.size)}function m(x,R,b,F,T){var P=re;if(x===re){if(0!==R)throw new Error("DIFAT chain shorter than expected")}else if(-1!==x){var K=b[x],Z=(F>>>2)-1;if(!K)return;for(var X=0;X<Z&&(P=$n(K,4*X))!==re;++X)T.push(P);m($n(K,F-4),R-1,b,F,T)}}function v(x,R,b,F,T){var P=[],K=[];T||(T=[]);var Z=F-1,X=0,q=0;for(X=R;X>=0;){T[X]=!0,P[P.length]=X,K.push(x[X]);var Y=b[Math.floor(4*X/F)];if(F<4+(q=4*X&Z))throw new Error("FAT boundary crossed: "+X+" 4 "+F);if(!x[Y])break;X=$n(x[Y],q)}return{nodes:P,data:bC([K])}}function y(x,R){return new Date(1e3*(yr(x,R+4)/1e7*Math.pow(2,32)+yr(x,R)/1e7-11644473600))}function S(x,R){var b=R||{},F=b.root||"Root Entry";if(x.FullPaths||(x.FullPaths=[]),x.FileIndex||(x.FileIndex=[]),x.FullPaths.length!==x.FileIndex.length)throw new Error("inconsistent CFB structure");0===x.FullPaths.length&&(x.FullPaths[0]=F+"/",x.FileIndex[0]={name:F,type:5}),b.CLSID&&(x.FileIndex[0].clsid=b.CLSID),function _(x){var R="\x01Sh33tJ5";if(!Le.find(x,"/"+R)){var b=J(4);b[0]=55,b[1]=b[3]=50,b[2]=54,x.FileIndex.push({name:R,type:2,content:b,size:4,L:69,R:69,C:69}),x.FullPaths.push(x.FullPaths[0]+R),M(x)}}(x)}function M(x,R){S(x);for(var b=!1,F=!1,T=x.FullPaths.length-1;T>=0;--T){var P=x.FileIndex[T];switch(P.type){case 0:F?b=!0:(x.FileIndex.pop(),x.FullPaths.pop());break;case 1:case 2:case 5:F=!0,isNaN(P.R*P.L*P.C)&&(b=!0),P.R>-1&&P.L>-1&&P.R==P.L&&(b=!0);break;default:b=!0}}if(b||R){var K=new Date(1987,1,19),Z=0,X=Object.create?Object.create(null):{},q=[];for(T=0;T<x.FullPaths.length;++T)X[x.FullPaths[T]]=!0,0!==x.FileIndex[T].type&&q.push([x.FullPaths[T],x.FileIndex[T]]);for(T=0;T<q.length;++T){var Y=i(q[T][0]);(F=X[Y])||(q.push([Y,{name:s(Y).replace("/",""),type:1,clsid:Ae,ct:K,mt:K,content:null}]),X[Y]=!0)}for(q.sort(function(Pe,Ce){return function r(x,R){for(var b=x.split("/"),F=R.split("/"),T=0,P=0,K=Math.min(b.length,F.length);T<K;++T){if(P=b[T].length-F[T].length)return P;if(b[T]!=F[T])return b[T]<F[T]?-1:1}return b.length-F.length}(Pe[0],Ce[0])}),x.FullPaths=[],x.FileIndex=[],T=0;T<q.length;++T)x.FullPaths[T]=q[T][0],x.FileIndex[T]=q[T][1];for(T=0;T<q.length;++T){var ae=x.FileIndex[T],ve=x.FullPaths[T];if(ae.name=s(ve).replace("/",""),ae.L=ae.R=ae.C=-(ae.color=1),ae.size=ae.content?ae.content.length:0,ae.start=0,ae.clsid=ae.clsid||Ae,0===T)ae.C=q.length>1?1:-1,ae.size=0,ae.type=5;else if("/"==ve.slice(-1)){for(Z=T+1;Z<q.length&&i(x.FullPaths[Z])!=ve;++Z);for(ae.C=Z>=q.length?-1:Z,Z=T+1;Z<q.length&&i(x.FullPaths[Z])!=i(ve);++Z);ae.R=Z>=q.length?-1:Z,ae.type=1}else i(x.FullPaths[T+1]||"")==i(ve)&&(ae.R=T+1),ae.type=2}}}function H(x,R){var b=R||{};if("mad"==b.fileType)return function qV(x,R){for(var b=R||{},F=b.boundary||"SheetJS",T=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+(F="------="+F).slice(2)+'"',"","",""],P=x.FullPaths[0],K=P,Z=x.FileIndex[0],X=1;X<x.FullPaths.length;++X)if(K=x.FullPaths[X].slice(P.length),(Z=x.FileIndex[X]).size&&Z.content&&"\x01Sh33tJ5"!=K){K=K.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g,function(je){return"_x"+je.charCodeAt(0).toString(16)+"_"}).replace(/[\u0080-\uFFFF]/g,function(je){return"_u"+je.charCodeAt(0).toString(16)+"_"});for(var q=Z.content,Y=tt&&Buffer.isBuffer(q)?q.toString("binary"):we(q),ae=0,ve=Math.min(1024,Y.length),Pe=0,Ce=0;Ce<=ve;++Ce)(Pe=Y.charCodeAt(Ce))>=32&&Pe<128&&++ae;var ye=ae>=4*ve/5;T.push(F),T.push("Content-Location: "+(b.root||"file:///C:/SheetJS/")+K),T.push("Content-Transfer-Encoding: "+(ye?"quoted-printable":"base64")),T.push("Content-Type: "+zV(Z,K)),T.push(""),T.push(ye?UV(Y):WV(Y))}return T.push(F+"--\r\n"),T.join("\r\n")}(x,b);if(M(x),"zip"===b.fileType)return function VV(x,R){var b=R||{},F=[],T=[],P=J(1),K=b.compression?8:0,Z=0,q=0,Y=0,ae=0,ve=0,Pe=x.FullPaths[0],Ce=Pe,ye=x.FileIndex[0],je=[],Ot=0;for(q=1;q<x.FullPaths.length;++q)if(Ce=x.FullPaths[q].slice(Pe.length),(ye=x.FileIndex[q]).size&&ye.content&&"\x01Sh33tJ5"!=Ce){var li=ae,gr=J(Ce.length);for(Y=0;Y<Ce.length;++Y)gr.write_shift(1,127&Ce.charCodeAt(Y));gr=gr.slice(0,gr.l),je[ve]=u_.buf(ye.content,0);var Fi=ye.content;8==K&&(Fi=L(Fi)),(P=J(30)).write_shift(4,67324752),P.write_shift(2,20),P.write_shift(2,Z),P.write_shift(2,K),ye.mt?n(P,ye.mt):P.write_shift(4,0),P.write_shift(-4,8&Z?0:je[ve]),P.write_shift(4,8&Z?0:Fi.length),P.write_shift(4,8&Z?0:ye.content.length),P.write_shift(2,gr.length),P.write_shift(2,0),ae+=P.length,F.push(P),ae+=gr.length,F.push(gr),ae+=Fi.length,F.push(Fi),8&Z&&((P=J(12)).write_shift(-4,je[ve]),P.write_shift(4,Fi.length),P.write_shift(4,ye.content.length),ae+=P.l,F.push(P)),(P=J(46)).write_shift(4,33639248),P.write_shift(2,0),P.write_shift(2,20),P.write_shift(2,Z),P.write_shift(2,K),P.write_shift(4,0),P.write_shift(-4,je[ve]),P.write_shift(4,Fi.length),P.write_shift(4,ye.content.length),P.write_shift(2,gr.length),P.write_shift(2,0),P.write_shift(2,0),P.write_shift(2,0),P.write_shift(2,0),P.write_shift(4,0),P.write_shift(4,li),Ot+=P.l,T.push(P),Ot+=gr.length,T.push(gr),++ve}return(P=J(22)).write_shift(4,101010256),P.write_shift(2,0),P.write_shift(2,0),P.write_shift(2,ve),P.write_shift(2,ve),P.write_shift(4,Ot),P.write_shift(4,ae),P.write_shift(2,0),br([br(F),br(T),P])}(x,b);var F=function(Pe){for(var Ce=0,ye=0,je=0;je<Pe.FileIndex.length;++je){var Ot=Pe.FileIndex[je];if(Ot.content){var li=Ot.content.length;li>0&&(li<4096?Ce+=li+63>>6:ye+=li+511>>9)}}for(var gr=Pe.FullPaths.length+3>>2,bl=Ce+127>>7,yl=(Ce+7>>3)+ye+gr+bl,ao=yl+127>>7,ig=ao<=109?0:Math.ceil((ao-109)/127);yl+ao+ig+127>>7>ao;)ig=++ao<=109?0:Math.ceil((ao-109)/127);var Os=[1,ig,ao,bl,gr,ye,Ce,0];return Pe.FileIndex[0].size=Ce<<6,Os[7]=(Pe.FileIndex[0].start=Os[0]+Os[1]+Os[2]+Os[3]+Os[4]+Os[5])+(Os[6]+7>>3),Os}(x),T=J(F[7]<<9),P=0,K=0;for(P=0;P<8;++P)T.write_shift(1,oe[P]);for(P=0;P<8;++P)T.write_shift(2,0);for(T.write_shift(2,62),T.write_shift(2,3),T.write_shift(2,65534),T.write_shift(2,9),T.write_shift(2,6),P=0;P<3;++P)T.write_shift(2,0);for(T.write_shift(4,0),T.write_shift(4,F[2]),T.write_shift(4,F[0]+F[1]+F[2]+F[3]-1),T.write_shift(4,0),T.write_shift(4,4096),T.write_shift(4,F[3]?F[0]+F[1]+F[2]-1:re),T.write_shift(4,F[3]),T.write_shift(-4,F[1]?F[0]-1:re),T.write_shift(4,F[1]),P=0;P<109;++P)T.write_shift(-4,P<F[2]?F[1]+P:-1);if(F[1])for(K=0;K<F[1];++K){for(;P<236+127*K;++P)T.write_shift(-4,P<F[2]?F[1]+P:-1);T.write_shift(-4,K===F[1]-1?re:K+1)}var Z=function(Pe){for(K+=Pe;P<K-1;++P)T.write_shift(-4,P+1);Pe&&(++P,T.write_shift(-4,re))};for(K=P=0,K+=F[1];P<K;++P)T.write_shift(-4,ke.DIFSECT);for(K+=F[2];P<K;++P)T.write_shift(-4,ke.FATSECT);Z(F[3]),Z(F[4]);for(var X=0,q=0,Y=x.FileIndex[0];X<x.FileIndex.length;++X)(Y=x.FileIndex[X]).content&&!((q=Y.content.length)<4096)&&(Y.start=K,Z(q+511>>9));for(Z(F[6]+7>>3);511&T.l;)T.write_shift(-4,ke.ENDOFCHAIN);for(K=P=0,X=0;X<x.FileIndex.length;++X)(Y=x.FileIndex[X]).content&&(q=Y.content.length)&&!(q>=4096)&&(Y.start=K,Z(q+63>>6));for(;511&T.l;)T.write_shift(-4,ke.ENDOFCHAIN);for(P=0;P<F[4]<<2;++P){var ae=x.FullPaths[P];if(ae&&0!==ae.length){Y=x.FileIndex[P],0===P&&(Y.start=Y.size?Y.start-1:re);var ve=0===P&&b.root||Y.name;if(q=2*(ve.length+1),T.write_shift(64,ve,"utf16le"),T.write_shift(2,q),T.write_shift(1,Y.type),T.write_shift(1,Y.color),T.write_shift(-4,Y.L),T.write_shift(-4,Y.R),T.write_shift(-4,Y.C),Y.clsid)T.write_shift(16,Y.clsid,"hex");else for(X=0;X<4;++X)T.write_shift(4,0);T.write_shift(4,Y.state||0),T.write_shift(4,0),T.write_shift(4,0),T.write_shift(4,0),T.write_shift(4,0),T.write_shift(4,Y.start),T.write_shift(4,Y.size),T.write_shift(4,0)}else{for(X=0;X<17;++X)T.write_shift(4,0);for(X=0;X<3;++X)T.write_shift(4,-1);for(X=0;X<12;++X)T.write_shift(4,0)}}for(P=1;P<x.FileIndex.length;++P)if((Y=x.FileIndex[P]).size>=4096)if(T.l=Y.start+1<<9,tt&&Buffer.isBuffer(Y.content))Y.content.copy(T,T.l,0,Y.size),T.l+=Y.size+511&-512;else{for(X=0;X<Y.size;++X)T.write_shift(1,Y.content[X]);for(;511&X;++X)T.write_shift(1,0)}for(P=1;P<x.FileIndex.length;++P)if((Y=x.FileIndex[P]).size>0&&Y.size<4096)if(tt&&Buffer.isBuffer(Y.content))Y.content.copy(T,T.l,0,Y.size),T.l+=Y.size+63&-64;else{for(X=0;X<Y.size;++X)T.write_shift(1,Y.content[X]);for(;63&X;++X)T.write_shift(1,0)}if(tt)T.l=T.length;else for(;T.l<T.length;)T.write_shift(1,0);return T}t.version="1.2.1";var te,B=64,re=-2,ue="d0cf11e0a1b11ae1",oe=[208,207,17,224,161,177,26,225],Ae="00000000000000000000000000000000",ke={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:re,FREESECT:-1,HEADER_SIGNATURE:ue,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:Ae,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function we(x){for(var R=new Array(x.length),b=0;b<x.length;++b)R[b]=String.fromCharCode(x[b]);return R.join("")}function L(x){return te?te.deflateRawSync(x):rt(x)}var O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ee=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],xe=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function ce(x){var R=139536&(x<<1|x<<11)|558144&(x<<5|x<<15);return 255&(R>>16|R>>8|R)}for(var de=typeof Uint8Array<"u",ie=de?new Uint8Array(256):[],Xe=0;Xe<256;++Xe)ie[Xe]=ce(Xe);function D(x,R){var b=ie[255&x];return R<=8?b>>>8-R:(b=b<<8|ie[x>>8&255],R<=16?b>>>16-R:(b=b<<8|ie[x>>16&255])>>>24-R)}function yt(x,R){var b=7&R,F=R>>>3;return(x[F]|(b<=6?0:x[F+1]<<8))>>>b&3}function it(x,R){var b=7&R,F=R>>>3;return(x[F]|(b<=5?0:x[F+1]<<8))>>>b&7}function st(x,R){var b=7&R,F=R>>>3;return(x[F]|(b<=3?0:x[F+1]<<8))>>>b&31}function Ee(x,R){var b=7&R,F=R>>>3;return(x[F]|(b<=1?0:x[F+1]<<8))>>>b&127}function ar(x,R,b){var F=7&R,T=R>>>3,K=x[T]>>>F;return b<8-F||(K|=x[T+1]<<8-F,b<16-F)||(K|=x[T+2]<<16-F,b<24-F)||(K|=x[T+3]<<24-F),K&(1<<b)-1}function Gi(x,R,b){var F=7&R,T=R>>>3;return F<=5?x[T]|=(7&b)<<F:(x[T]|=b<<F&255,x[T+1]=(7&b)>>8-F),R+3}function ms(x,R,b){return x[R>>>3]|=b=(1&b)<<(7&R),R+1}function _s(x,R,b){var T=R>>>3;return x[T]|=255&(b<<=7&R),x[T+1]=b>>>=8,R+8}function xl(x,R,b){var T=R>>>3;return x[T]|=255&(b<<=7&R),x[T+1]=255&(b>>>=8),x[T+2]=b>>>8,R+16}function Cn(x,R){var b=x.length,F=2*b>R?2*b:R+5,T=0;if(b>=R)return x;if(tt){var P=Lv(F);if(x.copy)x.copy(P);else for(;T<x.length;++T)P[T]=x[T];return P}if(de){var K=new Uint8Array(F);if(K.set)K.set(x);else for(;T<b;++T)K[T]=x[T];return K}return x.length=F,x}function Ei(x){for(var R=new Array(x),b=0;b<x;++b)R[b]=0;return R}function Ls(x,R,b){var F=1,T=0,P=0,K=0,Z=0,X=x.length,q=de?new Uint16Array(32):Ei(32);for(P=0;P<32;++P)q[P]=0;for(P=X;P<b;++P)x[P]=0;X=x.length;var Y=de?new Uint16Array(X):Ei(X);for(P=0;P<X;++P)q[T=x[P]]++,F<T&&(F=T),Y[P]=0;for(q[0]=0,P=1;P<=F;++P)q[P+16]=Z=Z+q[P-1]<<1;for(P=0;P<X;++P)0!=(Z=x[P])&&(Y[P]=q[Z+16]++);var ae=0;for(P=0;P<X;++P)if(0!=(ae=x[P]))for(Z=D(Y[P],F)>>F-ae,K=(1<<F+4-ae)-1;K>=0;--K)R[Z|K<<ae]=15&ae|P<<4;return F}var wn=de?new Uint16Array(512):Ei(512),Sl=de?new Uint16Array(32):Ei(32);if(!de){for(var ri=0;ri<512;++ri)wn[ri]=0;for(ri=0;ri<32;++ri)Sl[ri]=0}!function(){for(var x=[],R=0;R<32;R++)x.push(5);Ls(x,Sl,32);var b=[];for(R=0;R<=143;R++)b.push(8);for(;R<=255;R++)b.push(9);for(;R<=279;R++)b.push(7);for(;R<=287;R++)b.push(8);Ls(b,wn,288)}();var vs=function(){for(var R=de?new Uint8Array(32768):[],b=0,F=0;b<xe.length-1;++b)for(;F<xe[b+1];++F)R[F]=b;for(;F<32768;++F)R[F]=29;var T=de?new Uint8Array(259):[];for(b=0,F=0;b<ee.length-1;++b)for(;F<ee[b+1];++F)T[F]=b;return function(X,q){return X.length<8?function P(Z,X){for(var q=0;q<Z.length;){var Y=Math.min(65535,Z.length-q);for(X.write_shift(1,+(q+Y==Z.length)),X.write_shift(2,Y),X.write_shift(2,65535&~Y);Y-- >0;)X[X.l++]=Z[q++]}return X.l}(X,q):function K(Z,X){for(var q=0,Y=0,ae=de?new Uint16Array(32768):[];Y<Z.length;){var ve=Math.min(65535,Z.length-Y);if(ve<10){for(7&(q=Gi(X,q,+(Y+ve==Z.length)))&&(q+=8-(7&q)),X.l=q/8|0,X.write_shift(2,ve),X.write_shift(2,65535&~ve);ve-- >0;)X[X.l++]=Z[Y++];q=8*X.l}else{q=Gi(X,q,+(Y+ve==Z.length)+2);for(var Pe=0;ve-- >0;){var Ce=Z[Y],ye=-1,je=0;if((ye=ae[Pe=32767&(Pe<<5^Ce)])&&((ye|=-32768&Y)>Y&&(ye-=32768),ye<Y))for(;Z[ye+je]==Z[Y+je]&&je<250;)++je;if(je>2){(Ce=T[je])<=22?q=_s(X,q,ie[Ce+1]>>1)-1:(_s(X,q,3),_s(X,q+=5,ie[Ce-23]>>5),q+=3);var Ot=Ce<8?0:Ce-4>>2;Ot>0&&(xl(X,q,je-ee[Ce]),q+=Ot),q=_s(X,q,ie[Ce=R[Y-ye]]>>3),q-=3;var li=Ce<4?0:Ce-2>>1;li>0&&(xl(X,q,Y-ye-xe[Ce]),q+=li);for(var gr=0;gr<je;++gr)ae[Pe]=32767&Y,Pe=32767&(Pe<<5^Z[Y]),++Y;ve-=je-1}else Ce<=143?Ce+=48:q=ms(X,q,1),q=_s(X,q,ie[Ce]),ae[Pe]=32767&Y,++Y}q=_s(X,q,0)-1}}return X.l=(q+7)/8|0,X.l}(X,q)}}();function rt(x){var R=J(50+Math.floor(1.1*x.length)),b=vs(x,R);return R.slice(0,b)}var lr=de?new Uint16Array(32768):Ei(32768),Vi=de?new Uint16Array(32768):Ei(32768),xr=de?new Uint16Array(128):Ei(128),oo=1,tx=1;function NV(x,R){var b=st(x,R)+257,F=st(x,R+=5)+1,T=function Et(x,R){var b=7&R,F=R>>>3;return(x[F]|(b<=4?0:x[F+1]<<8))>>>b&15}(x,R+=5)+4;R+=4;for(var P=0,K=de?new Uint8Array(19):Ei(19),Z=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],X=1,q=de?new Uint8Array(8):Ei(8),Y=de?new Uint8Array(8):Ei(8),ae=K.length,ve=0;ve<T;++ve)K[O[ve]]=P=it(x,R),X<P&&(X=P),q[P]++,R+=3;var Pe=0;for(q[0]=0,ve=1;ve<=X;++ve)Y[ve]=Pe=Pe+q[ve-1]<<1;for(ve=0;ve<ae;++ve)0!=(Pe=K[ve])&&(Z[ve]=Y[Pe]++);var Ce=0;for(ve=0;ve<ae;++ve)if(0!=(Ce=K[ve])){Pe=ie[Z[ve]]>>8-Ce;for(var ye=(1<<7-Ce)-1;ye>=0;--ye)xr[Pe|ye<<Ce]=7&Ce|ve<<3}var je=[];for(X=1;je.length<b+F;)switch(Pe=xr[Ee(x,R)],R+=7&Pe,Pe>>>=3){case 16:for(P=3+yt(x,R),R+=2,Pe=je[je.length-1];P-- >0;)je.push(Pe);break;case 17:for(P=3+it(x,R),R+=3;P-- >0;)je.push(0);break;case 18:for(P=11+Ee(x,R),R+=7;P-- >0;)je.push(0);break;default:je.push(Pe),X<Pe&&(X=Pe)}var Ot=je.slice(0,b),li=je.slice(b);for(ve=b;ve<286;++ve)Ot[ve]=0;for(ve=F;ve<30;++ve)li[ve]=0;return oo=Ls(Ot,lr,286),tx=Ls(li,Vi,30),R}function rx(x,R){var F=function HV(x,R){if(3==x[0]&&!(3&x[1]))return[an(R),2];for(var b=0,F=0,T=Lv(R||1<<18),P=0,K=T.length>>>0,Z=0,X=0;!(1&F);)if(F=it(x,b),b+=3,F>>>1)for(F>>1==1?(Z=9,X=5):(b=NV(x,b),Z=oo,X=tx);;){!R&&K<P+32767&&(K=(T=Cn(T,P+32767)).length);var Y=ar(x,b,Z),ae=F>>>1==1?wn[Y]:lr[Y];if(b+=15&ae,(ae>>>=4)>>>8&255){if(256==ae)break;var ve=(ae-=257)<8?0:ae-4>>2;ve>5&&(ve=0);var Pe=P+ee[ae];ve>0&&(Pe+=ar(x,b,ve),b+=ve),Y=ar(x,b,X),b+=15&(ae=F>>>1==1?Sl[Y]:Vi[Y]);var Ce=(ae>>>=4)<4?0:ae-2>>1,ye=xe[ae];for(Ce>0&&(ye+=ar(x,b,Ce),b+=Ce),!R&&K<Pe&&(K=(T=Cn(T,Pe+100)).length);P<Pe;)T[P]=T[P-ye],++P}else T[P++]=ae}else{7&b&&(b+=8-(7&b));var q=x[b>>>3]|x[(b>>>3)+1]<<8;if(b+=32,q>0)for(!R&&K<P+q&&(K=(T=Cn(T,P+q)).length);q-- >0;)T[P++]=x[b>>>3],b+=8}return R?[T,b+7>>>3]:[T.slice(0,P),b+7>>>3]}(x.slice(x.l||0),R);return x.l+=F[1],F[0]}function ix(x,R){if(!x)throw new Error(R);typeof console<"u"&&console.error(R)}function sx(x,R){var b=x;Mr(b,0);var P={FileIndex:[],FullPaths:[]};S(P,{root:R.root});for(var K=b.length-4;(80!=b[K]||75!=b[K+1]||5!=b[K+2]||6!=b[K+3])&&K>=0;)--K;b.l=K+4,b.l+=4;var Z=b.read_shift(2);b.l+=6;var X=b.read_shift(4);for(b.l=X,K=0;K<Z;++K){b.l+=20;var q=b.read_shift(4),Y=b.read_shift(4),ae=b.read_shift(2),ve=b.read_shift(2),Pe=b.read_shift(2);b.l+=8;var Ce=b.read_shift(4),ye=a(b.slice(b.l+ae,b.l+ae+ve));b.l+=ae+ve+Pe;var je=b.l;b.l=Ce+4,GV(b,q,Y,P,ye),b.l=je}return P}function GV(x,R,b,F,T){x.l+=2;var P=x.read_shift(2),K=x.read_shift(2),Z=function o(x){var R=65535&x.read_shift(2),b=65535&x.read_shift(2),F=new Date,T=31&b,P=15&(b>>>=5);b>>>=4,F.setMilliseconds(0),F.setFullYear(b+1980),F.setMonth(P-1),F.setDate(T);var K=31&R,Z=63&(R>>>=5);return F.setHours(R>>>=6),F.setMinutes(Z),F.setSeconds(K<<1),F}(x);if(8257&P)throw new Error("Unsupported ZIP encryption");x.read_shift(4);for(var q=x.read_shift(4),Y=x.read_shift(4),ae=x.read_shift(2),ve=x.read_shift(2),Pe="",Ce=0;Ce<ae;++Ce)Pe+=String.fromCharCode(x[x.l++]);if(ve){var ye=a(x.slice(x.l,x.l+ve));(ye[21589]||{}).mt&&(Z=ye[21589].mt),((T||{})[21589]||{}).mt&&(Z=T[21589].mt)}x.l+=ve;var je=x.slice(x.l,x.l+q);switch(K){case 8:je=function j(x,R){if(!te)return rx(x,R);var F=new(0,te.InflateRaw),T=F._processChunk(x.slice(x.l),F._finishFlushFlag);return x.l+=F.bytesRead,T}(x,Y);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+K)}var Ot=!1;8&P&&(134695760==x.read_shift(4)&&(x.read_shift(4),Ot=!0),q=x.read_shift(4),Y=x.read_shift(4)),q!=R&&ix(Ot,"Bad compressed size: "+R+" != "+q),Y!=b&&ix(Ot,"Bad uncompressed size: "+b+" != "+Y),rg(F,Pe,je,{unsafe:!0,mt:Z})}var fd={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function zV(x,R){if(x.ctype)return x.ctype;var b=x.name||"",F=b.match(/\.([^\.]+)$/);return F&&fd[F[1]]||R&&(F=(b=R).match(/[\.\\]([^\.\\])+$/))&&fd[F[1]]?fd[F[1]]:"application/octet-stream"}function WV(x){for(var R=za(x),b=[],F=0;F<R.length;F+=76)b.push(R.slice(F,F+76));return b.join("\r\n")+"\r\n"}function UV(x){var R=x.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(q){var Y=q.charCodeAt(0).toString(16).toUpperCase();return"="+(1==Y.length?"0"+Y:Y)});"\n"==(R=R.replace(/ $/gm,"=20").replace(/\t$/gm,"=09")).charAt(0)&&(R="=0D"+R.slice(1));for(var b=[],F=(R=R.replace(/\r(?!\n)/gm,"=0D").replace(/\n\n/gm,"\n=0A").replace(/([^\r\n])\n/gm,"$1=0A")).split("\r\n"),T=0;T<F.length;++T){var P=F[T];if(0!=P.length)for(var K=0;K<P.length;){var Z=76,X=P.slice(K,K+Z);"="==X.charAt(Z-1)?Z--:"="==X.charAt(Z-2)?Z-=2:"="==X.charAt(Z-3)&&(Z-=3),X=P.slice(K,K+Z),(K+=Z)<P.length&&(X+="="),b.push(X)}else b.push("")}return b.join("\r\n")}function jV(x,R,b){for(var K,F="",T="",P="",Z=0;Z<10;++Z){var X=R[Z];if(!X||X.match(/^\s*$/))break;var q=X.match(/^(.*?):\s*([^\s].*)$/);if(q)switch(q[1].toLowerCase()){case"content-location":F=q[2].trim();break;case"content-type":P=q[2].trim();break;case"content-transfer-encoding":T=q[2].trim()}}switch(++Z,T.toLowerCase()){case"base64":K=wi(Ci(R.slice(Z).join("")));break;case"quoted-printable":K=function $V(x){for(var R=[],b=0;b<x.length;++b){for(var F=x[b];b<=x.length&&"="==F.charAt(F.length-1);)F=F.slice(0,F.length-1)+x[++b];R.push(F)}for(var T=0;T<R.length;++T)R[T]=R[T].replace(/[=][0-9A-Fa-f]{2}/g,function(P){return String.fromCharCode(parseInt(P.slice(1),16))});return wi(R.join("\r\n"))}(R.slice(Z));break;default:throw new Error("Unsupported Content-Transfer-Encoding "+T)}var Y=rg(x,F.slice(b.length),K,{unsafe:!0});P&&(Y.ctype=P)}function rg(x,R,b,F){var T=F&&F.unsafe;T||S(x);var P=!T&&Le.find(x,R);if(!P){var K=x.FullPaths[0];R.slice(0,K.length)==K?K=R:("/"!=K.slice(-1)&&(K+="/"),K=(K+R).replace("//","/")),P={name:s(R),type:2},x.FileIndex.push(P),x.FullPaths.push(K),T||Le.utils.cfb_gc(x)}return P.content=b,P.size=b?b.length:0,F&&(F.CLSID&&(P.clsid=F.CLSID),F.mt&&(P.mt=F.mt),F.ct&&(P.ct=F.ct)),P}return t.find=function V(x,R){var b=x.FullPaths.map(function(X){return X.toUpperCase()}),F=b.map(function(X){var q=X.split("/");return q[q.length-("/"==X.slice(-1)?2:1)]}),T=!1;47===R.charCodeAt(0)?(T=!0,R=b[0].slice(0,-1)+R):T=-1!==R.indexOf("/");var P=R.toUpperCase(),K=!0===T?b.indexOf(P):F.indexOf(P);if(-1!==K)return x.FileIndex[K];var Z=!P.match(Ua);for(P=P.replace(Hr,""),Z&&(P=P.replace(Ua,"!")),K=0;K<b.length;++K)if((Z?b[K].replace(Ua,"!"):b[K]).replace(Hr,"")==P||(Z?F[K].replace(Ua,"!"):F[K]).replace(Hr,"")==P)return x.FileIndex[K];return null},t.read=function E(x,R){var b=R&&R.type;switch(b||tt&&Buffer.isBuffer(x)&&(b="buffer"),b||"base64"){case"file":return function k(x,R){return c(),d(l.readFileSync(x),R)}(x,R);case"base64":return d(wi(Ci(x)),R);case"binary":return d(wi(x),R)}return d(x,R)},t.parse=d,t.write=function be(x,R){var b=H(x,R);switch(R&&R.type||"buffer"){case"file":return c(),l.writeFileSync(R.filename,b),b;case"binary":return"string"==typeof b?b:we(b);case"base64":return za("string"==typeof b?b:we(b));case"buffer":if(tt)return Buffer.isBuffer(b)?b:Ts(b);case"array":return"string"==typeof b?wi(b):b}return b},t.writeFile=function Ze(x,R,b){c();var F=H(x,b);l.writeFileSync(R,F)},t.utils={cfb_new:function XV(x){var R={};return S(R,x),R},cfb_add:rg,cfb_del:function YV(x,R){S(x);var b=Le.find(x,R);if(b)for(var F=0;F<x.FileIndex.length;++F)if(x.FileIndex[F]==b)return x.FileIndex.splice(F,1),x.FullPaths.splice(F,1),!0;return!1},cfb_mov:function QV(x,R,b){S(x);var F=Le.find(x,R);if(F)for(var T=0;T<x.FileIndex.length;++T)if(x.FileIndex[T]==F)return x.FileIndex[T].name=s(b),x.FullPaths[T]=b,!0;return!1},cfb_gc:function JV(x){M(x,!0)},ReadShift:Qa,CheckField:_C,prep_blob:Mr,bconcat:br,use_zlib:function A(x){try{var b=new(0,x.InflateRaw);if(b._processChunk(new Uint8Array([3,0]),b._finishFlushFlag),!b.bytesRead)throw new Error("zlib does not expose bytesRead");te=x}catch(F){console.error("cannot use native zlib: "+(F.message||F))}},_deflateRaw:rt,_inflateRaw:rx,consts:ke},t}();function Jt(e){for(var t=Object.keys(e),r=[],i=0;i<t.length;++i)Object.prototype.hasOwnProperty.call(e,t[i])&&r.push(t[i]);return r}function Bc(e){for(var t=[],r=Jt(e),i=0;i!==r.length;++i)t[e[r[i]]]=r[i];return t}var Hc=new Date(1899,11,30,0,0,0);function wr(e,t){var r=e.getTime();return t&&(r-=1263168e5),(r-(Hc.getTime()+6e4*(e.getTimezoneOffset()-Hc.getTimezoneOffset())))/864e5}var tC=new Date,p_=Hc.getTime()+6e4*(tC.getTimezoneOffset()-Hc.getTimezoneOffset()),rC=tC.getTimezoneOffset();function Gc(e){var t=new Date;return t.setTime(24*e*60*60*1e3+p_),t.getTimezoneOffset()!==rC&&t.setTime(t.getTime()+6e4*(t.getTimezoneOffset()-rC)),t}function m_(e){var t=0,r=0,i=!1,s=e.match(/P([0-9\.]+Y)?([0-9\.]+M)?([0-9\.]+D)?T([0-9\.]+H)?([0-9\.]+M)?([0-9\.]+S)?/);if(!s)throw new Error("|"+e+"| is not an ISO8601 Duration");for(var n=1;n!=s.length;++n)if(s[n]){switch(r=1,n>3&&(i=!0),s[n].slice(s[n].length-1)){case"Y":throw new Error("Unsupported ISO Duration Field: "+s[n].slice(s[n].length-1));case"D":r*=24;case"H":r*=60;case"M":if(!i)throw new Error("Unsupported ISO Duration Field: M");r*=60}t+=r*parseInt(s[n],10)}return t}var iC=new Date("2017-02-19T19:06:09.000Z"),sC=isNaN(iC.getFullYear())?new Date("2/19/17"):iC,v_=2017==sC.getFullYear();function Kt(e,t){var r=new Date(e);if(v_)return t>0?r.setTime(r.getTime()+60*r.getTimezoneOffset()*1e3):t<0&&r.setTime(r.getTime()-60*r.getTimezoneOffset()*1e3),r;if(e instanceof Date)return e;if(1917==sC.getFullYear()&&!isNaN(r.getFullYear())){var i=r.getFullYear();return e.indexOf(""+i)>-1||r.setFullYear(r.getFullYear()+100),r}var s=e.match(/\d+/g)||["2017","2","19","0","0","0"],n=new Date(+s[0],+s[1]-1,+s[2],+s[3]||0,+s[4]||0,+s[5]||0);return e.indexOf("Z")>-1&&(n=new Date(n.getTime()-60*n.getTimezoneOffset()*1e3)),n}function Un(e,t){if(tt&&Buffer.isBuffer(e)){if(t){if(255==e[0]&&254==e[1])return us(e.slice(2).toString("utf16le"));if(254==e[1]&&255==e[2])return us(_v(e.slice(2).toString("binary")))}return e.toString("binary")}if(typeof TextDecoder<"u")try{if(t){if(255==e[0]&&254==e[1])return us(new TextDecoder("utf-16le").decode(e.slice(2)));if(254==e[0]&&255==e[1])return us(new TextDecoder("utf-16be").decode(e.slice(2)))}var r={"\u20ac":"\x80","\u201a":"\x82",\u0192:"\x83","\u201e":"\x84","\u2026":"\x85","\u2020":"\x86","\u2021":"\x87",\u02c6:"\x88","\u2030":"\x89",\u0160:"\x8a","\u2039":"\x8b",\u0152:"\x8c",\u017d:"\x8e","\u2018":"\x91","\u2019":"\x92","\u201c":"\x93","\u201d":"\x94","\u2022":"\x95","\u2013":"\x96","\u2014":"\x97","\u02dc":"\x98","\u2122":"\x99",\u0161:"\x9a","\u203a":"\x9b",\u0153:"\x9c",\u017e:"\x9e",\u0178:"\x9f"};return Array.isArray(e)&&(e=new Uint8Array(e)),new TextDecoder("latin1").decode(e).replace(/[\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0160\u2039\u0152\u017d\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u0161\u203a\u0153\u017e\u0178]/g,function(n){return r[n]||n})}catch{}for(var i=[],s=0;s!=e.length;++s)i.push(String.fromCharCode(e[s]));return i.join("")}function Pt(e){if(typeof JSON<"u"&&!Array.isArray(e))return JSON.parse(JSON.stringify(e));if("object"!=typeof e||null==e)return e;if(e instanceof Date)return new Date(e.getTime());var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=Pt(e[r]));return t}function Zt(e,t){for(var r="";r.length<t;)r+=e;return r}function qi(e){var t=Number(e);if(!isNaN(t))return isFinite(t)?t:NaN;if(!/\d/.test(e))return t;var r=1,i=e.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,function(){return r*=100,""});return isNaN(t=Number(i))&&(i=i.replace(/[(](.*)[)]/,function(s,n){return r=-r,n}),isNaN(t=Number(i)))?t:t/r}var C_=["january","february","march","april","may","june","july","august","september","october","november","december"];function Wo(e){var t=new Date(e),r=new Date(NaN),i=t.getYear(),s=t.getMonth(),n=t.getDate();if(isNaN(n))return r;var o=e.toLowerCase();if(o.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)){if((o=o.replace(/[^a-z]/g,"").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/,"")).length>3&&-1==C_.indexOf(o))return r}else if(o.match(/[a-z]/))return r;return i<0||i>8099?r:(s>0||n>1)&&101!=i?t:e.match(/[^-0-9:,\/\\]/)?r:t}var w_=function(){var e=5=="abacaba".split(/(:?b)/i).length;return function(r,i,s){if(e||"string"==typeof i)return r.split(i);for(var n=r.split(i),o=[n[0]],a=1;a<n.length;++a)o.push(s),o.push(n[a]);return o}}();function nC(e){return e?e.content&&e.type?Un(e.content,!0):e.data?Ho(e.data):e.asNodeBuffer&&tt?Ho(e.asNodeBuffer().toString("binary")):e.asBinary?Ho(e.asBinary()):e._data&&e._data.getContent?Ho(Un(Array.prototype.slice.call(e._data.getContent(),0))):null:null}function oC(e){if(!e)return null;if(e.data)return Ic(e.data);if(e.asNodeBuffer&&tt)return e.asNodeBuffer();if(e._data&&e._data.getContent){var t=e._data.getContent();return"string"==typeof t?Ic(t):Array.prototype.slice.call(t)}return e.content&&e.type?e.content:null}function Ii(e,t){for(var r=e.FullPaths||Jt(e.files),i=t.toLowerCase().replace(/[\/]/g,"\\"),s=i.replace(/\\/g,"/"),n=0;n<r.length;++n){var o=r[n].replace(/^Root Entry[\/]/,"").toLowerCase();if(i==o||s==o)return e.files?e.files[r[n]]:e.FileIndex[n]}return null}function zh(e,t){var r=Ii(e,t);if(null==r)throw new Error("Cannot find file "+t+" in zip");return r}function cr(e,t,r){if(!r)return function x_(e){return e&&".bin"===e.name.slice(-4)?oC(e):nC(e)}(zh(e,t));if(!t)return null;try{return cr(e,t)}catch{return null}}function Si(e,t,r){if(!r)return nC(zh(e,t));if(!t)return null;try{return Si(e,t)}catch{return null}}function aC(e,t,r){if(!r)return oC(zh(e,t));if(!t)return null;try{return aC(e,t)}catch{return null}}function lC(e){for(var t=e.FullPaths||Jt(e.files),r=[],i=0;i<t.length;++i)"/"!=t[i].slice(-1)&&r.push(t[i].replace(/^Root Entry[\/]/,""));return r.sort()}function cC(e,t){switch(t.type){case"base64":return Le.read(e,{type:"base64"});case"binary":return Le.read(e,{type:"binary"});case"buffer":case"array":return Le.read(e,{type:"buffer"})}throw new Error("Unrecognized type "+t.type)}function qa(e,t){if("/"==e.charAt(0))return e.slice(1);var r=t.split("/");"/"!=t.slice(-1)&&r.pop();for(var i=e.split("/");0!==i.length;){var s=i.shift();".."===s?r.pop():"."!==s&&r.push(s)}return r.join("/")}var dr='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n',S_=/([^"\s?>\/]+)\s*=\s*((?:")([^"]*)(?:")|(?:')([^']*)(?:')|([^'">\s]+))/g,dC=/<[\/\?]?[a-zA-Z0-9:_-]+(?:\s+[^"\s?>\/]+\s*=\s*(?:"[^"]*"|'[^']*'|[^'">\s=]+))*\s*[\/\?]?>/gm,Gr=dr.match(dC)?dC:/<[^>]*>/g,y_=/<\w*:/,E_=/<(\/?)\w+:/;function ze(e,t,r){for(var i={},s=0,n=0;s!==e.length&&32!==(n=e.charCodeAt(s))&&10!==n&&13!==n;++s);if(t||(i[0]=e.slice(0,s)),s===e.length)return i;var o=e.match(S_),a=0,l="",c=0,d="",u="",h=1;if(o)for(c=0;c!=o.length;++c){for(u=o[c],n=0;n!=u.length&&61!==u.charCodeAt(n);++n);for(d=u.slice(0,n).trim();32==u.charCodeAt(n+1);)++n;for(h=34==(s=u.charCodeAt(n+1))||39==s?1:0,l=u.slice(n+1+h,u.length-h),a=0;a!=d.length&&58!==d.charCodeAt(a);++a);if(a===d.length)d.indexOf("_")>0&&(d=d.slice(0,d.indexOf("_"))),i[d]=l,r||(i[d.toLowerCase()]=l);else{var f=(5===a&&"xmlns"===d.slice(0,5)?"xmlns":"")+d.slice(a+1);if(i[f]&&"ext"==d.slice(a-3,a))continue;i[f]=l,r||(i[f.toLowerCase()]=l)}}return i}function ds(e){return e.replace(E_,"<$1")}var uC={""":'"',"'":"'",">":">","<":"<","&":"&"},Uh=Bc(uC),ut=function(){var e=/&(?:quot|apos|gt|lt|amp|#x?([\da-fA-F]+));/gi,t=/_x([\da-fA-F]{4})_/gi;return function r(i){var s=i+"",n=s.indexOf("<![CDATA[");if(-1==n)return s.replace(e,function(a,l){return uC[a]||String.fromCharCode(parseInt(l,a.indexOf("x")>-1?16:10))||a}).replace(t,function(a,l){return String.fromCharCode(parseInt(l,16))});var o=s.indexOf("]]>");return r(s.slice(0,n))+s.slice(n+9,o)+r(s.slice(o+3))}}(),$h=/[&<>'"]/g,fC=/[\u0000-\u001f]/g;function jh(e){return(e+"").replace($h,function(r){return Uh[r]}).replace(/\n/g,"<br/>").replace(fC,function(r){return"&#x"+("000"+r.charCodeAt(0).toString(16)).slice(-4)+";"})}var gC=function(){var e=/&#(\d+);/g;function t(r,i){return String.fromCharCode(parseInt(i,10))}return function(i){return i.replace(e,t)}}();function _t(e){switch(e){case 1:case!0:case"1":case"true":case"TRUE":return!0;default:return!1}}function Kh(e){for(var t="",r=0,i=0,s=0,n=0,o=0,a=0;r<e.length;)(i=e.charCodeAt(r++))<128?t+=String.fromCharCode(i):(s=e.charCodeAt(r++),i>191&&i<224?(o=(31&i)<<6,o|=63&s,t+=String.fromCharCode(o)):(n=e.charCodeAt(r++),i<240?t+=String.fromCharCode((15&i)<<12|(63&s)<<6|63&n):(a=((7&i)<<18|(63&s)<<12|(63&n)<<6|63&(o=e.charCodeAt(r++)))-65536,t+=String.fromCharCode(55296+(a>>>10&1023)),t+=String.fromCharCode(56320+(1023&a)))));return t}function pC(e){var r,i,a,t=an(2*e.length),s=1,n=0,o=0;for(i=0;i<e.length;i+=s)s=1,(a=e.charCodeAt(i))<128?r=a:a<224?(r=64*(31&a)+(63&e.charCodeAt(i+1)),s=2):a<240?(r=4096*(15&a)+64*(63&e.charCodeAt(i+1))+(63&e.charCodeAt(i+2)),s=3):(s=4,r=262144*(7&a)+4096*(63&e.charCodeAt(i+1))+64*(63&e.charCodeAt(i+2))+(63&e.charCodeAt(i+3)),o=55296+((r-=65536)>>>10&1023),r=56320+(1023&r)),0!==o&&(t[n++]=255&o,t[n++]=o>>>8,o=0),t[n++]=r%256,t[n++]=r>>>8;return t.slice(0,n).toString("ucs2")}function mC(e){return Ts(e,"binary").toString("utf8")}var Vc="foo bar baz\xe2\x98\x83\xf0\x9f\x8d\xa3",Tt=tt&&(mC(Vc)==Kh(Vc)&&mC||pC(Vc)==Kh(Vc)&&pC)||Kh,us=tt?function(e){return Ts(e,"utf8").toString("binary")}:function(e){for(var t=[],r=0,i=0,s=0;r<e.length;)switch(i=e.charCodeAt(r++),!0){case i<128:t.push(String.fromCharCode(i));break;case i<2048:t.push(String.fromCharCode(192+(i>>6))),t.push(String.fromCharCode(128+(63&i)));break;case i>=55296&&i<57344:i-=55296,s=e.charCodeAt(r++)-56320+(i<<10),t.push(String.fromCharCode(240+(s>>18&7))),t.push(String.fromCharCode(144+(s>>12&63))),t.push(String.fromCharCode(128+(s>>6&63))),t.push(String.fromCharCode(128+(63&s)));break;default:t.push(String.fromCharCode(224+(i>>12))),t.push(String.fromCharCode(128+(i>>6&63))),t.push(String.fromCharCode(128+(63&i)))}return t.join("")},Xa=function(){var e={};return function(r,i){var s=r+"|"+(i||"");return e[s]?e[s]:e[s]=new RegExp("<(?:\\w+:)?"+r+'(?: xml:space="preserve")?(?:[^>]*)>([\\s\\S]*?)</(?:\\w+:)?'+r+">",i||"")}}(),vC=function(){var e=[["nbsp"," "],["middot","\xb7"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map(function(t){return[new RegExp("&"+t[0]+";","ig"),t[1]]});return function(r){for(var i=r.replace(/^[\t\n\r ]+/,"").replace(/[\t\n\r ]+$/,"").replace(/>\s+/g,">").replace(/\s+</g,"<").replace(/[\t\n\r ]+/g," ").replace(/<\s*[bB][rR]\s*\/?>/g,"\n").replace(/<[^>]*>/g,""),s=0;s<e.length;++s)i=i.replace(e[s][0],e[s][1]);return i}}(),T_=function(){var e={};return function(r){return void 0!==e[r]?e[r]:e[r]=new RegExp("<(?:vt:)?"+r+">([\\s\\S]*?)</(?:vt:)?"+r+">","g")}}(),P_=/<\/?(?:vt:)?variant>/g,D_=/<(?:vt:)([^>]*)>([\s\S]*)</;function CC(e,t){var r=ze(e),i=e.match(T_(r.baseType))||[],s=[];if(i.length!=r.size){if(t.WTF)throw new Error("unexpected vector length "+i.length+" != "+r.size);return s}return i.forEach(function(n){var o=n.replace(P_,"").match(D_);o&&s.push({v:Tt(o[2]),t:o[1]})}),s}var wC=/(^\s|\s$|\n)/;function pe(e,t,r){return"<"+e+(null!=r?function xC(e){return Jt(e).map(function(t){return" "+t+'="'+e[t]+'"'}).join("")}(r):"")+(null!=t?(t.match(wC)?' xml:space="preserve"':"")+">"+t+"</"+e:"/")+">"}function Xh(e){if(tt&&Buffer.isBuffer(e))return e.toString("utf8");if("string"==typeof e)return e;if(typeof Uint8Array<"u"&&e instanceof Uint8Array)return Tt(ln(Nh(e)));throw new Error("Bad input format: expected Buffer or string")}var Ya=/<(\/?)([^\s?><!\/:]*:|)([^\s?<>:\/]+)(?:[\s?:\/][^>]*)?>/gm,hn=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"],SC=function(e){for(var t=[],i=0;i<e[0].length;++i)if(e[0][i])for(var s=0,n=e[0][i].length;s<n;s+=10240)t.push.apply(t,e[0][i].slice(s,s+10240));return t},bC=tt?function(e){return e[0].length>0&&Buffer.isBuffer(e[0][0])?Buffer.concat(e[0].map(function(t){return Buffer.isBuffer(t)?t:Ts(t)})):SC(e)}:SC,yC=function(e,t,r){for(var i=[],s=t;s<r;s+=2)i.push(String.fromCharCode(Ds(e,s)));return i.join("").replace(Hr,"")},zc=tt?function(e,t,r){return Buffer.isBuffer(e)?e.toString("utf16le",t,r).replace(Hr,""):yC(e,t,r)}:yC,EC=function(e,t,r){for(var i=[],s=t;s<t+r;++s)i.push(("0"+e[s].toString(16)).slice(-2));return i.join("")},FC=tt?function(e,t,r){return Buffer.isBuffer(e)?e.toString("hex",t,t+r):EC(e,t,r)}:EC,RC=function(e,t,r){for(var i=[],s=t;s<r;s++)i.push(String.fromCharCode($o(e,s)));return i.join("")},Uo=tt?function(t,r,i){return Buffer.isBuffer(t)?t.toString("utf8",r,i):RC(t,r,i)}:RC,kC=function(e,t){var r=yr(e,t);return r>0?Uo(e,t+4,t+4+r-1):""},Yh=kC,TC=function(e,t){var r=yr(e,t);return r>0?Uo(e,t+4,t+4+r-1):""},Qh=TC,PC=function(e,t){var r=2*yr(e,t);return r>0?Uo(e,t+4,t+4+r-1):""},Jh=PC,DC=function(t,r){var i=yr(t,r);return i>0?zc(t,r+4,r+4+i):""},Zh=DC,AC=function(e,t){var r=yr(e,t);return r>0?Uo(e,t+4,t+4+r):""},ef=AC,MC=function(e,t){return function M_(e,t){for(var r=1-2*(e[t+7]>>>7),i=((127&e[t+7])<<4)+(e[t+6]>>>4&15),s=15&e[t+6],n=5;n>=0;--n)s=256*s+e[t+n];return 2047==i?0==s?r*(1/0):NaN:(0==i?i=-1022:(i-=1023,s+=Math.pow(2,52)),r*Math.pow(2,i-52)*s)}(e,t)},Wc=MC,tf=function(t){return Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array};tt&&(Yh=function(t,r){if(!Buffer.isBuffer(t))return kC(t,r);var i=t.readUInt32LE(r);return i>0?t.toString("utf8",r+4,r+4+i-1):""},Qh=function(t,r){if(!Buffer.isBuffer(t))return TC(t,r);var i=t.readUInt32LE(r);return i>0?t.toString("utf8",r+4,r+4+i-1):""},Jh=function(t,r){if(!Buffer.isBuffer(t))return PC(t,r);var i=2*t.readUInt32LE(r);return t.toString("utf16le",r+4,r+4+i-1)},Zh=function(t,r){if(!Buffer.isBuffer(t))return DC(t,r);var i=t.readUInt32LE(r);return t.toString("utf16le",r+4,r+4+i)},ef=function(t,r){if(!Buffer.isBuffer(t))return AC(t,r);var i=t.readUInt32LE(r);return t.toString("utf8",r+4,r+4+i)},Wc=function(t,r){return Buffer.isBuffer(t)?t.readDoubleLE(r):MC(t,r)},tf=function(t){return Buffer.isBuffer(t)||Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array});var $o=function(e,t){return e[t]},Ds=function(e,t){return 256*e[t+1]+e[t]},__=function(e,t){var r=256*e[t+1]+e[t];return r<32768?r:-1*(65535-r+1)},yr=function(e,t){return e[t+3]*(1<<24)+(e[t+2]<<16)+(e[t+1]<<8)+e[t]},$n=function(e,t){return e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]},L_=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]};function Qa(e,t){var i,s,o,a,l,c,r="",n=[];switch(t){case"dbcs":if(c=this.l,tt&&Buffer.isBuffer(this))r=this.slice(this.l,this.l+2*e).toString("utf16le");else for(l=0;l<e;++l)r+=String.fromCharCode(Ds(this,c)),c+=2;e*=2;break;case"utf8":r=Uo(this,this.l,this.l+e);break;case"utf16le":r=zc(this,this.l,this.l+(e*=2));break;case"wstr":return Qa.call(this,e,"dbcs");case"lpstr-ansi":r=Yh(this,this.l),e=4+yr(this,this.l);break;case"lpstr-cp":r=Qh(this,this.l),e=4+yr(this,this.l);break;case"lpwstr":r=Jh(this,this.l),e=4+2*yr(this,this.l);break;case"lpp4":e=4+yr(this,this.l),r=Zh(this,this.l),2&e&&(e+=2);break;case"8lpp4":e=4+yr(this,this.l),r=ef(this,this.l),3&e&&(e+=4-(3&e));break;case"cstr":for(e=0,r="";0!==(o=$o(this,this.l+e++));)n.push(Ga(o));r=n.join("");break;case"_wstr":for(e=0,r="";0!==(o=Ds(this,this.l+e));)n.push(Ga(o)),e+=2;e+=2,r=n.join("");break;case"dbcs-cont":for(r="",c=this.l,l=0;l<e;++l){if(this.lens&&-1!==this.lens.indexOf(c))return o=$o(this,c),this.l=c+1,a=Qa.call(this,e-l,o?"dbcs-cont":"sbcs-cont"),n.join("")+a;n.push(Ga(Ds(this,c))),c+=2}r=n.join(""),e*=2;break;case"cpstr":0;case"sbcs-cont":for(r="",c=this.l,l=0;l!=e;++l){if(this.lens&&-1!==this.lens.indexOf(c))return o=$o(this,c),this.l=c+1,a=Qa.call(this,e-l,o?"dbcs-cont":"sbcs-cont"),n.join("")+a;n.push(Ga($o(this,c))),c+=1}r=n.join("");break;default:switch(e){case 1:return i=$o(this,this.l),this.l++,i;case 2:return i=("i"===t?__:Ds)(this,this.l),this.l+=2,i;case 4:case-4:return"i"!==t&&128&this[this.l+3]?(s=yr(this,this.l),this.l+=4,s):(i=(e>0?$n:L_)(this,this.l),this.l+=4,i);case 8:case-8:if("f"===t)return s=8==e?Wc(this,this.l):Wc([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,s;e=8;case 16:r=FC(this,this.l,e)}}return this.l+=e,r}var N_=function(e,t,r){e[r]=255&t,e[r+1]=t>>>8&255};function H_(e,t,r){var i=0,s=0;if("dbcs"===r){for(s=0;s!=t.length;++s)N_(this,t.charCodeAt(s),this.l+2*s);i=2*t.length}else if("sbcs"===r){for(t=t.replace(/[^\x00-\x7F]/g,"_"),s=0;s!=t.length;++s)this[this.l+s]=255&t.charCodeAt(s);i=t.length}else{if("hex"===r){for(;s<e;++s)this[this.l++]=parseInt(t.slice(2*s,2*s+2),16)||0;return this}if("utf16le"===r){var o=Math.min(this.l+e,this.length);for(s=0;s<Math.min(t.length,e);++s){var a=t.charCodeAt(s);this[this.l++]=255&a,this[this.l++]=a>>8}for(;this.l<o;)this[this.l++]=0;return this}switch(e){case 1:i=1,this[this.l]=255&t;break;case 2:i=2,this[this.l]=255&t,this[this.l+1]=255&(t>>>=8);break;case 3:i=3,this[this.l]=255&t,this[this.l+1]=255&(t>>>=8),this[this.l+2]=255&(t>>>=8);break;case 4:i=4,function(e,t,r){e[r]=255&t,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24&255}(this,t,this.l);break;case 8:if(i=8,"f"===r){!function I_(e,t,r){var i=(t<0||1/t==-1/0?1:0)<<7,s=0,n=0,o=i?-t:t;isFinite(o)?0==o?s=n=0:(s=Math.floor(Math.log(o)/Math.LN2),n=o*Math.pow(2,52-s),s<=-1023&&(!isFinite(n)||n<Math.pow(2,52))?s=-1022:(n-=Math.pow(2,52),s+=1023)):(s=2047,n=isNaN(t)?26985:0);for(var a=0;a<=5;++a,n/=256)e[r+a]=255&n;e[r+6]=(15&s)<<4|15&n,e[r+7]=s>>4|i}(this,t,this.l);break}case 16:break;case-4:i=4,function(e,t,r){e[r]=255&t,e[r+1]=t>>8&255,e[r+2]=t>>16&255,e[r+3]=t>>24&255}(this,t,this.l)}}return this.l+=i,this}function _C(e,t){var r=FC(this,this.l,e.length>>1);if(r!==e)throw new Error(t+"Expected "+e+" saw "+r);this.l+=e.length>>1}function Mr(e,t){e.l=t,e.read_shift=Qa,e.chk=_C,e.write_shift=H_}function Vr(e,t){e.l+=t}function J(e){var t=an(e);return Mr(t,0),t}function As(e,t,r){if(e){var i,s,n;Mr(e,e.l||0);for(var o=e.length,a=0,l=0;e.l<o;){128&(a=e.read_shift(1))&&(a=(127&a)+((127&e.read_shift(1))<<7));var c=ml[a]||ml[65535];for(n=127&(i=e.read_shift(1)),s=1;s<4&&128&i;++s)n+=(127&(i=e.read_shift(1)))<<7*s;l=e.l+n;var d=c.f&&c.f(e,n,r);if(e.l=l,t(d,c,a))return}}}function ei(){var e=[],t=tt?256:2048,r=function(c){var d=J(c);return Mr(d,0),d},i=r(t),s=function(){i&&(i.length>i.l&&((i=i.slice(0,i.l)).l=i.length),i.length>0&&e.push(i),i=null)},n=function(c){return i&&c<i.length-i.l?i:(s(),i=r(Math.max(c+1,t)))};return{next:n,push:function(c){s(),null==(i=c).l&&(i.l=i.length),n(t)},end:function(){return s(),br(e)},_bufs:e}}function Ja(e,t,r){var i=Pt(e);if(t.s?(i.cRel&&(i.c+=t.s.c),i.rRel&&(i.r+=t.s.r)):(i.cRel&&(i.c+=t.c),i.rRel&&(i.r+=t.r)),!r||r.biff<12){for(;i.c>=256;)i.c-=256;for(;i.r>=65536;)i.r-=65536}return i}function LC(e,t,r){var i=Pt(e);return i.s=Ja(i.s,t.s,r),i.e=Ja(i.e,t.s,r),i}function Za(e,t){if(e.cRel&&e.c<0)for(e=Pt(e);e.c<0;)e.c+=t>8?16384:256;if(e.rRel&&e.r<0)for(e=Pt(e);e.r<0;)e.r+=t>8?1048576:t>5?65536:16384;var r=We(e);return!e.cRel&&null!=e.cRel&&(r=function z_(e){return e.replace(/^([A-Z])/,"$$$1")}(r)),!e.rRel&&null!=e.rRel&&(r=function G_(e){return e.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}(r)),r}function rf(e,t){return 0!=e.s.r||e.s.rRel||e.e.r!=(t.biff>=12?1048575:t.biff>=8?65536:16384)||e.e.rRel?0!=e.s.c||e.s.cRel||e.e.c!=(t.biff>=12?16383:255)||e.e.cRel?Za(e.s,t.biff)+":"+Za(e.e,t.biff):(e.s.rRel?"":"$")+er(e.s.r)+":"+(e.e.rRel?"":"$")+er(e.e.r):(e.s.cRel?"":"$")+Lt(e.s.c)+":"+(e.e.cRel?"":"$")+Lt(e.e.c)}function sf(e){return parseInt(function V_(e){return e.replace(/\$(\d+)$/,"$1")}(e),10)-1}function er(e){return""+(e+1)}function nf(e){for(var t=function W_(e){return e.replace(/^\$([A-Z])/,"$1")}(e),r=0,i=0;i!==t.length;++i)r=26*r+t.charCodeAt(i)-64;return r-1}function Lt(e){if(e<0)throw new Error("invalid column "+e);var t="";for(++e;e;e=Math.floor((e-1)/26))t=String.fromCharCode((e-1)%26+65)+t;return t}function qt(e){for(var t=0,r=0,i=0;i<e.length;++i){var s=e.charCodeAt(i);s>=48&&s<=57?t=10*t+(s-48):s>=65&&s<=90&&(r=26*r+(s-64))}return{c:r-1,r:t-1}}function We(e){for(var t=e.c+1,r="";t;t=(t-1)/26|0)r=String.fromCharCode((t-1)%26+65)+r;return r+(e.r+1)}function yi(e){var t=e.indexOf(":");return-1==t?{s:qt(e),e:qt(e)}:{s:qt(e.slice(0,t)),e:qt(e.slice(t+1))}}function Ke(e,t){return typeof t>"u"||"number"==typeof t?Ke(e.s,e.e):("string"!=typeof e&&(e=We(e)),"string"!=typeof t&&(t=We(t)),e==t?e:e+":"+t)}function ot(e){var t={s:{c:0,r:0},e:{c:0,r:0}},r=0,i=0,s=0,n=e.length;for(r=0;i<n&&!((s=e.charCodeAt(i)-64)<1||s>26);++i)r=26*r+s;for(t.s.c=--r,r=0;i<n&&!((s=e.charCodeAt(i)-48)<0||s>9);++i)r=10*r+s;if(t.s.r=--r,i===n||10!=s)return t.e.c=t.s.c,t.e.r=t.s.r,t;for(++i,r=0;i!=n&&!((s=e.charCodeAt(i)-64)<1||s>26);++i)r=26*r+s;for(t.e.c=--r,r=0;i!=n&&!((s=e.charCodeAt(i)-48)<0||s>9);++i)r=10*r+s;return t.e.r=--r,t}function hs(e,t,r){return null==e||null==e.t||"z"==e.t?"":void 0!==e.w?e.w:("d"==e.t&&!e.z&&r&&r.dateNF&&(e.z=r.dateNF),"e"==e.t?Ms[e.v]||e.v:function OC(e,t){var r="d"==e.t&&t instanceof Date;if(null!=e.z)try{return e.w=xi(e.z,r?wr(t):t)}catch{}try{return e.w=xi((e.XF||{}).numFmtId||(r?14:0),r?wr(t):t)}catch{return""+t}}(e,null==t?e.v:t))}function fn(e,t){var r=t&&t.sheet?t.sheet:"Sheet1",i={};return i[r]=e,{SheetNames:[r],Sheets:i}}function BC(e,t,r){var i=r||{},s=e?Array.isArray(e):i.dense,n=e||(s?[]:{}),o=0,a=0;if(n&&null!=i.origin){if("number"==typeof i.origin)o=i.origin;else{var l="string"==typeof i.origin?qt(i.origin):i.origin;o=l.r,a=l.c}n["!ref"]||(n["!ref"]="A1:A1")}var c={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(n["!ref"]){var d=ot(n["!ref"]);c.s.c=d.s.c,c.s.r=d.s.r,c.e.c=Math.max(c.e.c,d.e.c),c.e.r=Math.max(c.e.r,d.e.r),-1==o&&(c.e.r=o=d.e.r+1)}for(var u=0;u!=t.length;++u)if(t[u]){if(!Array.isArray(t[u]))throw new Error("aoa_to_sheet expects an array of arrays");for(var h=0;h!=t[u].length;++h)if(!(typeof t[u][h]>"u")){var f={v:t[u][h]},p=o+u,g=a+h;if(c.s.r>p&&(c.s.r=p),c.s.c>g&&(c.s.c=g),c.e.r<p&&(c.e.r=p),c.e.c<g&&(c.e.c=g),!t[u][h]||"object"!=typeof t[u][h]||Array.isArray(t[u][h])||t[u][h]instanceof Date)if(Array.isArray(f.v)&&(f.f=t[u][h][1],f.v=f.v[0]),null===f.v)if(f.f)f.t="n";else if(i.nullError)f.t="e",f.v=0;else{if(!i.sheetStubs)continue;f.t="z"}else"number"==typeof f.v?f.t="n":"boolean"==typeof f.v?f.t="b":f.v instanceof Date?(f.z=i.dateNF||Be[14],i.cellDates?(f.t="d",f.w=xi(f.z,wr(f.v))):(f.t="n",f.v=wr(f.v),f.w=xi(f.z,f.v))):f.t="s";else f=t[u][h];if(s)n[p]||(n[p]=[]),n[p][g]&&n[p][g].z&&(f.z=n[p][g].z),n[p][g]=f;else{var m=We({c:g,r:p});n[m]&&n[m].z&&(f.z=n[m].z),n[m]=f}}}return c.s.c<1e7&&(n["!ref"]=Ke(c)),n}function jo(e,t){return BC(null,e,t)}function zr(e){var t=e.read_shift(4);return 0===t?"":e.read_shift(t,"dbcs")}function j_(e){return{ich:e.read_shift(2),ifnt:e.read_shift(2)}}function of(e,t){var r=e.l,i=e.read_shift(1),s=zr(e),n=[],o={t:s,h:s};if(1&i){for(var a=e.read_shift(4),l=0;l!=a;++l)n.push(j_(e));o.r=n}else o.r=[{ich:0,ifnt:0}];return e.l=r+t,o}var q_=of;function _i(e){var t=e.read_shift(4),r=e.read_shift(2);return r+=e.read_shift(1)<<16,e.l++,{c:t,iStyleRef:r}}function Kn(e){var t=e.read_shift(2);return t+=e.read_shift(1)<<16,e.l++,{c:-1,iStyleRef:t}}var Y_=zr;function af(e){var t=e.read_shift(4);return 0===t||4294967295===t?"":e.read_shift(t,"dbcs")}var Q_=zr,cf=af;function uf(e){var t=e.slice(e.l,e.l+4),r=1&t[0],i=2&t[0];e.l+=4;var s=0===i?Wc([0,0,0,0,252&t[0],t[1],t[2],t[3]],0):$n(t,0)>>2;return r?s/100:s}function GC(e){var t={s:{},e:{}};return t.s.r=e.read_shift(4),t.e.r=e.read_shift(4),t.s.c=e.read_shift(4),t.e.c=e.read_shift(4),t}var Xn=GC;function Wr(e){if(e.length-e.l<8)throw"XLS Xnum Buffer underflow";return e.read_shift(8,"f")}function VC(e,t){var i=e.read_shift(4);switch(i){case 0:return"";case 4294967295:case 4294967294:return{2:"BITMAP",3:"METAFILEPICT",8:"DIB",14:"ENHMETAFILE"}[e.read_shift(4)]||""}if(i>400)throw new Error("Unsupported Clipboard: "+i.toString(16));return e.l-=4,e.read_shift(0,1==t?"lpstr":"lpwstr")}var a8=[80,81],ff={1:{n:"CodePage",t:2},2:{n:"Category",t:80},3:{n:"PresentationFormat",t:80},4:{n:"ByteCount",t:3},5:{n:"LineCount",t:3},6:{n:"ParagraphCount",t:3},7:{n:"SlideCount",t:3},8:{n:"NoteCount",t:3},9:{n:"HiddenCount",t:3},10:{n:"MultimediaClipCount",t:3},11:{n:"ScaleCrop",t:11},12:{n:"HeadingPairs",t:4108},13:{n:"TitlesOfParts",t:4126},14:{n:"Manager",t:80},15:{n:"Company",t:80},16:{n:"LinksUpToDate",t:11},17:{n:"CharacterCount",t:3},19:{n:"SharedDoc",t:11},22:{n:"HyperlinksChanged",t:11},23:{n:"AppVersion",t:3,p:"version"},24:{n:"DigSig",t:65},26:{n:"ContentType",t:80},27:{n:"ContentStatus",t:80},28:{n:"Language",t:80},29:{n:"Version",t:80},255:{},2147483648:{n:"Locale",t:19},2147483651:{n:"Behavior",t:19},1919054434:{}},gf={1:{n:"CodePage",t:2},2:{n:"Title",t:80},3:{n:"Subject",t:80},4:{n:"Author",t:80},5:{n:"Keywords",t:80},6:{n:"Comments",t:80},7:{n:"Template",t:80},8:{n:"LastAuthor",t:80},9:{n:"RevNumber",t:80},10:{n:"EditTime",t:64},11:{n:"LastPrinted",t:64},12:{n:"CreatedDate",t:64},13:{n:"ModifiedDate",t:64},14:{n:"PageCount",t:3},15:{n:"WordCount",t:3},16:{n:"CharCount",t:3},17:{n:"Thumbnail",t:71},18:{n:"Application",t:80},19:{n:"DocSecurity",t:3},255:{},2147483648:{n:"Locale",t:19},2147483651:{n:"Behavior",t:19},1919054434:{}},UC={1:"US",2:"CA",3:"",7:"RU",20:"EG",30:"GR",31:"NL",32:"BE",33:"FR",34:"ES",36:"HU",39:"IT",41:"CH",43:"AT",44:"GB",45:"DK",46:"SE",47:"NO",48:"PL",49:"DE",52:"MX",55:"BR",61:"AU",64:"NZ",66:"TH",81:"JP",82:"KR",84:"VN",86:"CN",90:"TR",105:"JS",213:"DZ",216:"MA",218:"LY",351:"PT",354:"IS",358:"FI",420:"CZ",886:"TW",961:"LB",962:"JO",963:"SY",964:"IQ",965:"KW",966:"SA",971:"AE",972:"IL",974:"QA",981:"IR",65535:"US"},l8=[null,"solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"];function c8(e){return e.map(function(t){return[t>>16&255,t>>8&255,255&t]})}var Qn=Pt(c8([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])),Ms={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},$C={"#NULL!":0,"#DIV/0!":7,"#VALUE!":15,"#REF!":23,"#NAME?":29,"#NUM!":36,"#N/A":42,"#GETTING_DATA":43,"#WTF?":255},pf={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"},qe={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",XLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",CXML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",CXMLP:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",CHART:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",CHARTEX:"http://schemas.microsoft.com/office/2014/relationships/chartEx",CS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet",MS:"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",IMG:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function el(e){var t=e.lastIndexOf("/");return e.slice(0,t+1)+"_rels/"+e.slice(t+1)+".rels"}function tl(e,t){var r={"!id":{}};if(!e)return r;"/"!==t.charAt(0)&&(t="/"+t);var i={};return(e.match(Gr)||[]).forEach(function(s){var n=ze(s);if("<Relationship"===n[0]){var o={};o.Type=n.Type,o.Target=n.Target,o.Id=n.Id,n.TargetMode&&(o.TargetMode=n.TargetMode);var a="External"===n.TargetMode?n.Target:qa(n.Target,t);r[a]=o,i[n.Id]=o}}),r["!id"]=i,r}var Li=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]],C8=function(){for(var e=new Array(Li.length),t=0;t<Li.length;++t){var r=Li[t],i="(?:"+r[0].slice(0,r[0].indexOf(":"))+":)"+r[0].slice(r[0].indexOf(":")+1);e[t]=new RegExp("<"+i+"[^>]*>([\\s\\S]*?)</"+i+">")}return e}();function qC(e){var t={};e=Tt(e);for(var r=0;r<Li.length;++r){var i=Li[r],s=e.match(C8[r]);null!=s&&s.length>0&&(t[i[1]]=ut(s[1])),"date"===i[2]&&t[i[1]]&&(t[i[1]]=Kt(t[i[1]]))}return t}var Jn=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]];function QC(e,t,r,i){var s=[];if("string"==typeof e)s=CC(e,i);else for(var n=0;n<e.length;++n)s=s.concat(e[n].map(function(d){return{v:d}}));var o="string"==typeof t?CC(t,i).map(function(d){return d.v}):t,a=0,l=0;if(o.length>0)for(var c=0;c!==s.length;c+=2){switch(l=+s[c+1].v,s[c].v){case"Worksheets":case"\u5de5\u4f5c\u8868":case"\u041b\u0438\u0441\u0442\u044b":case"\u0623\u0648\u0631\u0627\u0642 \u0627\u0644\u0639\u0645\u0644":case"\u30ef\u30fc\u30af\u30b7\u30fc\u30c8":case"\u05d2\u05dc\u05d9\u05d5\u05e0\u05d5\u05ea \u05e2\u05d1\u05d5\u05d3\u05d4":case"Arbeitsbl\xe4tter":case"\xc7al\u0131\u015fma Sayfalar\u0131":case"Feuilles de calcul":case"Fogli di lavoro":case"Folhas de c\xe1lculo":case"Planilhas":case"Regneark":case"Hojas de c\xe1lculo":case"Werkbladen":r.Worksheets=l,r.SheetNames=o.slice(a,a+l);break;case"Named Ranges":case"Rangos con nombre":case"\u540d\u524d\u4ed8\u304d\u4e00\u89a7":case"Benannte Bereiche":case"Navngivne omr\xe5der":r.NamedRanges=l,r.DefinedNames=o.slice(a,a+l);break;case"Charts":case"Diagramme":r.Chartsheets=l,r.ChartNames=o.slice(a,a+l)}a+=l}}var wf,x8=/<[^>]+>[^<]*/g,Cf={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"};function b8(e,t,r){wf||(wf=Bc(Cf)),e[t=wf[t]||t]=r}function xf(e){var t=e.read_shift(4),r=e.read_shift(4);return new Date(1e3*(r/1e7*Math.pow(2,32)+t/1e7-11644473600)).toISOString().replace(/\.000/,"")}function ew(e,t,r){var i=e.l,s=e.read_shift(0,"lpstr-cp");if(r)for(;e.l-i&3;)++e.l;return s}function tw(e,t,r){var i=e.read_shift(0,"lpwstr");return r&&(e.l+=4-(i.length+1&3)&3),i}function rw(e,t,r){return 31===t?tw(e):ew(e,0,r)}function Sf(e,t,r){return rw(e,t,!1===r?0:4)}function P8(e){var t=e.l,r=Yc(e,81);return 0==e[e.l]&&0==e[e.l+1]&&e.l-t&2&&(e.l+=2),[r,Yc(e,3)]}function iw(e,t){for(var r=e.read_shift(4),i={},s=0;s!=r;++s){var n=e.read_shift(4),o=e.read_shift(4);i[n]=e.read_shift(o,1200===t?"utf16le":"utf8").replace(Hr,"").replace(Ua,"!"),1200===t&&o%2&&(e.l+=2)}return 3&e.l&&(e.l=e.l>>3<<2),i}function sw(e){var t=e.read_shift(4),r=e.slice(e.l,e.l+t);return e.l+=t,(3&t)>0&&(e.l+=4-(3&t)&3),r}function Yc(e,t,r){var s,i=e.read_shift(2),n=r||{};if(e.l+=2,12!==t&&i!==t&&-1===a8.indexOf(t)&&(4126!=(65534&t)||4126!=(65534&i)))throw new Error("Expected type "+t+" saw "+i);switch(12===t?i:t){case 2:return s=e.read_shift(2,"i"),n.raw||(e.l+=2),s;case 3:return e.read_shift(4,"i");case 11:return 0!==e.read_shift(4);case 19:return e.read_shift(4);case 30:return ew(e,0,4).replace(Hr,"");case 31:return tw(e);case 64:return xf(e);case 65:return sw(e);case 71:return function A8(e){var t={};return t.Size=e.read_shift(4),e.l+=t.Size+3-(t.Size-1)%4,t}(e);case 80:return Sf(e,i,!n.raw).replace(Hr,"");case 81:return function R8(e,t){if(!t)throw new Error("VtUnalignedString must have positive length");return rw(e,t,0)}(e,i).replace(Hr,"");case 4108:return function D8(e){for(var t=e.read_shift(4),r=[],i=0;i<t/2;++i)r.push(P8(e));return r}(e);case 4126:case 4127:return 4127==i?function k8(e){for(var t=e.read_shift(4),r=[],i=0;i!=t;++i){var s=e.l;r[i]=e.read_shift(0,"lpwstr").replace(Hr,""),e.l-s&2&&(e.l+=2)}return r}(e):function T8(e){for(var t=e.read_shift(4),r=[],i=0;i!=t;++i)r[i]=e.read_shift(0,"lpstr-cp").replace(Hr,"");return r}(e);default:throw new Error("TypedPropertyValue unrecognized type "+t+" "+i)}}function ow(e,t){var r=e.l,i=e.read_shift(4),s=e.read_shift(4),n=[],o=0,a=0,l=-1,c={};for(o=0;o!=s;++o){var d=e.read_shift(4),u=e.read_shift(4);n[o]=[d,u+r]}n.sort(function(w,C){return w[1]-C[1]});var h={};for(o=0;o!=s;++o){if(e.l!==n[o][1]){var f=!0;if(o>0&&t)switch(t[n[o-1][0]].t){case 2:e.l+2===n[o][1]&&(e.l+=2,f=!1);break;case 80:case 4108:e.l<=n[o][1]&&(e.l=n[o][1],f=!1)}if((!t||0==o)&&e.l<=n[o][1]&&(f=!1,e.l=n[o][1]),f)throw new Error("Read Error: Expected address "+n[o][1]+" at "+e.l+" :"+o)}if(t){var p=t[n[o][0]];if(h[p.n]=Yc(e,p.t,{raw:!0}),"version"===p.p&&(h[p.n]=String(h[p.n]>>16)+"."+("0000"+String(65535&h[p.n])).slice(-4)),"CodePage"==p.n)switch(h[p.n]){case 0:h[p.n]=1252;case 874:case 932:case 936:case 949:case 950:case 1250:case 1251:case 1253:case 1254:case 1255:case 1256:case 1257:case 1258:case 1e4:case 1200:case 1201:case 1252:case 65e3:case-536:case 65001:case-535:Ai(a=h[p.n]>>>0&65535);break;default:throw new Error("Unsupported CodePage: "+h[p.n])}}else if(1===n[o][0]){if(a=h.CodePage=Yc(e,2),Ai(a),-1!==l){var g=e.l;e.l=n[l][1],c=iw(e,a),e.l=g}}else if(0===n[o][0]){if(0===a){l=o,e.l=n[o+1][1];continue}c=iw(e,a)}else{var v,m=c[n[o][0]];switch(e[e.l]){case 65:e.l+=4,v=sw(e);break;case 30:case 31:e.l+=4,v=Sf(e,e[e.l-4]).replace(/\u0000+$/,"");break;case 3:e.l+=4,v=e.read_shift(4,"i");break;case 19:e.l+=4,v=e.read_shift(4);break;case 5:e.l+=4,v=e.read_shift(8,"f");break;case 11:e.l+=4,v=or(e,4);break;case 64:e.l+=4,v=Kt(xf(e));break;default:throw new Error("unparsed value: "+e[e.l])}h[m]=v}}return e.l=r+i,h}function cw(e,t,r){var i=e.content;if(!i)return{};Mr(i,0);var s,n,o,a,l=0;i.chk("feff","Byte Order: "),i.read_shift(2);var c=i.read_shift(4),d=i.read_shift(16);if(d!==Le.utils.consts.HEADER_CLSID&&d!==r)throw new Error("Bad PropertySet CLSID "+d);if(1!==(s=i.read_shift(4))&&2!==s)throw new Error("Unrecognized #Sets: "+s);if(n=i.read_shift(16),a=i.read_shift(4),1===s&&a!==i.l)throw new Error("Length mismatch: "+a+" !== "+i.l);2===s&&(o=i.read_shift(16),l=i.read_shift(4));var p,u=ow(i,t),h={SystemIdentifier:c};for(var f in u)h[f]=u[f];if(h.FMTID=n,1===s)return h;if(l-i.l==2&&(i.l+=2),i.l!==l)throw new Error("Length mismatch 2: "+i.l+" !== "+l);try{p=ow(i,null)}catch{}for(f in p)h[f]=p[f];return h.FMTID=[n,o],h}function gn(e,t){return e.read_shift(t),null}function or(e,t){return 1===e.read_shift(t)}function hr(e){return e.read_shift(2,"u")}function uw(e,t){return function _8(e,t,r){for(var i=[],s=e.l+t;e.l<s;)i.push(r(e,s-e.l));if(s!==e.l)throw new Error("Slurp error");return i}(e,t,hr)}function rl(e,t,r){var i=e.read_shift(r&&r.biff>=12?2:1),s="sbcs-cont",n=vi;r&&r.biff>=8&&(vi=1200),r&&8!=r.biff?12==r.biff&&(s="wstr"):e.read_shift(1)&&(s="dbcs-cont"),r.biff>=2&&r.biff<=5&&(s="cpstr");var a=i?e.read_shift(i,s):"";return vi=n,a}function O8(e){var t=vi;vi=1200;var l,r=e.read_shift(2),i=e.read_shift(1),s=4&i,n=8&i,o=1+(1&i),a=0,c={};n&&(a=e.read_shift(2)),s&&(l=e.read_shift(4));var u=0===r?"":e.read_shift(r,2==o?"dbcs-cont":"sbcs-cont");return n&&(e.l+=4*a),s&&(e.l+=l),c.t=u,n||(c.raw="<t>"+c.t+"</t>",c.r=c.t),vi=t,c}function Zn(e,t,r){if(r){if(r.biff>=2&&r.biff<=5)return e.read_shift(t,"cpstr");if(r.biff>=12)return e.read_shift(t,"dbcs-cont")}var s=e.read_shift(1);return e.read_shift(t,0===s?"sbcs-cont":"dbcs-cont")}function il(e,t,r){var i=e.read_shift(r&&2==r.biff?1:2);return 0===i?(e.l++,""):Zn(e,i,r)}function eo(e,t,r){if(r.biff>5)return il(e,0,r);var i=e.read_shift(1);return 0===i?(e.l++,""):e.read_shift(i,r.biff<=4||!e.lens?"cpstr":"sbcs-cont")}function Qc(e){var t=e.read_shift(4);return t>0?e.read_shift(t,"utf16le").replace(Hr,""):""}function pw(e){return[e.read_shift(1),e.read_shift(1),e.read_shift(1),e.read_shift(1)]}function mw(e,t){var r=pw(e);return r[3]=0,r}function fs(e){return{r:e.read_shift(2),c:e.read_shift(2),ixfe:e.read_shift(2)}}function j8(e,t,r){var i=r.biff>8?4:2;return[e.read_shift(i),e.read_shift(i,"i"),e.read_shift(i,"i")]}function vw(e){return[e.read_shift(2),uf(e)]}function Jc(e){var t=e.read_shift(2),r=e.read_shift(2);return{s:{c:e.read_shift(2),r:t},e:{c:e.read_shift(2),r}}}function ww(e){var t=e.read_shift(2),r=e.read_shift(2);return{s:{c:e.read_shift(1),r:t},e:{c:e.read_shift(1),r}}}var q8=ww;function xw(e){e.l+=4;var t=e.read_shift(2),r=e.read_shift(2),i=e.read_shift(2);return e.l+=12,[r,t,i]}function Ur(e){e.l+=2,e.l+=e.read_shift(2)}var Q8={0:Ur,4:Ur,5:Ur,6:Ur,7:function Y8(e){return e.l+=4,e.cf=e.read_shift(2),{}},8:Ur,9:Ur,10:Ur,11:Ur,12:Ur,13:function X8(e){var t={};return e.l+=4,e.l+=16,t.fSharedNote=e.read_shift(2),e.l+=4,t},14:Ur,15:Ur,16:Ur,17:Ur,18:Ur,19:Ur,20:Ur,21:xw};function Zc(e,t){var r={BIFFVer:0,dt:0};switch(r.BIFFVer=e.read_shift(2),(t-=2)>=2&&(r.dt=e.read_shift(2),e.l-=2),r.BIFFVer){case 1536:case 1280:case 1024:case 768:case 512:case 2:case 7:break;default:if(t>6)throw new Error("Unexpected BIFF Ver "+r.BIFFVer)}return e.read_shift(t),r}function Sw(e,t,r){var i=0;r&&2==r.biff||(i=e.read_shift(2));var s=e.read_shift(2);return r&&2==r.biff&&(i=1-(s>>15),s&=32767),[{Unsynced:1&i,DyZero:(2&i)>>1,ExAsc:(4&i)>>2,ExDsc:(8&i)>>3},s]}var EL=eo;function bw(e,t,r){var i=e.l+t,s=8!=r.biff&&r.biff?2:4,n=e.read_shift(s),o=e.read_shift(s),a=e.read_shift(2),l=e.read_shift(2);return e.l=i,{s:{r:n,c:a},e:{r:o,c:l}}}function Ew(e,t,r){var i=fs(e);(2==r.biff||9==t)&&++e.l;var s=function L8(e){var t=e.read_shift(1);return 1===e.read_shift(1)?t:1===t}(e);return i.val=s,i.t=!0===s||!1===s?"b":"e",i}var Fw=function $8(e,t,r){return 0===t?"":eo(e,0,r)};function Rw(e,t,r){var s,i=e.read_shift(2),n={fBuiltIn:1&i,fWantAdvise:i>>>1&1,fWantPict:i>>>2&1,fOle:i>>>3&1,fOleLink:i>>>4&1,cf:i>>>5&1023,fIcon:i>>>15&1};return 14849===r.sbcch&&(s=function K8(e,t,r){e.l+=4;var i=e.l+(t-=4),s=rl(e,0,r),n=e.read_shift(2);if(n!==(i-=e.l))throw new Error("Malformed AddinUdf: padding = "+i+" != "+n);return e.l+=n,s}(e,t-2,r)),n.body=s||e.read_shift(t-2),"string"==typeof s&&(n.Name=s),n}var BL=["_xlnm.Consolidate_Area","_xlnm.Auto_Open","_xlnm.Auto_Close","_xlnm.Extract","_xlnm.Database","_xlnm.Criteria","_xlnm.Print_Area","_xlnm.Print_Titles","_xlnm.Recorder","_xlnm.Data_Form","_xlnm.Auto_Activate","_xlnm.Auto_Deactivate","_xlnm.Sheet_Title","_xlnm._FilterDatabase"];function kw(e,t,r){var i=e.l+t,s=e.read_shift(2),n=e.read_shift(1),o=e.read_shift(1),a=e.read_shift(r&&2==r.biff?1:2),l=0;(!r||r.biff>=5)&&(5!=r.biff&&(e.l+=2),l=e.read_shift(2),5==r.biff&&(e.l+=2),e.l+=4);var c=Zn(e,o,r);32&s&&(c=BL[c.charCodeAt(0)]);var d=i-e.l;r&&2==r.biff&&--d;var u=i!=e.l&&0!==a&&d>0?function JB(e,t,r,i){var o,s=e.l+t,n=ul(e,i,r);return s!==e.l&&(o=dl(e,s-e.l,n,r)),[n,o]}(e,d,r,a):[];return{chKey:n,Name:c,itab:l,rgce:u}}function Tw(e,t,r){if(r.biff<8)return function NL(e,t,r){3==e[e.l+1]&&e[e.l]++;var i=rl(e,0,r);return 3==i.charCodeAt(0)?i.slice(1):i}(e,0,r);for(var i=[],s=e.l+t,n=e.read_shift(r.biff>8?4:2);0!==n--;)i.push(j8(e,0,r));if(e.l!=s)throw new Error("Bad ExternSheet: "+e.l+" != "+s);return i}function Pw(e,t,r){var i=q8(e,6);switch(r.biff){case 2:e.l++,t-=7;break;case 3:case 4:e.l+=2,t-=8;break;default:e.l+=6,t-=12}return[i,YB(e,t,r)]}var KL={8:function(e,t){var r=e.l+t;e.l+=10;var i=e.read_shift(2);e.l+=4,e.l+=2,e.l+=2,e.l+=2,e.l+=4;var s=e.read_shift(1);return e.l+=s,e.l=r,{fmt:i}}};function Dw(e,t,r){if(!r.cellStyles)return Vr(e,t);var i=r&&r.biff>=12?4:2,s=e.read_shift(i),n=e.read_shift(i),o=e.read_shift(i),a=e.read_shift(i),l=e.read_shift(2);2==i&&(e.l+=2);var c={s,e:n,w:o,ixfe:a,flags:l};return(r.biff>=5||!r.biff)&&(c.level=l>>8&7),c}var c5=fs,d5=uw,u5=il,S5=[2,3,48,49,131,139,140,245],yf=function(){var e={1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127,8:865,9:437,10:850,11:437,13:437,14:850,15:437,16:850,17:437,18:850,19:932,20:850,21:437,22:850,23:865,24:437,25:437,26:850,27:437,28:863,29:850,31:852,34:852,35:852,36:860,37:850,38:866,55:850,64:852,77:936,78:949,79:950,80:874,87:1252,88:1252,89:1252,108:863,134:737,135:852,136:857,204:1257,255:16969},t=Bc({1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127});function i(a,l){var c=l||{};c.dateNF||(c.dateNF="yyyymmdd");var d=jo(function r(a,l){var c=[],d=an(1);switch(l.type){case"base64":d=wi(Ci(a));break;case"binary":d=wi(a);break;case"buffer":case"array":d=a}Mr(d,0);var u=d.read_shift(1),h=!!(136&u),f=!1,p=!1;switch(u){case 2:case 3:case 131:case 139:case 245:break;case 48:case 49:f=!0,h=!0;break;case 140:p=!0;break;default:throw new Error("DBF Unsupported Version: "+u.toString(16))}var g=0,m=521;2==u&&(g=d.read_shift(2)),d.l+=3,2!=u&&(g=d.read_shift(4)),g>1048576&&(g=1e6),2!=u&&(m=d.read_shift(2));var v=d.read_shift(2),w=l.codepage||1252;2!=u&&(d.l+=16,d.read_shift(1),0!==d[d.l]&&(w=e[d[d.l]]),d.l+=1,d.l+=2),p&&(d.l+=36);for(var C=[],y={},k=Math.min(d.length,2==u?521:m-10-(f?264:0)),E=p?32:11;d.l<k&&13!=d[d.l];)switch(y={},y.name=lt.utils.decode(w,d.slice(d.l,d.l+E)).replace(/[\u0000\r\n].*$/g,""),d.l+=E,y.type=String.fromCharCode(d.read_shift(1)),2!=u&&!p&&(y.offset=d.read_shift(4)),y.len=d.read_shift(1),2==u&&(y.offset=d.read_shift(2)),y.dec=d.read_shift(1),y.name.length&&C.push(y),2!=u&&(d.l+=p?13:14),y.type){case"B":(!f||8!=y.len)&&l.WTF&&console.log("Skipping "+y.name+":"+y.type);break;case"G":case"P":l.WTF&&console.log("Skipping "+y.name+":"+y.type);break;case"+":case"0":case"@":case"C":case"D":case"F":case"I":case"L":case"M":case"N":case"O":case"T":case"Y":break;default:throw new Error("Unknown Field Type: "+y.type)}if(13!==d[d.l]&&(d.l=m-1),13!==d.read_shift(1))throw new Error("DBF Terminator not found "+d.l+" "+d[d.l]);d.l=m;var S=0,_=0;for(c[0]=[],_=0;_!=C.length;++_)c[0][_]=C[_].name;for(;g-- >0;)if(42!==d[d.l])for(++d.l,c[++S]=[],_=0,_=0;_!=C.length;++_){var M=d.slice(d.l,d.l+C[_].len);d.l+=C[_].len,Mr(M,0);var H=lt.utils.decode(w,M);switch(C[_].type){case"C":H.trim().length&&(c[S][_]=H.replace(/\s+$/,""));break;case"D":c[S][_]=8===H.length?new Date(+H.slice(0,4),+H.slice(4,6)-1,+H.slice(6,8)):H;break;case"F":c[S][_]=parseFloat(H.trim());break;case"+":case"I":c[S][_]=p?2147483648^M.read_shift(-4,"i"):M.read_shift(4,"i");break;case"L":switch(H.trim().toUpperCase()){case"Y":case"T":c[S][_]=!0;break;case"N":case"F":c[S][_]=!1;break;case"":case"?":break;default:throw new Error("DBF Unrecognized L:|"+H+"|")}break;case"M":if(!h)throw new Error("DBF Unexpected MEMO for type "+u.toString(16));c[S][_]="##MEMO##"+(p?parseInt(H.trim(),10):M.read_shift(4));break;case"N":(H=H.replace(/\u0000/g,"").trim())&&"."!=H&&(c[S][_]=+H||0);break;case"@":c[S][_]=new Date(M.read_shift(-8,"f")-621356832e5);break;case"T":c[S][_]=new Date(864e5*(M.read_shift(4)-2440588)+M.read_shift(4));break;case"Y":c[S][_]=M.read_shift(4,"i")/1e4+M.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":c[S][_]=-M.read_shift(-8,"f");break;case"B":if(f&&8==C[_].len){c[S][_]=M.read_shift(8,"f");break}case"G":case"P":M.l+=C[_].len;break;case"0":if("_NullFlags"===C[_].name)break;default:throw new Error("DBF Unsupported data type "+C[_].type)}}else d.l+=v;if(2!=u&&d.l<d.length&&26!=d[d.l++])throw new Error("DBF EOF Marker missing "+(d.l-1)+" of "+d.length+" "+d[d.l-1].toString(16));return l&&l.sheetRows&&(c=c.slice(0,l.sheetRows)),l.DBF=C,c}(a,c),c);return d["!cols"]=c.DBF.map(function(u){return{wch:u.len,DBF:u}}),delete c.DBF,d}var n={B:8,C:250,L:1,D:8,"?":0,"":0};return{to_workbook:function s(a,l){try{return fn(i(a,l),l)}catch(c){if(l&&l.WTF)throw c}return{SheetNames:[],Sheets:{}}},to_sheet:i,from_sheet:function o(a,l){var c=l||{};if(+c.codepage>=0&&Ai(+c.codepage),"string"==c.type)throw new Error("Cannot write DBF to JS string");var d=ei(),u=dd(a,{header:1,raw:!0,cellDates:!0}),h=u[0],f=u.slice(1),p=a["!cols"]||[],g=0,m=0,v=0,w=1;for(g=0;g<h.length;++g)if(((p[g]||{}).DBF||{}).name)h[g]=p[g].DBF.name,++v;else if(null!=h[g]){if(++v,"number"==typeof h[g]&&(h[g]=h[g].toString(10)),"string"!=typeof h[g])throw new Error("DBF Invalid column name "+h[g]+" |"+typeof h[g]+"|");if(h.indexOf(h[g])!==g)for(m=0;m<1024;++m)if(-1==h.indexOf(h[g]+"_"+m)){h[g]+="_"+m;break}}var C=ot(a["!ref"]),y=[],k=[],E=[];for(g=0;g<=C.e.c-C.s.c;++g){var S="",_="",M=0,H=[];for(m=0;m<f.length;++m)null!=f[m][g]&&H.push(f[m][g]);if(0!=H.length&&null!=h[g]){for(m=0;m<H.length;++m){switch(typeof H[m]){case"number":_="B";break;case"string":default:_="C";break;case"boolean":_="L";break;case"object":_=H[m]instanceof Date?"D":"C"}M=Math.max(M,String(H[m]).length),S=S&&S!=_?"C":_}M>250&&(M=250),"C"==(_=((p[g]||{}).DBF||{}).type)&&p[g].DBF.len>M&&(M=p[g].DBF.len),"B"==S&&"N"==_&&(S="N",E[g]=p[g].DBF.dec,M=p[g].DBF.len),k[g]="C"==S||"N"==_?M:n[S]||0,w+=k[g],y[g]=S}else y[g]="?"}var V=d.next(32);for(V.write_shift(4,318902576),V.write_shift(4,f.length),V.write_shift(2,296+32*v),V.write_shift(2,w),g=0;g<4;++g)V.write_shift(4,0);for(V.write_shift(4,(+t[Vn]||3)<<8),g=0,m=0;g<h.length;++g)if(null!=h[g]){var B=d.next(32),re=(h[g].slice(-10)+"\0\0\0\0\0\0\0\0\0\0\0").slice(0,11);B.write_shift(1,re,"sbcs"),B.write_shift(1,"?"==y[g]?"C":y[g],"sbcs"),B.write_shift(4,m),B.write_shift(1,k[g]||n[y[g]]||0),B.write_shift(1,E[g]||0),B.write_shift(1,2),B.write_shift(4,0),B.write_shift(1,0),B.write_shift(4,0),B.write_shift(4,0),m+=k[g]||n[y[g]]||0}var ue=d.next(264);for(ue.write_shift(4,13),g=0;g<65;++g)ue.write_shift(4,0);for(g=0;g<f.length;++g){var oe=d.next(w);for(oe.write_shift(1,0),m=0;m<h.length;++m)if(null!=h[m])switch(y[m]){case"L":oe.write_shift(1,null==f[g][m]?63:f[g][m]?84:70);break;case"B":oe.write_shift(8,f[g][m]||0,"f");break;case"N":var Ae="0";for("number"==typeof f[g][m]&&(Ae=f[g][m].toFixed(E[m]||0)),v=0;v<k[m]-Ae.length;++v)oe.write_shift(1,32);oe.write_shift(1,Ae,"sbcs");break;case"D":f[g][m]?(oe.write_shift(4,("0000"+f[g][m].getFullYear()).slice(-4),"sbcs"),oe.write_shift(2,("00"+(f[g][m].getMonth()+1)).slice(-2),"sbcs"),oe.write_shift(2,("00"+f[g][m].getDate()).slice(-2),"sbcs")):oe.write_shift(8,"00000000","sbcs");break;case"C":var ke=String(null!=f[g][m]?f[g][m]:"").slice(0,k[m]);for(oe.write_shift(1,ke,"sbcs"),v=0;v<k[m]-ke.length;++v)oe.write_shift(1,32)}}return d.next(1).write_shift(1,26),d.end()}}}(),Aw=function(){var e={AA:"\xc0",BA:"\xc1",CA:"\xc2",DA:195,HA:"\xc4",JA:197,AE:"\xc8",BE:"\xc9",CE:"\xca",HE:"\xcb",AI:"\xcc",BI:"\xcd",CI:"\xce",HI:"\xcf",AO:"\xd2",BO:"\xd3",CO:"\xd4",DO:213,HO:"\xd6",AU:"\xd9",BU:"\xda",CU:"\xdb",HU:"\xdc",Aa:"\xe0",Ba:"\xe1",Ca:"\xe2",Da:227,Ha:"\xe4",Ja:229,Ae:"\xe8",Be:"\xe9",Ce:"\xea",He:"\xeb",Ai:"\xec",Bi:"\xed",Ci:"\xee",Hi:"\xef",Ao:"\xf2",Bo:"\xf3",Co:"\xf4",Do:245,Ho:"\xf6",Au:"\xf9",Bu:"\xfa",Cu:"\xfb",Hu:"\xfc",KC:"\xc7",Kc:"\xe7",q:"\xe6",z:"\u0153",a:"\xc6",j:"\u0152",DN:209,Dn:241,Hy:255,S:169,c:170,R:174,"B ":180,0:176,1:177,2:178,3:179,5:181,6:182,7:183,Q:185,k:186,b:208,i:216,l:222,s:240,y:248,"!":161,'"':162,"#":163,"(":164,"%":165,"'":167,"H ":168,"+":171,";":187,"<":188,"=":189,">":190,"?":191,"{":223},t=new RegExp("\x1bN("+Jt(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm"),r=function(h,f){var p=e[f];return"number"==typeof p?Bh(p):p},i=function(h,f,p){var g=f.charCodeAt(0)-32<<4|p.charCodeAt(0)-48;return 59==g?h:Bh(g)};function n(h,f){var V,p=h.split(/[\n\r]+/),g=-1,m=-1,v=0,w=0,C=[],y=[],k=null,E={},S=[],_=[],M=[],H=0;for(+f.codepage>=0&&Ai(+f.codepage);v!==p.length;++v){H=0;var oe,B=p[v].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,i).replace(t,r),re=B.replace(/;;/g,"\0").split(";").map(function(O){return O.replace(/\u0000/g,";")});if(B.length>0)switch(re[0]){case"ID":case"E":case"B":case"O":case"W":break;case"P":"P"==re[1].charAt(0)&&y.push(B.slice(3).replace(/;;/g,";"));break;case"C":var Ae=!1,ke=!1,Ze=!1,we=!1,be=-1,te=-1;for(w=1;w<re.length;++w)switch(re[w].charAt(0)){case"A":case"G":break;case"X":m=parseInt(re[w].slice(1))-1,ke=!0;break;case"Y":for(g=parseInt(re[w].slice(1))-1,ke||(m=0),V=C.length;V<=g;++V)C[V]=[];break;case"K":'"'===(oe=re[w].slice(1)).charAt(0)?oe=oe.slice(1,oe.length-1):"TRUE"===oe?oe=!0:"FALSE"===oe?oe=!1:isNaN(qi(oe))?isNaN(Wo(oe).getDate())||(oe=Kt(oe)):(oe=qi(oe),null!==k&&Wn(k)&&(oe=Gc(oe))),Ae=!0;break;case"E":we=!0;var A=Qo(re[w].slice(1),{r:g,c:m});C[g][m]=[C[g][m],A];break;case"S":Ze=!0,C[g][m]=[C[g][m],"S5S"];break;case"R":be=parseInt(re[w].slice(1))-1;break;case"C":te=parseInt(re[w].slice(1))-1;break;default:if(f&&f.WTF)throw new Error("SYLK bad record "+B)}if(Ae&&(C[g][m]&&2==C[g][m].length?C[g][m][0]=oe:C[g][m]=oe,k=null),Ze){if(we)throw new Error("SYLK shared formula cannot have own formula");var j=be>-1&&C[be][te];if(!j||!j[1])throw new Error("SYLK shared formula cannot find base");C[g][m][1]=Qw(j[1],{r:g-be,c:m-te})}break;case"F":var L=0;for(w=1;w<re.length;++w)switch(re[w].charAt(0)){case"X":m=parseInt(re[w].slice(1))-1,++L;break;case"Y":for(g=parseInt(re[w].slice(1))-1,V=C.length;V<=g;++V)C[V]=[];break;case"M":H=parseInt(re[w].slice(1))/20;break;case"F":case"G":case"S":case"D":case"N":break;case"P":k=y[parseInt(re[w].slice(1))];break;case"W":for(M=re[w].slice(1).split(" "),V=parseInt(M[0],10);V<=parseInt(M[1],10);++V)H=parseInt(M[2],10),_[V-1]=0===H?{hidden:!0}:{wch:H},io(_[V-1]);break;case"C":_[m=parseInt(re[w].slice(1))-1]||(_[m]={});break;case"R":S[g=parseInt(re[w].slice(1))-1]||(S[g]={}),H>0?(S[g].hpt=H,S[g].hpx=Xo(H)):0===H&&(S[g].hidden=!0);break;default:if(f&&f.WTF)throw new Error("SYLK bad record "+B)}L<1&&(k=null);break;default:if(f&&f.WTF)throw new Error("SYLK bad record "+B)}}return S.length>0&&(E["!rows"]=S),_.length>0&&(E["!cols"]=_),f&&f.sheetRows&&(C=C.slice(0,f.sheetRows)),[C,E]}function o(h,f){var p=function s(h,f){switch(f.type){case"base64":return n(Ci(h),f);case"binary":return n(h,f);case"buffer":return n(tt&&Buffer.isBuffer(h)?h.toString("binary"):ln(h),f);case"array":return n(Un(h),f)}throw new Error("Unrecognized type "+f.type)}(h,f),m=p[1],v=jo(p[0],f);return Jt(m).forEach(function(w){v[w]=m[w]}),v}function l(h,f,p,g){var m="C;Y"+(p+1)+";X"+(g+1)+";K";switch(h.t){case"n":m+=h.v||0,h.f&&!h.F&&(m+=";E"+Af(h.f,{r:p,c:g}));break;case"b":m+=h.v?"TRUE":"FALSE";break;case"e":m+=h.w||h.v;break;case"d":m+='"'+(h.w||h.v)+'"';break;case"s":m+='"'+h.v.replace(/"/g,"").replace(/;/g,";;")+'"'}return m}return e["|"]=254,{to_workbook:function a(h,f){return fn(o(h,f),f)},to_sheet:o,from_sheet:function u(h,f){var v,p=["ID;PWXL;N;E"],g=[],m=ot(h["!ref"]),w=Array.isArray(h),C="\r\n";p.push("P;PGeneral"),p.push("F;P0;DG0G8;M255"),h["!cols"]&&function c(h,f){f.forEach(function(p,g){var m="F;W"+(g+1)+" "+(g+1)+" ";p.hidden?m+="0":("number"==typeof p.width&&!p.wpx&&(p.wpx=nl(p.width)),"number"==typeof p.wpx&&!p.wch&&(p.wch=ol(p.wpx)),"number"==typeof p.wch&&(m+=Math.round(p.wch)))," "!=m.charAt(m.length-1)&&h.push(m)})}(p,h["!cols"]),h["!rows"]&&function d(h,f){f.forEach(function(p,g){var m="F;";p.hidden?m+="M0;":p.hpt?m+="M"+20*p.hpt+";":p.hpx&&(m+="M"+20*al(p.hpx)+";"),m.length>2&&h.push(m+"R"+(g+1))})}(p,h["!rows"]),p.push("B;Y"+(m.e.r-m.s.r+1)+";X"+(m.e.c-m.s.c+1)+";D"+[m.s.c,m.s.r,m.e.c,m.e.r].join(" "));for(var y=m.s.r;y<=m.e.r;++y)for(var k=m.s.c;k<=m.e.c;++k){var E=We({r:y,c:k});(v=w?(h[y]||[])[k]:h[E])&&(null!=v.v||v.f&&!v.F)&&g.push(l(v,0,y,k))}return p.join(C)+C+g.join(C)+C+"E"+C}}}(),Mw=function(){function t(n,o){for(var a=n.split("\n"),l=-1,c=-1,d=0,u=[];d!==a.length;++d)if("BOT"!==a[d].trim()){if(!(l<0)){for(var h=a[d].trim().split(","),f=h[0],p=h[1],g=a[++d]||"";1&(g.match(/["]/g)||[]).length&&d<a.length-1;)g+="\n"+a[++d];switch(g=g.trim(),+f){case-1:if("BOT"===g){u[++l]=[],c=0;continue}if("EOD"!==g)throw new Error("Unrecognized DIF special command "+g);break;case 0:u[l][c]="TRUE"===g||"FALSE"!==g&&(isNaN(qi(p))?isNaN(Wo(p).getDate())?p:Kt(p):qi(p)),++c;break;case 1:(g=(g=g.slice(1,g.length-1)).replace(/""/g,'"'))&&g.match(/^=".*"$/)&&(g=g.slice(2,-1)),u[l][c++]=""!==g?g:null}if("EOD"===g)break}}else u[++l]=[],c=0;return o&&o.sheetRows&&(u=u.slice(0,o.sheetRows)),u}function r(n,o){return jo(function e(n,o){switch(o.type){case"base64":return t(Ci(n),o);case"binary":return t(n,o);case"buffer":return t(tt&&Buffer.isBuffer(n)?n.toString("binary"):ln(n),o);case"array":return t(Un(n),o)}throw new Error("Unrecognized type "+o.type)}(n,o),o)}return{to_workbook:function i(n,o){return fn(r(n,o),o)},to_sheet:r,from_sheet:function(){var n=function(l,c,d,u,h){l.push(c),l.push(d+","+u),l.push('"'+h.replace(/"/g,'""')+'"')},o=function(l,c,d,u){l.push(c+","+d),l.push(1==c?'"'+u.replace(/"/g,'""')+'"':u)};return function(l){var u,c=[],d=ot(l["!ref"]),h=Array.isArray(l);n(c,"TABLE",0,1,"sheetjs"),n(c,"VECTORS",0,d.e.r-d.s.r+1,""),n(c,"TUPLES",0,d.e.c-d.s.c+1,""),n(c,"DATA",0,0,"");for(var f=d.s.r;f<=d.e.r;++f){o(c,-1,0,"BOT");for(var p=d.s.c;p<=d.e.c;++p){var g=We({r:f,c:p});if(u=h?(l[f]||[])[p]:l[g])switch(u.t){case"n":var m=u.w;!m&&null!=u.v&&(m=u.v),null==m?o(c,1,0,u.f&&!u.F?"="+u.f:""):o(c,0,m,"V");break;case"b":o(c,0,u.v?1:0,u.v?"TRUE":"FALSE");break;case"s":o(c,1,0,isNaN(u.v)?u.v:'="'+u.v+'"');break;case"d":u.w||(u.w=xi(u.z||Be[14],wr(Kt(u.v)))),o(c,0,u.w,"V");break;default:o(c,1,0,"")}else o(c,1,0,"")}}return o(c,-1,0,"EOD"),c.join("\r\n")}}()}}(),Iw=function(){function e(u){return u.replace(/\\b/g,"\\").replace(/\\c/g,":").replace(/\\n/g,"\n")}function t(u){return u.replace(/\\/g,"\\b").replace(/:/g,"\\c").replace(/\n/g,"\\n")}function i(u,h){return jo(function r(u,h){for(var f=u.split("\n"),p=-1,g=-1,m=0,v=[];m!==f.length;++m){var w=f[m].trim().split(":");if("cell"===w[0]){var C=qt(w[1]);if(v.length<=C.r)for(p=v.length;p<=C.r;++p)v[p]||(v[p]=[]);switch(p=C.r,g=C.c,w[2]){case"t":v[p][g]=e(w[3]);break;case"v":v[p][g]=+w[3];break;case"vtf":var y=w[w.length-1];case"vtc":v[p][g]="nl"===w[3]?!!+w[4]:+w[4],"vtf"==w[2]&&(v[p][g]=[v[p][g],y])}}}return h&&h.sheetRows&&(v=v.slice(0,h.sheetRows)),v}(u,h),h)}var n=["socialcalc:version:1.5","MIME-Version: 1.0","Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave"].join("\n"),o=["--SocialCalcSpreadsheetControlSave","Content-type: text/plain; charset=UTF-8"].join("\n")+"\n",a=["# SocialCalc Spreadsheet Control Save","part:sheet"].join("\n"),l="--SocialCalcSpreadsheetControlSave--";function c(u){if(!u||!u["!ref"])return"";for(var p,h=[],f=[],g="",m=yi(u["!ref"]),v=Array.isArray(u),w=m.s.r;w<=m.e.r;++w)for(var C=m.s.c;C<=m.e.c;++C)if(g=We({r:w,c:C}),(p=v?(u[w]||[])[C]:u[g])&&null!=p.v&&"z"!==p.t){switch(f=["cell",g,"t"],p.t){case"s":case"str":f.push(t(p.v));break;case"n":p.f?(f[2]="vtf",f[3]="n",f[4]=p.v,f[5]=t(p.f)):(f[2]="v",f[3]=p.v);break;case"b":f[2]="vt"+(p.f?"f":"c"),f[3]="nl",f[4]=p.v?"1":"0",f[5]=t(p.f||(p.v?"TRUE":"FALSE"));break;case"d":var y=wr(Kt(p.v));f[2]="vtc",f[3]="nd",f[4]=""+y,f[5]=p.w||xi(p.z||Be[14],y);break;case"e":continue}h.push(f.join(":"))}return h.push("sheet:c:"+(m.e.c-m.s.c+1)+":r:"+(m.e.r-m.s.r+1)+":tvf:1"),h.push("valueformat:1:text-wiki"),h.join("\n")}return{to_workbook:function s(u,h){return fn(i(u,h),h)},to_sheet:i,from_sheet:function d(u){return[n,o,a,o,c(u),l].join("\n")}}}(),qo=function(){function e(d,u,h,f,p){p.raw?u[h][f]=d:""===d||(u[h][f]="TRUE"===d||"FALSE"!==d&&(isNaN(qi(d))?isNaN(Wo(d).getDate())?d:Kt(d):qi(d)))}var r={44:",",9:"\t",59:";",124:"|"},i={44:3,9:2,59:1,124:0};function s(d){for(var u={},h=!1,f=0,p=0;f<d.length;++f)34==(p=d.charCodeAt(f))?h=!h:!h&&p in r&&(u[p]=(u[p]||0)+1);for(f in p=[],u)Object.prototype.hasOwnProperty.call(u,f)&&p.push([u[f],f]);if(!p.length)for(f in u=i)Object.prototype.hasOwnProperty.call(u,f)&&p.push([u[f],f]);return p.sort(function(g,m){return g[0]-m[0]||i[g[1]]-i[m[1]]}),r[p.pop()[1]]||44}function o(d,u){return!u||!u.PRN||u.FS||"sep="==d.slice(0,4)||d.indexOf("\t")>=0||d.indexOf(",")>=0||d.indexOf(";")>=0?function n(d,u){var h=u||{},f="",p=h.dense?[]:{},g={s:{c:0,r:0},e:{c:0,r:0}};"sep="==d.slice(0,4)?13==d.charCodeAt(5)&&10==d.charCodeAt(6)?(f=d.charAt(4),d=d.slice(7)):13==d.charCodeAt(5)||10==d.charCodeAt(5)?(f=d.charAt(4),d=d.slice(6)):f=s(d.slice(0,1024)):f=h&&h.FS?h.FS:s(d.slice(0,1024));var m=0,v=0,w=0,C=0,y=0,k=f.charCodeAt(0),E=!1,S=0,_=d.charCodeAt(0);d=d.replace(/\r\n/gm,"\n");var M=null!=h.dateNF?function c_(e){var t="number"==typeof e?Be[e]:e;return t=t.replace(Zv,"(\\d+)"),new RegExp("^"+t+"$")}(h.dateNF):null;function H(){var V=d.slice(C,y),B={};if('"'==V.charAt(0)&&'"'==V.charAt(V.length-1)&&(V=V.slice(1,-1).replace(/""/g,'"')),0===V.length)B.t="z";else if(h.raw)B.t="s",B.v=V;else if(0===V.trim().length)B.t="s",B.v=V;else if(61==V.charCodeAt(0))34==V.charCodeAt(1)&&34==V.charCodeAt(V.length-1)?(B.t="s",B.v=V.slice(2,-1).replace(/""/g,'"')):function O7(e){return 1!=e.length}(V)?(B.t="n",B.f=V.slice(1)):(B.t="s",B.v=V);else if("TRUE"==V)B.t="b",B.v=!0;else if("FALSE"==V)B.t="b",B.v=!1;else if(isNaN(w=qi(V)))if(!isNaN(Wo(V).getDate())||M&&V.match(M)){B.z=h.dateNF||Be[14];var re=0;M&&V.match(M)&&(V=function d_(e,t,r){var i=-1,s=-1,n=-1,o=-1,a=-1,l=-1;(t.match(Zv)||[]).forEach(function(u,h){var f=parseInt(r[h+1],10);switch(u.toLowerCase().charAt(0)){case"y":i=f;break;case"d":n=f;break;case"h":o=f;break;case"s":l=f;break;case"m":o>=0?a=f:s=f}}),l>=0&&-1==a&&s>=0&&(a=s,s=-1);var c=(""+(i>=0?i:(new Date).getFullYear())).slice(-4)+"-"+("00"+(s>=1?s:1)).slice(-2)+"-"+("00"+(n>=1?n:1)).slice(-2);7==c.length&&(c="0"+c),8==c.length&&(c="20"+c);var d=("00"+(o>=0?o:0)).slice(-2)+":"+("00"+(a>=0?a:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2);return-1==o&&-1==a&&-1==l?c:-1==i&&-1==s&&-1==n?d:c+"T"+d}(0,h.dateNF,V.match(M)||[]),re=1),h.cellDates?(B.t="d",B.v=Kt(V,re)):(B.t="n",B.v=wr(Kt(V,re))),!1!==h.cellText&&(B.w=xi(B.z,B.v instanceof Date?wr(B.v):B.v)),h.cellNF||delete B.z}else B.t="s",B.v=V;else B.t="n",!1!==h.cellText&&(B.w=V),B.v=w;if("z"==B.t||(h.dense?(p[m]||(p[m]=[]),p[m][v]=B):p[We({c:v,r:m})]=B),_=d.charCodeAt(C=y+1),g.e.c<v&&(g.e.c=v),g.e.r<m&&(g.e.r=m),S==k)++v;else if(v=0,++m,h.sheetRows&&h.sheetRows<=m)return!0}e:for(;y<d.length;++y)switch(S=d.charCodeAt(y)){case 34:34===_&&(E=!E);break;case k:case 10:case 13:if(!E&&H())break e}return y-C>0&&H(),p["!ref"]=Ke(g),p}(d,u):jo(function t(d,u){var h=u||{},f=[];if(!d||0===d.length)return f;for(var p=d.split(/[\r\n]/),g=p.length-1;g>=0&&0===p[g].length;)--g;for(var m=10,v=0,w=0;w<=g;++w)-1==(v=p[w].indexOf(" "))?v=p[w].length:v++,m=Math.max(m,v);for(w=0;w<=g;++w){f[w]=[];var C=0;for(e(p[w].slice(0,m).trim(),f,w,C,h),C=1;C<=(p[w].length-m)/10+1;++C)e(p[w].slice(m+10*(C-1),m+10*C).trim(),f,w,C,h)}return h.sheetRows&&(f=f.slice(0,h.sheetRows)),f}(d,u),u)}function a(d,u){var h="",f="string"==u.type?[0,0,0,0]:qf(d,u);switch(u.type){case"base64":h=Ci(d);break;case"binary":case"string":h=d;break;case"buffer":h=65001==u.codepage?d.toString("utf8"):tt&&Buffer.isBuffer(d)?d.toString("binary"):ln(d);break;case"array":h=Un(d);break;default:throw new Error("Unrecognized type "+u.type)}return 239==f[0]&&187==f[1]&&191==f[2]?h=Tt(h.slice(3)):"string"!=u.type&&"buffer"!=u.type&&65001==u.codepage&&(h=Tt(h)),"socialcalc:version:"==h.slice(0,19)?Iw.to_sheet("string"==u.type?h:Tt(h),u):o(h,u)}return{to_workbook:function l(d,u){return fn(a(d,u),u)},to_sheet:a,from_sheet:function c(d){for(var f,u=[],h=ot(d["!ref"]),p=Array.isArray(d),g=h.s.r;g<=h.e.r;++g){for(var m=[],v=h.s.c;v<=h.e.c;++v){var w=We({r:g,c:v});if((f=p?(d[g]||[])[v]:d[w])&&null!=f.v){for(var C=(f.w||(hs(f),f.w)||"").slice(0,10);C.length<10;)C+=" ";m.push(C+(0===v?" ":""))}else m.push(" ")}u.push(m.join(""))}return u.join("\n")}}}(),ro=function(){function e(A,j,L){if(A){Mr(A,A.l||0);for(var O=L.Enum||be;A.l<A.length;){var ee=A.read_shift(2),xe=O[ee]||O[65535],ce=A.read_shift(2),de=A.l+ce,ie=xe.f&&xe.f(A,ce,L);if(A.l=de,j(ie,xe,ee))return}}}function r(A,j){if(!A)return A;var L=j||{},O=L.dense?[]:{},ee="Sheet1",xe="",ce=0,de={},ie=[],Xe=[],D={s:{r:0,c:0},e:{r:0,c:0}},yt=L.sheetRows||0;if(0==A[2]&&(8==A[3]||9==A[3])&&A.length>=16&&5==A[14]&&108===A[15])throw new Error("Unsupported Works 3 for Mac file");if(2==A[2])L.Enum=be,e(A,function(Ee,ar,Gi){switch(Gi){case 0:L.vers=Ee,Ee>=4096&&(L.qpro=!0);break;case 6:D=Ee;break;case 204:Ee&&(xe=Ee);break;case 222:xe=Ee;break;case 15:case 51:L.qpro||(Ee[1].v=Ee[1].v.slice(1));case 13:case 14:case 16:14==Gi&&!(112&~Ee[2])&&(15&Ee[2])>1&&(15&Ee[2])<15&&(Ee[1].z=L.dateNF||Be[14],L.cellDates&&(Ee[1].t="d",Ee[1].v=Gc(Ee[1].v))),L.qpro&&Ee[3]>ce&&(O["!ref"]=Ke(D),de[ee]=O,ie.push(ee),O=L.dense?[]:{},D={s:{r:0,c:0},e:{r:0,c:0}},ce=Ee[3],ee=xe||"Sheet"+(ce+1),xe="");var ms=L.dense?(O[Ee[0].r]||[])[Ee[0].c]:O[We(Ee[0])];if(ms){ms.t=Ee[1].t,ms.v=Ee[1].v,null!=Ee[1].z&&(ms.z=Ee[1].z),null!=Ee[1].f&&(ms.f=Ee[1].f);break}L.dense?(O[Ee[0].r]||(O[Ee[0].r]=[]),O[Ee[0].r][Ee[0].c]=Ee[1]):O[We(Ee[0])]=Ee[1]}},L);else{if(26!=A[2]&&14!=A[2])throw new Error("Unrecognized LOTUS BOF "+A[2]);L.Enum=te,14==A[2]&&(L.qpro=!0,A.l=0),e(A,function(Ee,ar,Gi){switch(Gi){case 204:ee=Ee;break;case 22:Ee[1].v=Ee[1].v.slice(1);case 23:case 24:case 25:case 37:case 39:case 40:if(Ee[3]>ce&&(O["!ref"]=Ke(D),de[ee]=O,ie.push(ee),O=L.dense?[]:{},D={s:{r:0,c:0},e:{r:0,c:0}},ee="Sheet"+((ce=Ee[3])+1)),yt>0&&Ee[0].r>=yt)break;L.dense?(O[Ee[0].r]||(O[Ee[0].r]=[]),O[Ee[0].r][Ee[0].c]=Ee[1]):O[We(Ee[0])]=Ee[1],D.e.c<Ee[0].c&&(D.e.c=Ee[0].c),D.e.r<Ee[0].r&&(D.e.r=Ee[0].r);break;case 27:Ee[14e3]&&(Xe[Ee[14e3][0]]=Ee[14e3][1]);break;case 1537:Xe[Ee[0]]=Ee[1],Ee[0]==ce&&(ee=Ee[1])}},L)}if(O["!ref"]=Ke(D),de[xe||ee]=O,ie.push(xe||ee),!Xe.length)return{SheetNames:ie,Sheets:de};for(var it={},Et=[],st=0;st<Xe.length;++st)de[ie[st]]?(Et.push(Xe[st]||ie[st]),it[Xe[st]]=de[Xe[st]]||de[ie[st]]):(Et.push(Xe[st]),it[Xe[st]]={"!ref":"A1"});return{SheetNames:Et,Sheets:it}}function c(A,j,L){var O=[{c:0,r:0},{t:"n",v:0},0,0];return L.qpro&&20768!=L.vers?(O[0].c=A.read_shift(1),O[3]=A.read_shift(1),O[0].r=A.read_shift(2),A.l+=2):(O[2]=A.read_shift(1),O[0].c=A.read_shift(2),O[0].r=A.read_shift(2)),O}function d(A,j,L){var O=A.l+j,ee=c(A,0,L);if(ee[1].t="s",20768==L.vers){A.l++;var xe=A.read_shift(1);return ee[1].v=A.read_shift(xe,"utf8"),ee}return L.qpro&&A.l++,ee[1].v=A.read_shift(O-A.l,"cstr"),ee}function u(A,j,L){var O=J(7+L.length);O.write_shift(1,255),O.write_shift(2,j),O.write_shift(2,A),O.write_shift(1,39);for(var ee=0;ee<O.length;++ee){var xe=L.charCodeAt(ee);O.write_shift(1,xe>=128?95:xe)}return O.write_shift(1,0),O}function f(A,j,L){var O=J(7);return O.write_shift(1,255),O.write_shift(2,j),O.write_shift(2,A),O.write_shift(2,L,"i"),O}function g(A,j,L){var O=J(13);return O.write_shift(1,255),O.write_shift(2,j),O.write_shift(2,A),O.write_shift(8,L,"f"),O}function v(A,j,L){var O=32768&j;return j=(O?A:0)+((j&=-32769)>=8192?j-16384:j),(O?"":"$")+(L?Lt(j):er(j))}var w={51:["FALSE",0],52:["TRUE",0],70:["LEN",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],111:["T",1]},C=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function k(A){var j=[{c:0,r:0},{t:"n",v:0},0];return j[0].r=A.read_shift(2),j[3]=A[A.l++],j[0].c=A[A.l++],j}function S(A,j,L,O){var ee=J(6+O.length);ee.write_shift(2,A),ee.write_shift(1,L),ee.write_shift(1,j),ee.write_shift(1,39);for(var xe=0;xe<O.length;++xe){var ce=O.charCodeAt(xe);ee.write_shift(1,ce>=128?95:ce)}return ee.write_shift(1,0),ee}function M(A,j){var L=k(A),O=A.read_shift(4),ee=A.read_shift(4),xe=A.read_shift(2);if(65535==xe)return 0===O&&3221225472===ee?(L[1].t="e",L[1].v=15):0===O&&3489660928===ee?(L[1].t="e",L[1].v=42):L[1].v=0,L;var ce=32768&xe;return xe=(32767&xe)-16446,L[1].v=(1-2*ce)*(ee*Math.pow(2,xe+32)+O*Math.pow(2,xe)),L}function H(A,j,L,O){var ee=J(14);if(ee.write_shift(2,A),ee.write_shift(1,L),ee.write_shift(1,j),0==O)return ee.write_shift(4,0),ee.write_shift(4,0),ee.write_shift(2,65535),ee;var xe=0,ce=0,ie=0;return O<0&&(xe=1,O=-O),ce=0|Math.log2(O),!(2147483648&(ie=(O/=Math.pow(2,ce-31))>>>0))&&(++ce,ie=(O/=2)>>>0),O-=ie,ie|=2147483648,ie>>>=0,O*=Math.pow(2,32),ee.write_shift(4,O>>>0),ee.write_shift(4,ie),ee.write_shift(2,ce+=16383+(xe?32768:0)),ee}function re(A,j){var L=k(A),O=A.read_shift(8,"f");return L[1].v=O,L}function oe(A,j){return 0==A[A.l+j-1]?A.read_shift(j,"cstr"):""}function we(A,j){var L=J(5+A.length);L.write_shift(2,14e3),L.write_shift(2,j);for(var O=0;O<A.length;++O){var ee=A.charCodeAt(O);L[L.l++]=ee>127?95:ee}return L[L.l++]=0,L}var be={0:{n:"BOF",f:hr},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:function a(A,j,L){var O={s:{c:0,r:0},e:{c:0,r:0}};return 8==j&&L.qpro?(O.s.c=A.read_shift(1),A.l++,O.s.r=A.read_shift(2),O.e.c=A.read_shift(1),A.l++,O.e.r=A.read_shift(2),O):(O.s.c=A.read_shift(2),O.s.r=A.read_shift(2),12==j&&L.qpro&&(A.l+=2),O.e.c=A.read_shift(2),O.e.r=A.read_shift(2),12==j&&L.qpro&&(A.l+=2),65535==O.s.c&&(O.s.c=O.e.c=O.s.r=O.e.r=0),O)}},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:function h(A,j,L){var O=c(A,0,L);return O[1].v=A.read_shift(2,"i"),O}},14:{n:"NUMBER",f:function p(A,j,L){var O=c(A,0,L);return O[1].v=A.read_shift(8,"f"),O}},15:{n:"LABEL",f:d},16:{n:"FORMULA",f:function m(A,j,L){var O=A.l+j,ee=c(A,0,L);if(ee[1].v=A.read_shift(8,"f"),L.qpro)A.l=O;else{var xe=A.read_shift(2);(function y(A,j){Mr(A,0);for(var L=[],O=0,ee="",xe="",ce="",de="";A.l<A.length;){var ie=A[A.l++];switch(ie){case 0:L.push(A.read_shift(8,"f"));break;case 1:xe=v(j[0].c,A.read_shift(2),!0),ee=v(j[0].r,A.read_shift(2),!1),L.push(xe+ee);break;case 2:var Xe=v(j[0].c,A.read_shift(2),!0),D=v(j[0].r,A.read_shift(2),!1);xe=v(j[0].c,A.read_shift(2),!0),ee=v(j[0].r,A.read_shift(2),!1),L.push(Xe+D+":"+xe+ee);break;case 3:if(A.l<A.length)return void console.error("WK1 premature formula end");break;case 4:L.push("("+L.pop()+")");break;case 5:L.push(A.read_shift(2));break;case 6:for(var yt="";ie=A[A.l++];)yt+=String.fromCharCode(ie);L.push('"'+yt.replace(/"/g,'""')+'"');break;case 8:L.push("-"+L.pop());break;case 23:L.push("+"+L.pop());break;case 22:L.push("NOT("+L.pop()+")");break;case 20:case 21:de=L.pop(),ce=L.pop(),L.push(["AND","OR"][ie-20]+"("+ce+","+de+")");break;default:if(ie<32&&C[ie])de=L.pop(),ce=L.pop(),L.push(ce+C[ie]+de);else{if(!w[ie])return ie<=7?console.error("WK1 invalid opcode "+ie.toString(16)):ie<=24?console.error("WK1 unsupported op "+ie.toString(16)):ie<=30?console.error("WK1 invalid opcode "+ie.toString(16)):ie<=115?console.error("WK1 unsupported function opcode "+ie.toString(16)):console.error("WK1 unrecognized opcode "+ie.toString(16));if(69==(O=w[ie][1])&&(O=A[A.l++]),O>L.length)return void console.error("WK1 bad formula parse 0x"+ie.toString(16)+":|"+L.join("|")+"|");var it=L.slice(-O);L.length-=O,L.push(w[ie][0]+"("+it.join(",")+")")}}}1==L.length?j[1].f=""+L[0]:console.error("WK1 bad formula parse |"+L.join("|")+"|")})(A.slice(A.l,A.l+xe),ee),A.l+=xe}return ee}},24:{n:"TABLE"},25:{n:"ORANGE"},26:{n:"PRANGE"},27:{n:"SRANGE"},28:{n:"FRANGE"},29:{n:"KRANGE1"},32:{n:"HRANGE"},35:{n:"KRANGE2"},36:{n:"PROTEC"},37:{n:"FOOTER"},38:{n:"HEADER"},39:{n:"SETUP"},40:{n:"MARGINS"},41:{n:"LABELFMT"},42:{n:"TITLES"},43:{n:"SHEETJS"},45:{n:"GRAPH"},46:{n:"NGRAPH"},47:{n:"CALCCOUNT"},48:{n:"UNFORMATTED"},49:{n:"CURSORW12"},50:{n:"WINDOW"},51:{n:"STRING",f:d},55:{n:"PASSWORD"},56:{n:"LOCKED"},60:{n:"QUERY"},61:{n:"QUERYNAME"},62:{n:"PRINT"},63:{n:"PRINTNAME"},64:{n:"GRAPH2"},65:{n:"GRAPHNAME"},66:{n:"ZOOM"},67:{n:"SYMSPLIT"},68:{n:"NSROWS"},69:{n:"NSCOLS"},70:{n:"RULER"},71:{n:"NNAME"},72:{n:"ACOMM"},73:{n:"AMACRO"},74:{n:"PARSE"},102:{n:"PRANGES??"},103:{n:"RRANGES??"},104:{n:"FNAME??"},105:{n:"MRANGES??"},204:{n:"SHEETNAMECS",f:oe},222:{n:"SHEETNAMELP",f:function Ae(A,j){var L=A[A.l++];L>j-1&&(L=j-1);for(var O="";O.length<L;)O+=String.fromCharCode(A[A.l++]);return O}},65535:{n:""}},te={0:{n:"BOF"},1:{n:"EOF"},2:{n:"PASSWORD"},3:{n:"CALCSET"},4:{n:"WINDOWSET"},5:{n:"SHEETCELLPTR"},6:{n:"SHEETLAYOUT"},7:{n:"COLUMNWIDTH"},8:{n:"HIDDENCOLUMN"},9:{n:"USERRANGE"},10:{n:"SYSTEMRANGE"},11:{n:"ZEROFORCE"},12:{n:"SORTKEYDIR"},13:{n:"FILESEAL"},14:{n:"DATAFILLNUMS"},15:{n:"PRINTMAIN"},16:{n:"PRINTSTRING"},17:{n:"GRAPHMAIN"},18:{n:"GRAPHSTRING"},19:{n:"??"},20:{n:"ERRCELL"},21:{n:"NACELL"},22:{n:"LABEL16",f:function E(A,j){var L=k(A);return L[1].t="s",L[1].v=A.read_shift(j-4,"cstr"),L}},23:{n:"NUMBER17",f:M},24:{n:"NUMBER18",f:function _(A,j){var L=k(A);L[1].v=A.read_shift(2);var O=L[1].v>>1;if(1&L[1].v)switch(7&O){case 0:O=5e3*(O>>3);break;case 1:O=500*(O>>3);break;case 2:O=(O>>3)/20;break;case 3:O=(O>>3)/200;break;case 4:O=(O>>3)/2e3;break;case 5:O=(O>>3)/2e4;break;case 6:O=(O>>3)/16;break;case 7:O=(O>>3)/64}return L[1].v=O,L}},25:{n:"FORMULA19",f:function V(A,j){var L=M(A);return A.l+=j-14,L}},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:function Ze(A,j){for(var L={},O=A.l+j;A.l<O;){var ee=A.read_shift(2);if(14e3==ee){for(L[ee]=[0,""],L[ee][0]=A.read_shift(2);A[A.l];)L[ee][1]+=String.fromCharCode(A[A.l]),A.l++;A.l++}}return L}},28:{n:"DTLABELMISC"},29:{n:"DTLABELCELL"},30:{n:"GRAPHWINDOW"},31:{n:"CPA"},32:{n:"LPLAUTO"},33:{n:"QUERY"},34:{n:"HIDDENSHEET"},35:{n:"??"},37:{n:"NUMBER25",f:function B(A,j){var L=k(A),O=A.read_shift(4);return L[1].v=O>>6,L}},38:{n:"??"},39:{n:"NUMBER27",f:re},40:{n:"FORMULA28",f:function ue(A,j){var L=re(A);return A.l+=j-10,L}},142:{n:"??"},147:{n:"??"},150:{n:"??"},151:{n:"??"},152:{n:"??"},153:{n:"??"},154:{n:"??"},155:{n:"??"},156:{n:"??"},163:{n:"??"},174:{n:"??"},175:{n:"??"},176:{n:"??"},177:{n:"??"},184:{n:"??"},185:{n:"??"},186:{n:"??"},187:{n:"??"},188:{n:"??"},195:{n:"??"},201:{n:"??"},204:{n:"SHEETNAMECS",f:oe},205:{n:"??"},206:{n:"??"},207:{n:"??"},208:{n:"??"},256:{n:"??"},259:{n:"??"},260:{n:"??"},261:{n:"??"},262:{n:"??"},263:{n:"??"},265:{n:"??"},266:{n:"??"},267:{n:"??"},268:{n:"??"},270:{n:"??"},271:{n:"??"},384:{n:"??"},389:{n:"??"},390:{n:"??"},393:{n:"??"},396:{n:"??"},512:{n:"??"},514:{n:"??"},513:{n:"??"},516:{n:"??"},517:{n:"??"},640:{n:"??"},641:{n:"??"},642:{n:"??"},643:{n:"??"},644:{n:"??"},645:{n:"??"},646:{n:"??"},647:{n:"??"},648:{n:"??"},658:{n:"??"},659:{n:"??"},660:{n:"??"},661:{n:"??"},662:{n:"??"},665:{n:"??"},666:{n:"??"},768:{n:"??"},772:{n:"??"},1537:{n:"SHEETINFOQP",f:function ke(A,j,L){if(L.qpro&&!(j<21)){var O=A.read_shift(1);return A.l+=17,A.l+=1,A.l+=2,[O,A.read_shift(j-21,"cstr")]}}},1600:{n:"??"},1602:{n:"??"},1793:{n:"??"},1794:{n:"??"},1795:{n:"??"},1796:{n:"??"},1920:{n:"??"},2048:{n:"??"},2049:{n:"??"},2052:{n:"??"},2688:{n:"??"},10998:{n:"??"},12849:{n:"??"},28233:{n:"??"},28484:{n:"??"},65535:{n:""}};return{sheet_to_wk1:function i(A,j){var L=j||{};if(+L.codepage>=0&&Ai(+L.codepage),"string"==L.type)throw new Error("Cannot write WK1 to JS string");var O=ei(),ee=ot(A["!ref"]),xe=Array.isArray(A),ce=[];me(O,0,function n(A){var j=J(2);return j.write_shift(2,A),j}(1030)),me(O,6,function l(A){var j=J(8);return j.write_shift(2,A.s.c),j.write_shift(2,A.s.r),j.write_shift(2,A.e.c),j.write_shift(2,A.e.r),j}(ee));for(var de=Math.min(ee.e.r,8191),ie=ee.s.r;ie<=de;++ie)for(var Xe=er(ie),D=ee.s.c;D<=ee.e.c;++D){ie===ee.s.r&&(ce[D]=Lt(D));var it=xe?(A[ie]||[])[D]:A[ce[D]+Xe];it&&"z"!=it.t&&("n"==it.t?(0|it.v)==it.v&&it.v>=-32768&&it.v<=32767?me(O,13,f(ie,D,it.v)):me(O,14,g(ie,D,it.v)):me(O,15,u(ie,D,hs(it).slice(0,239))))}return me(O,1),O.end()},book_to_wk3:function s(A,j){var L=j||{};if(+L.codepage>=0&&Ai(+L.codepage),"string"==L.type)throw new Error("Cannot write WK3 to JS string");var O=ei();me(O,0,function o(A){var j=J(26);j.write_shift(2,4096),j.write_shift(2,4),j.write_shift(4,0);for(var L=0,O=0,ee=0,xe=0;xe<A.SheetNames.length;++xe){var de=A.Sheets[A.SheetNames[xe]];if(de&&de["!ref"]){++ee;var ie=yi(de["!ref"]);L<ie.e.r&&(L=ie.e.r),O<ie.e.c&&(O=ie.e.c)}}return L>8191&&(L=8191),j.write_shift(2,L),j.write_shift(1,ee),j.write_shift(1,O),j.write_shift(2,0),j.write_shift(2,0),j.write_shift(1,1),j.write_shift(1,2),j.write_shift(4,0),j.write_shift(4,0),j}(A));for(var ee=0,xe=0;ee<A.SheetNames.length;++ee)(A.Sheets[A.SheetNames[ee]]||{})["!ref"]&&me(O,27,we(A.SheetNames[ee],xe++));var ce=0;for(ee=0;ee<A.SheetNames.length;++ee){var de=A.Sheets[A.SheetNames[ee]];if(de&&de["!ref"]){for(var ie=ot(de["!ref"]),Xe=Array.isArray(de),D=[],yt=Math.min(ie.e.r,8191),it=ie.s.r;it<=yt;++it)for(var Et=er(it),st=ie.s.c;st<=ie.e.c;++st){it===ie.s.r&&(D[st]=Lt(st));var ar=Xe?(de[it]||[])[st]:de[D[st]+Et];ar&&"z"!=ar.t&&("n"==ar.t?me(O,23,H(it,st,ce,ar.v)):me(O,22,S(it,st,ce,hs(ar).slice(0,239))))}++ce}}return me(O,1),O.end()},to_workbook:function t(A,j){switch(j.type){case"base64":return r(wi(Ci(A)),j);case"binary":return r(wi(A),j);case"buffer":case"array":return r(A,j)}throw"Unsupported type "+j.type}}}(),E5=function(){var e=Xa("t"),t=Xa("rPr");function r(n){var o=n.match(e);if(!o)return{t:"s",v:""};var a={t:"s",v:ut(o[1])},l=n.match(t);return l&&(a.s=function y5(e){var t={},r=e.match(Gr),i=0,s=!1;if(r)for(;i!=r.length;++i){var n=ze(r[i]);switch(n[0].replace(/\w*:/g,"")){case"<condense":case"<extend":break;case"<shadow":if(!n.val)break;case"<shadow>":case"<shadow/>":t.shadow=1;break;case"</shadow>":break;case"<charset":if("1"==n.val)break;t.cp=Oh[parseInt(n.val,10)];break;case"<outline":if(!n.val)break;case"<outline>":case"<outline/>":t.outline=1;break;case"</outline>":break;case"<rFont":t.name=n.val;break;case"<sz":t.sz=n.val;break;case"<strike":if(!n.val)break;case"<strike>":case"<strike/>":t.strike=1;break;case"</strike>":break;case"<u":if(!n.val)break;switch(n.val){case"double":t.uval="double";break;case"singleAccounting":t.uval="single-accounting";break;case"doubleAccounting":t.uval="double-accounting"}case"<u>":case"<u/>":t.u=1;break;case"</u>":break;case"<b":if("0"==n.val)break;case"<b>":case"<b/>":t.b=1;break;case"</b>":break;case"<i":if("0"==n.val)break;case"<i>":case"<i/>":t.i=1;break;case"</i>":break;case"<color":n.rgb&&(t.color=n.rgb.slice(2,8));break;case"<color>":case"<color/>":case"</color>":break;case"<family":t.family=n.val;break;case"<family>":case"<family/>":case"</family>":break;case"<vertAlign":t.valign=n.val;break;case"<vertAlign>":case"<vertAlign/>":case"</vertAlign>":case"<scheme":case"<scheme>":case"<scheme/>":case"</scheme>":case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":s=!0;break;case"</ext>":s=!1;break;default:if(47!==n[0].charCodeAt(1)&&!s)throw new Error("Unrecognized rich format "+n[0])}}return t}(l[1])),a}var i=/<(?:\w+:)?r>/g,s=/<\/(?:\w+:)?r>/;return function(o){return o.replace(i,"").split(s).map(r).filter(function(a){return a.v})}}(),F5=function(){var t=/(\r\n|\n)/g;function i(s){var n=[[],s.v,[]];return s.v?(s.s&&function r(s,n,o){var a=[];s.u&&a.push("text-decoration: underline;"),s.uval&&a.push("text-underline-style:"+s.uval+";"),s.sz&&a.push("font-size:"+s.sz+"pt;"),s.outline&&a.push("text-effect: outline;"),s.shadow&&a.push("text-shadow: auto;"),n.push('<span style="'+a.join("")+'">'),s.b&&(n.push("<b>"),o.push("</b>")),s.i&&(n.push("<i>"),o.push("</i>")),s.strike&&(n.push("<s>"),o.push("</s>"));var l=s.valign||"";"superscript"==l||"super"==l?l="sup":"subscript"==l&&(l="sub"),""!=l&&(n.push("<"+l+">"),o.push("</"+l+">")),o.push("</span>")}(s.s,n[0],n[2]),n[0].join("")+n[1].replace(t,"<br/>")+n[2].join("")):""}return function(n){return n.map(i).join("")}}(),R5=/<(?:\w+:)?t[^>]*>([^<]*)<\/(?:\w+:)?t>/g,k5=/<(?:\w+:)?r>/,T5=/<(?:\w+:)?rPh.*?>([\s\S]*?)<\/(?:\w+:)?rPh>/g;function Ef(e,t){var r=!t||t.cellHTML,i={};return e?(e.match(/^\s*<(?:\w+:)?t[^>]*>/)?(i.t=ut(Tt(e.slice(e.indexOf(">")+1).split(/<\/(?:\w+:)?t>/)[0]||"")),i.r=Tt(e),r&&(i.h=jh(i.t))):e.match(k5)&&(i.r=Tt(e),i.t=ut(Tt((e.replace(T5,"").match(R5)||[]).join("").replace(Gr,""))),r&&(i.h=F5(E5(i.r)))),i):{t:""}}var P5=/<(?:\w+:)?sst([^>]*)>([\s\S]*)<\/(?:\w+:)?sst>/,D5=/<(?:\w+:)?(?:si|sstItem)>/g,A5=/<\/(?:\w+:)?(?:si|sstItem)>/;function Lw(e){for(var t=[],r=e.split(""),i=0;i<r.length;++i)t[i]=r[i].charCodeAt(0);return t}function Is(e,t){var r={};return r.Major=e.read_shift(2),r.Minor=e.read_shift(2),t>=4&&(e.l+=t-4),r}function G5(e){for(var t=e.read_shift(4),r=e.l+t-4,i={},s=e.read_shift(4),n=[];s-- >0;)n.push({t:e.read_shift(4),v:e.read_shift(0,"lpp4")});if(i.name=e.read_shift(0,"lpp4"),i.comps=n,e.l!=r)throw new Error("Bad DataSpaceMapEntry: "+e.l+" != "+r);return i}function Ow(e,t){var r=e.l+t,i={};i.Flags=63&e.read_shift(4),e.l+=4,i.AlgID=e.read_shift(4);var s=!1;switch(i.AlgID){case 26126:case 26127:case 26128:s=36==i.Flags;break;case 26625:s=4==i.Flags;break;case 0:s=16==i.Flags||4==i.Flags||36==i.Flags;break;default:throw"Unrecognized encryption algorithm: "+i.AlgID}if(!s)throw new Error("Encryption Flags/AlgID mismatch");return i.AlgIDHash=e.read_shift(4),i.KeySize=e.read_shift(4),i.ProviderType=e.read_shift(4),e.l+=8,i.CSPName=e.read_shift(r-e.l>>1,"utf16le"),e.l=r,i}function Bw(e,t){var r={},i=e.l+t;return e.l+=4,r.Salt=e.slice(e.l,e.l+16),e.l+=16,r.Verifier=e.slice(e.l,e.l+16),e.l+=16,e.read_shift(4),r.VerifierHash=e.slice(e.l,i),e.l=i,r}function j5(e){if(36!=(63&e.read_shift(4)))throw new Error("EncryptionInfo mismatch");var r=e.read_shift(4);return{t:"Std",h:Ow(e,r),v:Bw(e,e.length-e.l)}}function K5(){throw new Error("File is password-protected: ECMA-376 Extensible")}function q5(e){var t=["saltSize","blockSize","keyBits","hashSize","cipherAlgorithm","cipherChaining","hashAlgorithm","saltValue"];e.l+=4;var r=e.read_shift(e.length-e.l,"utf8"),i={};return r.replace(Gr,function(n){var o=ze(n);switch(ds(o[0])){case"<?xml":case"<encryption":case"</encryption>":case"</keyEncryptors>":case"</keyEncryptor>":break;case"<keyData":t.forEach(function(a){i[a]=o[a]});break;case"<dataIntegrity":i.encryptedHmacKey=o.encryptedHmacKey,i.encryptedHmacValue=o.encryptedHmacValue;break;case"<keyEncryptors>":case"<keyEncryptors":i.encs=[];break;case"<keyEncryptor":i.uri=o.uri;break;case"<encryptedKey":i.encs.push(o);break;default:throw o[0]}}),i}var Nw=function(){var e=[187,255,255,186,255,255,185,128,0,190,15,0,191,15,0],t=[57840,7439,52380,33984,4364,3600,61902,12606,6258,57657,54287,34041,10252,43370,20163],r=[44796,19929,39858,10053,20106,40212,10761,31585,63170,64933,60267,50935,40399,11199,17763,35526,1453,2906,5812,11624,23248,885,1770,3540,7080,14160,28320,56640,55369,41139,20807,41614,21821,43642,17621,28485,56970,44341,19019,38038,14605,29210,60195,50791,40175,10751,21502,43004,24537,18387,36774,3949,7898,15796,31592,63184,47201,24803,49606,37805,14203,28406,56812,17824,35648,1697,3394,6788,13576,27152,43601,17539,35078,557,1114,2228,4456,30388,60776,51953,34243,7079,14158,28316,14128,28256,56512,43425,17251,34502,7597,13105,26210,52420,35241,883,1766,3532,4129,8258,16516,33032,4657,9314,18628],s=function(o,a){return function(o){return 255&(o/2|128*o)}(o^a)};return function(o){for(var a=Lw(o),l=function(o){for(var a=t[o.length-1],l=104,c=o.length-1;c>=0;--c)for(var d=o[c],u=0;7!=u;++u)64&d&&(a^=r[l]),d*=2,--l;return a}(a),c=a.length,d=an(16),u=0;16!=u;++u)d[u]=0;var p;for(!(1&~c)&&(d[c]=s(e[0],l>>8),d[--c]=s(a[a.length-1],255&l));c>0;)d[--c]=s(a[c],l>>8),d[--c]=s(a[c],255&l);for(c=15,p=15-a.length;p>0;)d[c]=s(e[p],l>>8),--p,d[--c]=s(a[c],255&l),--c,--p;return d}}();var Hw=function(){function e(s,n){switch(n.type){case"base64":return t(Ci(s),n);case"binary":return t(s,n);case"buffer":return t(tt&&Buffer.isBuffer(s)?s.toString("binary"):ln(s),n);case"array":return t(Un(s),n)}throw new Error("Unrecognized type "+n.type)}function t(s,n){var a=(n||{}).dense?[]:{},l=s.match(/\\trowd.*?\\row\b/g);if(!l.length)throw new Error("RTF missing table");var c={s:{c:0,r:0},e:{c:0,r:l.length-1}};return l.forEach(function(d,u){Array.isArray(a)&&(a[u]=[]);for(var p,h=/\\\w+\b/g,f=0,g=-1;p=h.exec(d);){if("\\cell"===p[0]){var m=d.slice(f,h.lastIndex-p[0].length);if(" "==m[0]&&(m=m.slice(1)),++g,m.length){var v={v:m,t:"s"};Array.isArray(a)?a[u][g]=v:a[We({r:u,c:g})]=v}}f=h.lastIndex}g>c.e.c&&(c.e.c=g)}),a["!ref"]=Ke(c),a}return{to_workbook:function r(s,n){return fn(e(s,n),n)},to_sheet:e,from_sheet:function i(s){for(var a,n=["{\\rtf1\\ansi"],o=ot(s["!ref"]),l=Array.isArray(s),c=o.s.r;c<=o.e.r;++c){n.push("\\trowd\\trautofit1");for(var d=o.s.c;d<=o.e.c;++d)n.push("\\cellx"+(d+1));for(n.push("\\pard\\intbl"),d=o.s.c;d<=o.e.c;++d){var u=We({r:c,c:d});(a=l?(s[c]||[])[d]:s[u])&&(null!=a.v||a.f&&!a.F)&&(n.push(" "+(a.w||(hs(a),a.w))),n.push("\\cell"))}n.push("\\pard\\intbl\\row")}return n.join("")+"}"}}}();function sl(e){for(var t=0,r=1;3!=t;++t)r=256*r+(e[t]>255?255:e[t]<0?0:e[t]);return r.toString(16).toUpperCase().slice(1)}function ed(e,t){if(0===t)return e;var r=function iO(e){var t=e[0]/255,r=e[1]/255,i=e[2]/255,s=Math.max(t,r,i),n=Math.min(t,r,i),o=s-n;if(0===o)return[0,0,t];var l,a=0,c=s+n;switch(l=o/(c>1?2-c:c),s){case t:a=((r-i)/o+6)%6;break;case r:a=(i-t)/o+2;break;case i:a=(t-r)/o+4}return[a/6,l,c/2]}(function rO(e){var t=e.slice("#"===e[0]?1:0).slice(0,6);return[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16)]}(e));return r[2]=t<0?r[2]*(1+t):1-(1-r[2])*(1-t),sl(function sO(e){var l,r=e[1],i=e[2],s=2*r*(i<.5?i:1-i),n=i-s/2,o=[n,n,n],a=6*e[0];if(0!==r)switch(0|a){case 0:case 6:l=s*a,o[0]+=s,o[1]+=l;break;case 1:o[0]+=l=s*(2-a),o[1]+=s;break;case 2:l=s*(a-2),o[1]+=s,o[2]+=l;break;case 3:o[1]+=l=s*(4-a),o[2]+=s;break;case 4:l=s*(a-4),o[2]+=s,o[0]+=l;break;case 5:o[2]+=l=s*(6-a),o[0]+=s}for(var c=0;3!=c;++c)o[c]=Math.round(255*o[c]);return o}(r))}var $r=6;function nl(e){return Math.floor((e+Math.round(128/$r)/256)*$r)}function ol(e){return Math.floor((e-5)/$r*100+.5)/100}function td(e){return Math.round((e*$r+5)/$r*256)/256}function Rf(e){return td(ol(nl(e)))}function kf(e){var t=Math.abs(e-Rf(e)),r=$r;if(t>.005)for($r=1;$r<15;++$r)Math.abs(e-Rf(e))<=t&&(t=Math.abs(e-Rf(e)),r=$r);$r=r}function io(e){e.width?(e.wpx=nl(e.width),e.wch=ol(e.wpx),e.MDW=$r):e.wpx?(e.wch=ol(e.wpx),e.width=td(e.wch),e.MDW=$r):"number"==typeof e.wch&&(e.width=td(e.wch),e.wpx=nl(e.width),e.MDW=$r),e.customWidth&&delete e.customWidth}function al(e){return 96*e/96}function Xo(e){return 96*e/96}var lO={None:"none",Solid:"solid",Gray50:"mediumGray",Gray75:"darkGray",Gray25:"lightGray",HorzStripe:"darkHorizontal",VertStripe:"darkVertical",ReverseDiagStripe:"darkDown",DiagStripe:"darkUp",DiagCross:"darkGrid",ThickDiagCross:"darkTrellis",ThinHorzStripe:"lightHorizontal",ThinVertStripe:"lightVertical",ThinReverseDiagStripe:"lightDown",ThinHorzCross:"lightGrid"},rd=["numFmtId","fillId","fontId","borderId","xfId"],id=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","pivotButton","quotePrefix"],mO=function(){var t=/<(?:\w+:)?numFmts([^>]*)>[\S\s]*?<\/(?:\w+:)?numFmts>/,r=/<(?:\w+:)?cellXfs([^>]*)>[\S\s]*?<\/(?:\w+:)?cellXfs>/,i=/<(?:\w+:)?fills([^>]*)>[\S\s]*?<\/(?:\w+:)?fills>/,s=/<(?:\w+:)?fonts([^>]*)>[\S\s]*?<\/(?:\w+:)?fonts>/,n=/<(?:\w+:)?borders([^>]*)>[\S\s]*?<\/(?:\w+:)?borders>/;return function(a,l,c){var u,d={};return a?((u=(a=a.replace(/<!--([\s\S]*?)-->/gm,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"")).match(t))&&function hO(e,t,r){t.NumberFmt=[];for(var i=Jt(Be),s=0;s<i.length;++s)t.NumberFmt[i[s]]=Be[i[s]];var n=e[0].match(Gr);if(n)for(s=0;s<n.length;++s){var o=ze(n[s]);switch(ds(o[0])){case"<numFmts":case"</numFmts>":case"<numFmts/>":case"<numFmts>":case"</numFmt>":break;case"<numFmt":var a=ut(Tt(o.formatCode)),l=parseInt(o.numFmtId,10);if(t.NumberFmt[l]=a,l>0){if(l>392){for(l=392;l>60&&null!=t.NumberFmt[l];--l);t.NumberFmt[l]=a}cs(a,l)}break;default:if(r.WTF)throw new Error("unrecognized "+o[0]+" in numFmts")}}}(u,d,c),(u=a.match(s))&&function uO(e,t,r,i){t.Fonts=[];var s={},n=!1;(e[0].match(Gr)||[]).forEach(function(o){var a=ze(o);switch(ds(a[0])){case"<fonts":case"<fonts>":case"</fonts>":case"<font":case"<font>":case"<name/>":case"</name>":case"<sz/>":case"</sz>":case"<vertAlign/>":case"</vertAlign>":case"<family/>":case"</family>":case"<scheme/>":case"</scheme>":case"<color/>":case"</color>":case"<extLst":case"<extLst>":case"</extLst>":break;case"</font>":case"<font/>":t.Fonts.push(s),s={};break;case"<name":a.val&&(s.name=Tt(a.val));break;case"<b":s.bold=a.val?_t(a.val):1;break;case"<b/>":s.bold=1;break;case"<i":s.italic=a.val?_t(a.val):1;break;case"<i/>":s.italic=1;break;case"<u":switch(a.val){case"none":s.underline=0;break;case"single":s.underline=1;break;case"double":s.underline=2;break;case"singleAccounting":s.underline=33;break;case"doubleAccounting":s.underline=34}break;case"<u/>":s.underline=1;break;case"<strike":s.strike=a.val?_t(a.val):1;break;case"<strike/>":s.strike=1;break;case"<outline":s.outline=a.val?_t(a.val):1;break;case"<outline/>":s.outline=1;break;case"<shadow":s.shadow=a.val?_t(a.val):1;break;case"<shadow/>":s.shadow=1;break;case"<condense":s.condense=a.val?_t(a.val):1;break;case"<condense/>":s.condense=1;break;case"<extend":s.extend=a.val?_t(a.val):1;break;case"<extend/>":s.extend=1;break;case"<sz":a.val&&(s.sz=+a.val);break;case"<vertAlign":a.val&&(s.vertAlign=a.val);break;case"<family":a.val&&(s.family=parseInt(a.val,10));break;case"<scheme":a.val&&(s.scheme=a.val);break;case"<charset":if("1"==a.val)break;a.codepage=Oh[parseInt(a.val,10)];break;case"<color":if(s.color||(s.color={}),a.auto&&(s.color.auto=_t(a.auto)),a.rgb)s.color.rgb=a.rgb.slice(-6);else if(a.indexed){s.color.index=parseInt(a.indexed,10);var l=Qn[s.color.index];81==s.color.index&&(l=Qn[1]),l||(l=Qn[1]),s.color.rgb=l[0].toString(16)+l[1].toString(16)+l[2].toString(16)}else a.theme&&(s.color.theme=parseInt(a.theme,10),a.tint&&(s.color.tint=parseFloat(a.tint)),a.theme&&r.themeElements&&r.themeElements.clrScheme&&(s.color.rgb=ed(r.themeElements.clrScheme[s.color.theme].rgb,s.color.tint||0)));break;case"<AlternateContent":case"<ext":n=!0;break;case"</AlternateContent>":case"</ext>":n=!1;break;default:if(i&&i.WTF&&!n)throw new Error("unrecognized "+a[0]+" in fonts")}})}(u,d,l,c),(u=a.match(i))&&function dO(e,t,r,i){t.Fills=[];var s={},n=!1;(e[0].match(Gr)||[]).forEach(function(o){var a=ze(o);switch(ds(a[0])){case"<fills":case"<fills>":case"</fills>":case"</fill>":case"<gradientFill>":case"<patternFill/>":case"</patternFill>":case"<bgColor/>":case"</bgColor>":case"<fgColor/>":case"</fgColor>":case"<stop":case"<stop/>":case"</stop>":case"<color":case"<color/>":case"</color>":case"<extLst":case"<extLst>":case"</extLst>":break;case"<fill>":case"<fill":case"<fill/>":t.Fills.push(s={});break;case"<gradientFill":case"</gradientFill>":t.Fills.push(s),s={};break;case"<patternFill":case"<patternFill>":a.patternType&&(s.patternType=a.patternType);break;case"<bgColor":s.bgColor||(s.bgColor={}),a.indexed&&(s.bgColor.indexed=parseInt(a.indexed,10)),a.theme&&(s.bgColor.theme=parseInt(a.theme,10)),a.tint&&(s.bgColor.tint=parseFloat(a.tint)),a.rgb&&(s.bgColor.rgb=a.rgb.slice(-6));break;case"<fgColor":s.fgColor||(s.fgColor={}),a.theme&&(s.fgColor.theme=parseInt(a.theme,10)),a.tint&&(s.fgColor.tint=parseFloat(a.tint)),null!=a.rgb&&(s.fgColor.rgb=a.rgb.slice(-6));break;case"<ext":n=!0;break;case"</ext>":n=!1;break;default:if(i&&i.WTF&&!n)throw new Error("unrecognized "+a[0]+" in fills")}})}(u,d,0,c),(u=a.match(n))&&function cO(e,t,r,i){t.Borders=[];var s={},n=!1;(e[0].match(Gr)||[]).forEach(function(o){var a=ze(o);switch(ds(a[0])){case"<borders":case"<borders>":case"</borders>":case"</border>":case"<left/>":case"<left":case"<left>":case"</left>":case"<right/>":case"<right":case"<right>":case"</right>":case"<top/>":case"<top":case"<top>":case"</top>":case"<bottom/>":case"<bottom":case"<bottom>":case"</bottom>":case"<diagonal":case"<diagonal>":case"<diagonal/>":case"</diagonal>":case"<horizontal":case"<horizontal>":case"<horizontal/>":case"</horizontal>":case"<vertical":case"<vertical>":case"<vertical/>":case"</vertical>":case"<start":case"<start>":case"<start/>":case"</start>":case"<end":case"<end>":case"<end/>":case"</end>":case"<color":case"<color>":case"<color/>":case"</color>":case"<extLst":case"<extLst>":case"</extLst>":break;case"<border":case"<border>":case"<border/>":s={},a.diagonalUp&&(s.diagonalUp=_t(a.diagonalUp)),a.diagonalDown&&(s.diagonalDown=_t(a.diagonalDown)),t.Borders.push(s);break;case"<ext":n=!0;break;case"</ext>":n=!1;break;default:if(i&&i.WTF&&!n)throw new Error("unrecognized "+a[0]+" in borders")}})}(u,d,0,c),(u=a.match(r))&&function gO(e,t,r){t.CellXf=[];var i,s=!1;(e[0].match(Gr)||[]).forEach(function(n){var o=ze(n),a=0;switch(ds(o[0])){case"<cellXfs":case"<cellXfs>":case"<cellXfs/>":case"</cellXfs>":case"</xf>":case"</alignment>":case"<protection":case"</protection>":case"<protection/>":case"<extLst":case"<extLst>":case"</extLst>":break;case"<xf":case"<xf/>":for(delete(i=o)[0],a=0;a<rd.length;++a)i[rd[a]]&&(i[rd[a]]=parseInt(i[rd[a]],10));for(a=0;a<id.length;++a)i[id[a]]&&(i[id[a]]=_t(i[id[a]]));if(t.NumberFmt&&i.numFmtId>392)for(a=392;a>60;--a)if(t.NumberFmt[i.numFmtId]==t.NumberFmt[a]){i.numFmtId=a;break}t.CellXf.push(i);break;case"<alignment":case"<alignment/>":var l={};o.vertical&&(l.vertical=o.vertical),o.horizontal&&(l.horizontal=o.horizontal),null!=o.textRotation&&(l.textRotation=o.textRotation),o.indent&&(l.indent=o.indent),o.wrapText&&(l.wrapText=_t(o.wrapText)),i.alignment=l;break;case"<AlternateContent":case"<ext":s=!0;break;case"</AlternateContent>":case"</ext>":s=!1;break;default:if(r&&r.WTF&&!s)throw new Error("unrecognized "+o[0]+" in cellXfs")}})}(u,d,c),d):d}}(),bO=Vr,EO=Vr,HO=["</a:lt1>","</a:dk1>","</a:lt2>","</a:dk2>","</a:accent1>","</a:accent2>","</a:accent3>","</a:accent4>","</a:accent5>","</a:accent6>","</a:hlink>","</a:folHlink>"];function GO(e,t,r){t.themeElements.clrScheme=[];var i={};(e[0].match(Gr)||[]).forEach(function(s){var n=ze(s);switch(n[0]){case"<a:clrScheme":case"</a:clrScheme>":break;case"<a:srgbClr":i.rgb=n.val;break;case"<a:sysClr":i.rgb=n.lastClr;break;case"<a:dk1>":case"</a:dk1>":case"<a:lt1>":case"</a:lt1>":case"<a:dk2>":case"</a:dk2>":case"<a:lt2>":case"</a:lt2>":case"<a:accent1>":case"</a:accent1>":case"<a:accent2>":case"</a:accent2>":case"<a:accent3>":case"</a:accent3>":case"<a:accent4>":case"</a:accent4>":case"<a:accent5>":case"</a:accent5>":case"<a:accent6>":case"</a:accent6>":case"<a:hlink>":case"</a:hlink>":case"<a:folHlink>":case"</a:folHlink>":"/"===n[0].charAt(1)?(t.themeElements.clrScheme[HO.indexOf(n[0])]=i,i={}):i.name=n[0].slice(3,n[0].length-1);break;default:if(r&&r.WTF)throw new Error("Unrecognized "+n[0]+" in clrScheme")}})}function VO(){}function zO(){}var WO=/<a:clrScheme([^>]*)>[\s\S]*<\/a:clrScheme>/,UO=/<a:fontScheme([^>]*)>[\s\S]*<\/a:fontScheme>/,$O=/<a:fmtScheme([^>]*)>[\s\S]*<\/a:fmtScheme>/,KO=/<a:themeElements([^>]*)>[\s\S]*<\/a:themeElements>/;function $w(e,t){(!e||0===e.length)&&(e=function Pf(e,t){if(t&&t.themeXLSX)return t.themeXLSX;if(e&&"string"==typeof e.raw)return e.raw;var r=[dr];return r[r.length]='<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">',r[r.length]="<a:themeElements>",r[r.length]='<a:clrScheme name="Office">',r[r.length]='<a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1>',r[r.length]='<a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1>',r[r.length]='<a:dk2><a:srgbClr val="1F497D"/></a:dk2>',r[r.length]='<a:lt2><a:srgbClr val="EEECE1"/></a:lt2>',r[r.length]='<a:accent1><a:srgbClr val="4F81BD"/></a:accent1>',r[r.length]='<a:accent2><a:srgbClr val="C0504D"/></a:accent2>',r[r.length]='<a:accent3><a:srgbClr val="9BBB59"/></a:accent3>',r[r.length]='<a:accent4><a:srgbClr val="8064A2"/></a:accent4>',r[r.length]='<a:accent5><a:srgbClr val="4BACC6"/></a:accent5>',r[r.length]='<a:accent6><a:srgbClr val="F79646"/></a:accent6>',r[r.length]='<a:hlink><a:srgbClr val="0000FF"/></a:hlink>',r[r.length]='<a:folHlink><a:srgbClr val="800080"/></a:folHlink>',r[r.length]="</a:clrScheme>",r[r.length]='<a:fontScheme name="Office">',r[r.length]="<a:majorFont>",r[r.length]='<a:latin typeface="Cambria"/>',r[r.length]='<a:ea typeface=""/>',r[r.length]='<a:cs typeface=""/>',r[r.length]='<a:font script="Jpan" typeface="\uff2d\uff33 \uff30\u30b4\u30b7\u30c3\u30af"/>',r[r.length]='<a:font script="Hang" typeface="\ub9d1\uc740 \uace0\ub515"/>',r[r.length]='<a:font script="Hans" typeface="\u5b8b\u4f53"/>',r[r.length]='<a:font script="Hant" typeface="\u65b0\u7d30\u660e\u9ad4"/>',r[r.length]='<a:font script="Arab" typeface="Times New Roman"/>',r[r.length]='<a:font script="Hebr" typeface="Times New Roman"/>',r[r.length]='<a:font script="Thai" typeface="Tahoma"/>',r[r.length]='<a:font script="Ethi" typeface="Nyala"/>',r[r.length]='<a:font script="Beng" typeface="Vrinda"/>',r[r.length]='<a:font script="Gujr" typeface="Shruti"/>',r[r.length]='<a:font script="Khmr" typeface="MoolBoran"/>',r[r.length]='<a:font script="Knda" typeface="Tunga"/>',r[r.length]='<a:font script="Guru" typeface="Raavi"/>',r[r.length]='<a:font script="Cans" typeface="Euphemia"/>',r[r.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',r[r.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',r[r.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',r[r.length]='<a:font script="Thaa" typeface="MV Boli"/>',r[r.length]='<a:font script="Deva" typeface="Mangal"/>',r[r.length]='<a:font script="Telu" typeface="Gautami"/>',r[r.length]='<a:font script="Taml" typeface="Latha"/>',r[r.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',r[r.length]='<a:font script="Orya" typeface="Kalinga"/>',r[r.length]='<a:font script="Mlym" typeface="Kartika"/>',r[r.length]='<a:font script="Laoo" typeface="DokChampa"/>',r[r.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',r[r.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',r[r.length]='<a:font script="Viet" typeface="Times New Roman"/>',r[r.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',r[r.length]='<a:font script="Geor" typeface="Sylfaen"/>',r[r.length]="</a:majorFont>",r[r.length]="<a:minorFont>",r[r.length]='<a:latin typeface="Calibri"/>',r[r.length]='<a:ea typeface=""/>',r[r.length]='<a:cs typeface=""/>',r[r.length]='<a:font script="Jpan" typeface="\uff2d\uff33 \uff30\u30b4\u30b7\u30c3\u30af"/>',r[r.length]='<a:font script="Hang" typeface="\ub9d1\uc740 \uace0\ub515"/>',r[r.length]='<a:font script="Hans" typeface="\u5b8b\u4f53"/>',r[r.length]='<a:font script="Hant" typeface="\u65b0\u7d30\u660e\u9ad4"/>',r[r.length]='<a:font script="Arab" typeface="Arial"/>',r[r.length]='<a:font script="Hebr" typeface="Arial"/>',r[r.length]='<a:font script="Thai" typeface="Tahoma"/>',r[r.length]='<a:font script="Ethi" typeface="Nyala"/>',r[r.length]='<a:font script="Beng" typeface="Vrinda"/>',r[r.length]='<a:font script="Gujr" typeface="Shruti"/>',r[r.length]='<a:font script="Khmr" typeface="DaunPenh"/>',r[r.length]='<a:font script="Knda" typeface="Tunga"/>',r[r.length]='<a:font script="Guru" typeface="Raavi"/>',r[r.length]='<a:font script="Cans" typeface="Euphemia"/>',r[r.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',r[r.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',r[r.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',r[r.length]='<a:font script="Thaa" typeface="MV Boli"/>',r[r.length]='<a:font script="Deva" typeface="Mangal"/>',r[r.length]='<a:font script="Telu" typeface="Gautami"/>',r[r.length]='<a:font script="Taml" typeface="Latha"/>',r[r.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',r[r.length]='<a:font script="Orya" typeface="Kalinga"/>',r[r.length]='<a:font script="Mlym" typeface="Kartika"/>',r[r.length]='<a:font script="Laoo" typeface="DokChampa"/>',r[r.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',r[r.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',r[r.length]='<a:font script="Viet" typeface="Arial"/>',r[r.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',r[r.length]='<a:font script="Geor" typeface="Sylfaen"/>',r[r.length]="</a:minorFont>",r[r.length]="</a:fontScheme>",r[r.length]='<a:fmtScheme name="Office">',r[r.length]="<a:fillStyleLst>",r[r.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:lin ang="16200000" scaled="1"/>',r[r.length]="</a:gradFill>",r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="100000"/><a:shade val="100000"/><a:satMod val="130000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="50000"/><a:shade val="100000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:lin ang="16200000" scaled="0"/>',r[r.length]="</a:gradFill>",r[r.length]="</a:fillStyleLst>",r[r.length]="<a:lnStyleLst>",r[r.length]='<a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]='<a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]='<a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]="</a:lnStyleLst>",r[r.length]="<a:effectStyleLst>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]="</a:effectStyle>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]="</a:effectStyle>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]='<a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d>',r[r.length]='<a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d>',r[r.length]="</a:effectStyle>",r[r.length]="</a:effectStyleLst>",r[r.length]="<a:bgFillStyleLst>",r[r.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path>',r[r.length]="</a:gradFill>",r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path>',r[r.length]="</a:gradFill>",r[r.length]="</a:bgFillStyleLst>",r[r.length]="</a:fmtScheme>",r[r.length]="</a:themeElements>",r[r.length]="<a:objectDefaults>",r[r.length]="<a:spDef>",r[r.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="1"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="3"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="2"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="lt1"/></a:fontRef></a:style>',r[r.length]="</a:spDef>",r[r.length]="<a:lnDef>",r[r.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style>',r[r.length]="</a:lnDef>",r[r.length]="</a:objectDefaults>",r[r.length]="<a:extraClrSchemeLst/>",r[r.length]="</a:theme>",r.join("")}());var r,i={};if(!(r=e.match(KO)))throw new Error("themeElements not found in theme");return function jO(e,t,r){var i;t.themeElements={},[["clrScheme",WO,GO],["fontScheme",UO,VO],["fmtScheme",$O,zO]].forEach(function(s){if(!(i=e.match(s[1])))throw new Error(s[0]+" not found in themeElements");s[2](i,t,r)})}(r[0],i,t),i.raw=e,i}function ZO(e){var t=e.read_shift(2),r=e.read_shift(2)-4,i=[t];switch(t){case 4:case 5:case 7:case 8:case 9:case 10:case 11:case 13:i[1]=function YO(e){var t={};switch(t.xclrType=e.read_shift(2),t.nTintShade=e.read_shift(2),t.xclrType){case 0:case 4:e.l+=4;break;case 1:t.xclrValue=function QO(e,t){return Vr(e,t)}(e,4);break;case 2:t.xclrValue=pw(e);break;case 3:t.xclrValue=function XO(e){return e.read_shift(4)}(e)}return e.l+=8,t}(e);break;case 6:i[1]=function JO(e,t){return Vr(e,t)}(e,r);break;case 14:case 15:i[1]=e.read_shift(1===r?1:2);break;default:throw new Error("Unrecognized ExtProp type: "+t+" "+r)}return i}function t7(e,t){t.forEach(function(r){})}function qw(e,t,r,i){var n,s=Array.isArray(e);t.forEach(function(o){var a=qt(o.ref);if(s?(e[a.r]||(e[a.r]=[]),n=e[a.r][a.c]):n=e[o.ref],!n){n={t:"z"},s?e[a.r][a.c]=n:e[o.ref]=n;var l=ot(e["!ref"]||"BDWGO1000001:A1");l.s.r>a.r&&(l.s.r=a.r),l.e.r<a.r&&(l.e.r=a.r),l.s.c>a.c&&(l.s.c=a.c),l.e.c<a.c&&(l.e.c=a.c);var c=Ke(l);c!==e["!ref"]&&(e["!ref"]=c)}n.c||(n.c=[]);var d={a:o.author,t:o.t,r:o.r,T:r};o.h&&(d.h=o.h);for(var u=n.c.length-1;u>=0;--u){if(!r&&n.c[u].T)return;r&&!n.c[u].T&&n.c.splice(u,1)}if(r&&i)for(u=0;u<i.length;++u)if(d.a==i[u].id){d.a=i[u].name||d.a;break}n.c.push(d)})}var E7=zr,Qo=function(){var e=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,t={r:0,c:0};function r(i,s,n,o){var a=!1,l=!1;0==n.length?l=!0:"["==n.charAt(0)&&(l=!0,n=n.slice(1,-1)),0==o.length?a=!0:"["==o.charAt(0)&&(a=!0,o=o.slice(1,-1));var c=n.length>0?0|parseInt(n,10):0,d=o.length>0?0|parseInt(o,10):0;return a?d+=t.c:--d,l?c+=t.r:--c,s+(a?"":"$")+Lt(d)+(l?"":"$")+er(c)}return function(s,n){return t=n,s.replace(e,r)}}(),Df=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g,Af=function(){return function(t,r){return t.replace(Df,function(i,s,n,o,a,l){var c=nf(o)-(n?0:r.c),d=sf(l)-(a?0:r.r);return s+"R"+(0==d?"":a?d+1:"["+d+"]")+"C"+(0==c?"":n?c+1:"["+c+"]")})}}();function Qw(e,t){return e.replace(Df,function(r,i,s,n,o,a){return i+("$"==s?s+n:Lt(nf(n)+t.c))+("$"==o?o+a:er(sf(a)+t.r))})}function L7(e,t,r){var s=yi(t).s,n=qt(r);return Qw(e,{r:n.r-s.r,c:n.c-s.c})}function Jw(e){return e.replace(/_xlfn\./g,"")}function fr(e){e.l+=1}function pn(e,t){var r=e.read_shift(1==t?1:2);return[16383&r,r>>14&1,r>>15&1]}function Zw(e,t,r){var i=2;if(r){if(r.biff>=2&&r.biff<=5)return e1(e);12==r.biff&&(i=4)}var s=e.read_shift(i),n=e.read_shift(i),o=pn(e,2),a=pn(e,2);return{s:{r:s,c:o[0],cRel:o[1],rRel:o[2]},e:{r:n,c:a[0],cRel:a[1],rRel:a[2]}}}function e1(e){var t=pn(e,2),r=pn(e,2),i=e.read_shift(1),s=e.read_shift(1);return{s:{r:t[0],c:i,cRel:t[1],rRel:t[2]},e:{r:r[0],c:s,cRel:r[1],rRel:r[2]}}}function t1(e,t,r){if(r&&r.biff>=2&&r.biff<=5)return function N7(e){var t=pn(e,2),r=e.read_shift(1);return{r:t[0],c:r,cRel:t[1],rRel:t[2]}}(e);var i=e.read_shift(r&&12==r.biff?4:2),s=pn(e,2);return{r:i,c:s[0],cRel:s[1],rRel:s[2]}}function H7(e){var t=e.read_shift(2),r=e.read_shift(2);return{r:t,c:255&r,fQuoted:!!(16384&r),cRel:r>>15,rRel:r>>15}}function r1(e){var t=1&e[e.l+1];return e.l+=4,[t,1]}function i1(e){return[e.read_shift(1),e.read_shift(1)]}function gB(e,t){var r=[e.read_shift(1)];if(12==t)switch(r[0]){case 2:r[0]=4;break;case 4:r[0]=16;break;case 0:r[0]=1;break;case 1:r[0]=2}switch(r[0]){case 4:r[1]=or(e,1)?"TRUE":"FALSE",12!=t&&(e.l+=7);break;case 37:case 16:r[1]=Ms[e[e.l]],e.l+=12==t?4:8;break;case 0:e.l+=8;break;case 1:r[1]=Wr(e);break;case 2:r[1]=eo(e,0,{biff:t>0&&t<8?2:t});break;default:throw new Error("Bad SerAr: "+r[0])}return r}function pB(e,t,r){for(var i=e.read_shift(12==r.biff?4:2),s=[],n=0;n!=i;++n)s.push((12==r.biff?Xn:Jc)(e,8));return s}function mB(e,t,r){var i=0,s=0;12==r.biff?(i=e.read_shift(4),s=e.read_shift(4)):(s=1+e.read_shift(1),i=1+e.read_shift(2)),r.biff>=2&&r.biff<8&&(--i,0==--s&&(s=256));for(var n=0,o=[];n!=i&&(o[n]=[]);++n)for(var a=0;a!=s;++a)o[n][a]=gB(e,r.biff);return o}function cl(e,t,r){return e.l+=2,[H7(e)]}function Mf(e){return e.l+=6,[]}function s1(e){return e.l+=2,[hr(e),1&e.read_shift(2)]}var OB=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"],n1={1:{n:"PtgExp",f:function lB(e,t,r){return e.l++,r&&12==r.biff?[e.read_shift(4,"i"),0]:[e.read_shift(2),e.read_shift(r&&2==r.biff?1:2)]}},2:{n:"PtgTbl",f:Vr},3:{n:"PtgAdd",f:fr},4:{n:"PtgSub",f:fr},5:{n:"PtgMul",f:fr},6:{n:"PtgDiv",f:fr},7:{n:"PtgPower",f:fr},8:{n:"PtgConcat",f:fr},9:{n:"PtgLt",f:fr},10:{n:"PtgLe",f:fr},11:{n:"PtgEq",f:fr},12:{n:"PtgGe",f:fr},13:{n:"PtgGt",f:fr},14:{n:"PtgNe",f:fr},15:{n:"PtgIsect",f:fr},16:{n:"PtgUnion",f:fr},17:{n:"PtgRange",f:fr},18:{n:"PtgUplus",f:fr},19:{n:"PtgUminus",f:fr},20:{n:"PtgPercent",f:fr},21:{n:"PtgParen",f:fr},22:{n:"PtgMissArg",f:fr},23:{n:"PtgStr",f:function fB(e,t,r){return e.l++,rl(e,0,r)}},26:{n:"PtgSheet",f:function HB(e,t,r){return e.l+=5,e.l+=2,e.l+=2==r.biff?1:4,["PTGSHEET"]}},27:{n:"PtgEndSheet",f:function GB(e,t,r){return e.l+=2==r.biff?4:5,["PTGENDSHEET"]}},28:{n:"PtgErr",f:function cB(e){return e.l++,Ms[e.read_shift(1)]}},29:{n:"PtgBool",f:function uB(e){return e.l++,0!==e.read_shift(1)}},30:{n:"PtgInt",f:function dB(e){return e.l++,e.read_shift(2)}},31:{n:"PtgNum",f:function hB(e){return e.l++,Wr(e)}},32:{n:"PtgArray",f:function K7(e,t,r){var i=(96&e[e.l++])>>5;return e.l+=2==r.biff?6:12==r.biff?14:7,[i]}},33:{n:"PtgFunc",f:function sB(e,t,r){var i=(96&e[e.l])>>5;e.l+=1;var s=e.read_shift(r&&r.biff<=3?1:2);return[aN[s],l1[s],i]}},34:{n:"PtgFuncVar",f:function nB(e,t,r){var i=e[e.l++],s=e.read_shift(1),n=r&&r.biff<=3?[88==i?-1:0,e.read_shift(1)]:function oB(e){return[e[e.l+1]>>7,32767&e.read_shift(2)]}(e);return[s,(0===n[0]?l1:oN)[n[1]]]}},35:{n:"PtgName",f:function vB(e,t,r){var i=e.read_shift(1)>>>5&3,n=e.read_shift(!r||r.biff>=8?4:2);switch(r.biff){case 2:e.l+=5;break;case 3:case 4:e.l+=8;break;case 5:e.l+=12}return[i,0,n]}},36:{n:"PtgRef",f:function tB(e,t,r){var i=(96&e[e.l])>>5;return e.l+=1,[i,t1(e,0,r)]}},37:{n:"PtgArea",f:function z7(e,t,r){return[(96&e[e.l++])>>5,Zw(e,0,r)]}},38:{n:"PtgMemArea",f:function xB(e,t,r){var i=e.read_shift(1)>>>5&3;return e.l+=r&&2==r.biff?3:4,[i,e.read_shift(r&&2==r.biff?1:2)]}},39:{n:"PtgMemErr",f:Vr},40:{n:"PtgMemNoMem",f:Vr},41:{n:"PtgMemFunc",f:function SB(e,t,r){return[e.read_shift(1)>>>5&3,e.read_shift(r&&2==r.biff?1:2)]}},42:{n:"PtgRefErr",f:function bB(e,t,r){var i=e.read_shift(1)>>>5&3;return e.l+=4,r.biff<8&&e.l--,12==r.biff&&(e.l+=2),[i]}},43:{n:"PtgAreaErr",f:function U7(e,t,r){var i=(96&e[e.l++])>>5;return e.l+=r&&r.biff>8?12:r.biff<8?6:8,[i]}},44:{n:"PtgRefN",f:function rB(e,t,r){var i=(96&e[e.l])>>5;e.l+=1;var s=function G7(e,t,r){var i=r&&r.biff?r.biff:8;if(i>=2&&i<=5)return function V7(e){var t=e.read_shift(2),r=e.read_shift(1),i=(32768&t)>>15,s=(16384&t)>>14;return t&=16383,1==i&&t>=8192&&(t-=16384),1==s&&r>=128&&(r-=256),{r:t,c:r,cRel:s,rRel:i}}(e);var s=e.read_shift(i>=12?4:2),n=e.read_shift(2),o=(16384&n)>>14,a=(32768&n)>>15;if(n&=16383,1==a)for(;s>524287;)s-=1048576;if(1==o)for(;n>8191;)n-=16384;return{r:s,c:n,cRel:o,rRel:a}}(e,0,r);return[i,s]}},45:{n:"PtgAreaN",f:function j7(e,t,r){var i=(96&e[e.l++])>>5,s=function B7(e,t,r){if(r.biff<8)return e1(e);var i=e.read_shift(12==r.biff?4:2),s=e.read_shift(12==r.biff?4:2),n=pn(e,2),o=pn(e,2);return{s:{r:i,c:n[0],cRel:n[1],rRel:n[2]},e:{r:s,c:o[0],cRel:o[1],rRel:o[2]}}}(e,0,r);return[i,s]}},46:{n:"PtgMemAreaN",f:function VB(e){return[e.read_shift(1)>>>5&3,e.read_shift(2)]}},47:{n:"PtgMemNoMemN",f:function zB(e){return[e.read_shift(1)>>>5&3,e.read_shift(2)]}},57:{n:"PtgNameX",f:function CB(e,t,r){return 5==r.biff?function wB(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2,"i");e.l+=8;var i=e.read_shift(2);return e.l+=12,[t,r,i]}(e):[e.read_shift(1)>>>5&3,e.read_shift(2),e.read_shift(4)]}},58:{n:"PtgRef3d",f:function iB(e,t,r){var i=(96&e[e.l])>>5;e.l+=1;var s=e.read_shift(2);return r&&5==r.biff&&(e.l+=12),[i,s,t1(e,0,r)]}},59:{n:"PtgArea3d",f:function W7(e,t,r){var i=(96&e[e.l++])>>5,s=e.read_shift(2,"i");if(r&&5===r.biff)e.l+=12;return[i,s,Zw(e,0,r)]}},60:{n:"PtgRefErr3d",f:function yB(e,t,r){var i=(96&e[e.l++])>>5,s=e.read_shift(2),n=4;if(r)switch(r.biff){case 5:n=15;break;case 12:n=6}return e.l+=n,[i,s]}},61:{n:"PtgAreaErr3d",f:function $7(e,t,r){var i=(96&e[e.l++])>>5,s=e.read_shift(2),n=8;if(r)switch(r.biff){case 5:e.l+=12,n=6;break;case 12:n=12}return e.l+=n,[i,s]}},255:{}},UB={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,78:46,110:46,79:47,111:47,88:34,120:34,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61},$B={1:{n:"PtgElfLel",f:s1},2:{n:"PtgElfRw",f:cl},3:{n:"PtgElfCol",f:cl},6:{n:"PtgElfRwV",f:cl},7:{n:"PtgElfColV",f:cl},10:{n:"PtgElfRadical",f:cl},11:{n:"PtgElfRadicalS",f:Mf},13:{n:"PtgElfColS",f:Mf},15:{n:"PtgElfColSV",f:Mf},16:{n:"PtgElfRadicalLel",f:s1},25:{n:"PtgList",f:function BB(e){e.l+=2;var t=e.read_shift(2),r=e.read_shift(2),i=e.read_shift(4),s=e.read_shift(2),n=e.read_shift(2);return{ixti:t,coltype:3&r,rt:OB[r>>2&31],idx:i,c:s,C:n}}},29:{n:"PtgSxName",f:function NB(e){return e.l+=2,[e.read_shift(4)]}},255:{}},jB={0:{n:"PtgAttrNoop",f:function WB(e){return e.l+=4,[0,0]}},1:{n:"PtgAttrSemi",f:function J7(e,t,r){var i=255&e[e.l+1]?1:0;return e.l+=r&&2==r.biff?3:4,[i]}},2:{n:"PtgAttrIf",f:function Y7(e,t,r){var i=255&e[e.l+1]?1:0;return e.l+=2,[i,e.read_shift(r&&2==r.biff?1:2)]}},4:{n:"PtgAttrChoose",f:function q7(e,t,r){e.l+=2;for(var i=e.read_shift(r&&2==r.biff?1:2),s=[],n=0;n<=i;++n)s.push(e.read_shift(r&&2==r.biff?1:2));return s}},8:{n:"PtgAttrGoto",f:function X7(e,t,r){var i=255&e[e.l+1]?1:0;return e.l+=2,[i,e.read_shift(r&&2==r.biff?1:2)]}},16:{n:"PtgAttrSum",f:function aB(e,t,r){e.l+=r&&2==r.biff?3:4}},32:{n:"PtgAttrBaxcel",f:r1},33:{n:"PtgAttrBaxcel",f:r1},64:{n:"PtgAttrSpace",f:function Z7(e){return e.read_shift(2),i1(e)}},65:{n:"PtgAttrSpaceSemi",f:function eB(e){return e.read_shift(2),i1(e)}},128:{n:"PtgAttrIfError",f:function Q7(e){var t=255&e[e.l+1]?1:0;return e.l+=2,[t,e.read_shift(2)]}},255:{}};function dl(e,t,r,i){if(i.biff<8)return Vr(e,t);for(var s=e.l+t,n=[],o=0;o!==r.length;++o)switch(r[o][0]){case"PtgArray":r[o][1]=mB(e,0,i),n.push(r[o][1]);break;case"PtgMemArea":r[o][2]=pB(e,0,i),n.push(r[o][2]);break;case"PtgExp":i&&12==i.biff&&(r[o][1][1]=e.read_shift(4),n.push(r[o][1]));break;case"PtgList":case"PtgElfRadicalS":case"PtgElfColS":case"PtgElfColSV":throw"Unsupported "+r[o][0]}return 0!==(t=s-e.l)&&n.push(Vr(e,t)),n}function ul(e,t,r){for(var s,n,i=e.l+t,o=[];i!=e.l;)t=i-e.l,s=n1[n=e[e.l]]||n1[UB[n]],(24===n||25===n)&&(s=(24===n?$B:jB)[e[e.l+1]]),s&&s.f?o.push([s.n,s.f(e,t,r)]):Vr(e,t);return o}function KB(e){for(var t=[],r=0;r<e.length;++r){for(var i=e[r],s=[],n=0;n<i.length;++n){var o=i[n];s.push(o?2===o[0]?'"'+o[1].replace(/"/g,'""')+'"':o[1]:"")}t.push(s.join(","))}return t.join(";")}var qB={PtgAdd:"+",PtgConcat:"&",PtgDiv:"/",PtgEq:"=",PtgGe:">=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function o1(e,t,r){if(!e)return"SH33TJSERR0";if(r.biff>8&&(!e.XTI||!e.XTI[t]))return e.SheetNames[t];if(!e.XTI)return"SH33TJSERR6";var i=e.XTI[t];if(r.biff<8)return t>1e4&&(t-=65536),t<0&&(t=-t),0==t?"":e.XTI[t-1];if(!i)return"SH33TJSERR1";var s="";if(r.biff>8)switch(e[i[0]][0]){case 357:return s=-1==i[1]?"#REF":e.SheetNames[i[1]],i[1]==i[2]?s:s+":"+e.SheetNames[i[2]];case 358:return null!=r.SID?e.SheetNames[r.SID]:"SH33TJSSAME"+e[i[0]][0];default:return"SH33TJSSRC"+e[i[0]][0]}switch(e[i[0]][0][0]){case 1025:return s=-1==i[1]?"#REF":e.SheetNames[i[1]]||"SH33TJSERR3",i[1]==i[2]?s:s+":"+e.SheetNames[i[2]];case 14849:return e[i[0]].slice(1).map(function(n){return n.Name}).join(";;");default:return e[i[0]][0][3]?(s=-1==i[1]?"#REF":e[i[0]][0][3][i[1]]||"SH33TJSERR4",i[1]==i[2]?s:s+":"+e[i[0]][0][3][i[2]]):"SH33TJSERR2"}}function a1(e,t,r){var i=o1(e,t,r);return"#REF"==i?i:function XB(e,t){if(!(e||t&&t.biff<=5&&t.biff>=2))throw new Error("empty sheet name");return/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(e)?"'"+e+"'":e}(i,r)}function jr(e,t,r,i,s){var l,c,d,f,n=s&&s.biff||8,o={s:{c:0,r:0},e:{c:0,r:0}},a=[],u=0,h=0,p="";if(!e[0]||!e[0][0])return"";for(var g=-1,m="",v=0,w=e[0].length;v<w;++v){var C=e[0][v];switch(C[0]){case"PtgUminus":a.push("-"+a.pop());break;case"PtgUplus":a.push("+"+a.pop());break;case"PtgPercent":a.push(a.pop()+"%");break;case"PtgAdd":case"PtgConcat":case"PtgDiv":case"PtgEq":case"PtgGe":case"PtgGt":case"PtgLe":case"PtgLt":case"PtgMul":case"PtgNe":case"PtgPower":case"PtgSub":if(l=a.pop(),c=a.pop(),g>=0){switch(e[0][g][1][0]){case 0:m=Zt(" ",e[0][g][1][1]);break;case 1:m=Zt("\r",e[0][g][1][1]);break;default:if(m="",s.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][g][1][0])}c+=m,g=-1}a.push(c+qB[C[0]]+l);break;case"PtgIsect":l=a.pop(),c=a.pop(),a.push(c+" "+l);break;case"PtgUnion":l=a.pop(),c=a.pop(),a.push(c+","+l);break;case"PtgRange":l=a.pop(),c=a.pop(),a.push(c+":"+l);break;case"PtgAttrChoose":case"PtgAttrGoto":case"PtgAttrIf":case"PtgAttrIfError":case"PtgAttrBaxcel":case"PtgAttrSemi":case"PtgMemArea":case"PtgTbl":case"PtgMemErr":case"PtgMemAreaN":case"PtgMemNoMemN":case"PtgAttrNoop":case"PtgSheet":case"PtgEndSheet":case"PtgMemFunc":case"PtgMemNoMem":break;case"PtgRef":d=Ja(C[1][1],o,s),a.push(Za(d,n));break;case"PtgRefN":d=r?Ja(C[1][1],r,s):C[1][1],a.push(Za(d,n));break;case"PtgRef3d":u=C[1][1],d=Ja(C[1][2],o,s),p=a1(i,u,s),a.push(p+"!"+Za(d,n));break;case"PtgFunc":case"PtgFuncVar":var k=C[1][0],E=C[1][1];k||(k=0);var S=0==(k&=127)?[]:a.slice(-k);a.length-=k,"User"===E&&(E=S.shift()),a.push(E+"("+S.join(",")+")");break;case"PtgBool":a.push(C[1]?"TRUE":"FALSE");break;case"PtgInt":case"PtgErr":a.push(C[1]);break;case"PtgNum":a.push(String(C[1]));break;case"PtgStr":a.push('"'+C[1].replace(/"/g,'""')+'"');break;case"PtgAreaN":f=LC(C[1][1],r?{s:r}:o,s),a.push(rf(f,s));break;case"PtgArea":f=LC(C[1][1],o,s),a.push(rf(f,s));break;case"PtgArea3d":f=C[1][2],p=a1(i,u=C[1][1],s),a.push(p+"!"+rf(f,s));break;case"PtgAttrSum":a.push("SUM("+a.pop()+")");break;case"PtgName":var _=(i.names||[])[(h=C[1][2])-1]||(i[0]||[])[h],M=_?_.Name:"SH33TJSNAME"+String(h);M&&"_xlfn."==M.slice(0,6)&&!s.xlfn&&(M=M.slice(6)),a.push(M);break;case"PtgNameX":var V,H=C[1][1];if(h=C[1][2],!(s.biff<=5)){var B="";if(14849==((i[H]||[])[0]||[])[0]||(1025==((i[H]||[])[0]||[])[0]?i[H][h]&&i[H][h].itab>0&&(B=i.SheetNames[i[H][h].itab-1]+"!"):B=i.SheetNames[h-1]+"!"),i[H]&&i[H][h])B+=i[H][h].Name;else if(i[0]&&i[0][h])B+=i[0][h].Name;else{var re=(o1(i,H,s)||"").split(";;");re[h-1]?B=re[h-1]:B+="SH33TJSERRX"}a.push(B);break}H<0&&(H=-H),i[H]&&(V=i[H][h]),V||(V={Name:"SH33TJSERRY"}),a.push(V.Name);break;case"PtgParen":var ue="(",oe=")";if(g>=0){switch(m="",e[0][g][1][0]){case 2:ue=Zt(" ",e[0][g][1][1])+ue;break;case 3:ue=Zt("\r",e[0][g][1][1])+ue;break;case 4:oe=Zt(" ",e[0][g][1][1])+oe;break;case 5:oe=Zt("\r",e[0][g][1][1])+oe;break;default:if(s.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][g][1][0])}g=-1}a.push(ue+a.pop()+oe);break;case"PtgRefErr":case"PtgRefErr3d":case"PtgAreaErr":case"PtgAreaErr3d":a.push("#REF!");break;case"PtgExp":var Ae={c:r.c,r:r.r};if(i.sharedf[We(d={c:C[1][1],r:C[1][0]})]){var ke=i.sharedf[We(d)];a.push(jr(ke,0,Ae,i,s))}else{var Ze=!1;for(l=0;l!=i.arrayf.length;++l)if(!(d.c<(c=i.arrayf[l])[0].s.c||d.c>c[0].e.c||d.r<c[0].s.r||d.r>c[0].e.r)){a.push(jr(c[1],0,Ae,i,s)),Ze=!0;break}Ze||a.push(C[1])}break;case"PtgArray":a.push("{"+KB(C[1])+"}");break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":g=v;break;case"PtgMissArg":a.push("");break;case"PtgList":a.push("Table"+C[1].idx+"[#"+C[1].rt+"]");break;case"PtgElfCol":case"PtgElfColS":case"PtgElfColSV":case"PtgElfColV":case"PtgElfLel":case"PtgElfRadical":case"PtgElfRadicalLel":case"PtgElfRadicalS":case"PtgElfRw":case"PtgElfRwV":throw new Error("Unsupported ELFs");default:throw new Error("Unrecognized Formula Token: "+String(C))}if(3!=s.biff&&g>=0&&-1==["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"].indexOf(e[0][v][0])){var be=!0;switch((C=e[0][g])[1][0]){case 4:be=!1;case 0:m=Zt(" ",C[1][1]);break;case 5:be=!1;case 1:m=Zt("\r",C[1][1]);break;default:if(m="",s.WTF)throw new Error("Unexpected PtgAttrSpaceType "+C[1][0])}a.push((be?m:"")+a.pop()+(be?"":m)),g=-1}}if(a.length>1&&s.WTF)throw new Error("bad formula stack");return a[0]}function YB(e,t,r){var n,i=e.l+t,s=2==r.biff?1:2,o=e.read_shift(s);if(65535==o)return[[],Vr(e,t-2)];var a=ul(e,o,r);return t!==o+s&&(n=dl(e,t-o-s,a,r)),e.l=i,[a,n]}function ZB(e,t,r){var s,i=e.l+t,n=e.read_shift(2),o=ul(e,n,r);return 65535==n?[[],Vr(e,t-2)]:(t!==n+2&&(s=dl(e,i-n-2,o,r)),[o,s])}function If(e,t,r){var i=e.l+t,s=fs(e);2==r.biff&&++e.l;var n=function eN(e){var t;if(65535!==Ds(e,e.l+6))return[Wr(e),"n"];switch(e[e.l]){case 0:return e.l+=8,["String","s"];case 1:return t=1===e[e.l+2],e.l+=8,[t,"b"];case 2:return t=e[e.l+2],e.l+=8,[t,"e"];case 3:return e.l+=8,["","s"]}return[]}(e),o=e.read_shift(1);2!=r.biff&&(e.read_shift(1),r.biff>=5&&e.read_shift(4));var a=function QB(e,t,r){var n,i=e.l+t,s=2==r.biff?1:2,o=e.read_shift(s);if(65535==o)return[[],Vr(e,t-2)];var a=ul(e,o,r);return t!==o+s&&(n=dl(e,t-o-s,a,r)),e.l=i,[a,n]}(e,i-e.l,r);return{cell:s,val:n[0],formula:a,shared:o>>3&1,tt:n[1]}}function sd(e,t,r){var i=e.read_shift(4),s=ul(e,i,r),n=e.read_shift(4);return[s,n>0?dl(e,n,s,r):null]}var iN=sd,nd=sd,sN=sd,nN=sd,oN={0:"BEEP",1:"OPEN",2:"OPEN.LINKS",3:"CLOSE.ALL",4:"SAVE",5:"SAVE.AS",6:"FILE.DELETE",7:"PAGE.SETUP",8:"PRINT",9:"PRINTER.SETUP",10:"QUIT",11:"NEW.WINDOW",12:"ARRANGE.ALL",13:"WINDOW.SIZE",14:"WINDOW.MOVE",15:"FULL",16:"CLOSE",17:"RUN",22:"SET.PRINT.AREA",23:"SET.PRINT.TITLES",24:"SET.PAGE.BREAK",25:"REMOVE.PAGE.BREAK",26:"FONT",27:"DISPLAY",28:"PROTECT.DOCUMENT",29:"PRECISION",30:"A1.R1C1",31:"CALCULATE.NOW",32:"CALCULATION",34:"DATA.FIND",35:"EXTRACT",36:"DATA.DELETE",37:"SET.DATABASE",38:"SET.CRITERIA",39:"SORT",40:"DATA.SERIES",41:"TABLE",42:"FORMAT.NUMBER",43:"ALIGNMENT",44:"STYLE",45:"BORDER",46:"CELL.PROTECTION",47:"COLUMN.WIDTH",48:"UNDO",49:"CUT",50:"COPY",51:"PASTE",52:"CLEAR",53:"PASTE.SPECIAL",54:"EDIT.DELETE",55:"INSERT",56:"FILL.RIGHT",57:"FILL.DOWN",61:"DEFINE.NAME",62:"CREATE.NAMES",63:"FORMULA.GOTO",64:"FORMULA.FIND",65:"SELECT.LAST.CELL",66:"SHOW.ACTIVE.CELL",67:"GALLERY.AREA",68:"GALLERY.BAR",69:"GALLERY.COLUMN",70:"GALLERY.LINE",71:"GALLERY.PIE",72:"GALLERY.SCATTER",73:"COMBINATION",74:"PREFERRED",75:"ADD.OVERLAY",76:"GRIDLINES",77:"SET.PREFERRED",78:"AXES",79:"LEGEND",80:"ATTACH.TEXT",81:"ADD.ARROW",82:"SELECT.CHART",83:"SELECT.PLOT.AREA",84:"PATTERNS",85:"MAIN.CHART",86:"OVERLAY",87:"SCALE",88:"FORMAT.LEGEND",89:"FORMAT.TEXT",90:"EDIT.REPEAT",91:"PARSE",92:"JUSTIFY",93:"HIDE",94:"UNHIDE",95:"WORKSPACE",96:"FORMULA",97:"FORMULA.FILL",98:"FORMULA.ARRAY",99:"DATA.FIND.NEXT",100:"DATA.FIND.PREV",101:"FORMULA.FIND.NEXT",102:"FORMULA.FIND.PREV",103:"ACTIVATE",104:"ACTIVATE.NEXT",105:"ACTIVATE.PREV",106:"UNLOCKED.NEXT",107:"UNLOCKED.PREV",108:"COPY.PICTURE",109:"SELECT",110:"DELETE.NAME",111:"DELETE.FORMAT",112:"VLINE",113:"HLINE",114:"VPAGE",115:"HPAGE",116:"VSCROLL",117:"HSCROLL",118:"ALERT",119:"NEW",120:"CANCEL.COPY",121:"SHOW.CLIPBOARD",122:"MESSAGE",124:"PASTE.LINK",125:"APP.ACTIVATE",126:"DELETE.ARROW",127:"ROW.HEIGHT",128:"FORMAT.MOVE",129:"FORMAT.SIZE",130:"FORMULA.REPLACE",131:"SEND.KEYS",132:"SELECT.SPECIAL",133:"APPLY.NAMES",134:"REPLACE.FONT",135:"FREEZE.PANES",136:"SHOW.INFO",137:"SPLIT",138:"ON.WINDOW",139:"ON.DATA",140:"DISABLE.INPUT",142:"OUTLINE",143:"LIST.NAMES",144:"FILE.CLOSE",145:"SAVE.WORKBOOK",146:"DATA.FORM",147:"COPY.CHART",148:"ON.TIME",149:"WAIT",150:"FORMAT.FONT",151:"FILL.UP",152:"FILL.LEFT",153:"DELETE.OVERLAY",155:"SHORT.MENUS",159:"SET.UPDATE.STATUS",161:"COLOR.PALETTE",162:"DELETE.STYLE",163:"WINDOW.RESTORE",164:"WINDOW.MAXIMIZE",166:"CHANGE.LINK",167:"CALCULATE.DOCUMENT",168:"ON.KEY",169:"APP.RESTORE",170:"APP.MOVE",171:"APP.SIZE",172:"APP.MINIMIZE",173:"APP.MAXIMIZE",174:"BRING.TO.FRONT",175:"SEND.TO.BACK",185:"MAIN.CHART.TYPE",186:"OVERLAY.CHART.TYPE",187:"SELECT.END",188:"OPEN.MAIL",189:"SEND.MAIL",190:"STANDARD.FONT",191:"CONSOLIDATE",192:"SORT.SPECIAL",193:"GALLERY.3D.AREA",194:"GALLERY.3D.COLUMN",195:"GALLERY.3D.LINE",196:"GALLERY.3D.PIE",197:"VIEW.3D",198:"GOAL.SEEK",199:"WORKGROUP",200:"FILL.GROUP",201:"UPDATE.LINK",202:"PROMOTE",203:"DEMOTE",204:"SHOW.DETAIL",206:"UNGROUP",207:"OBJECT.PROPERTIES",208:"SAVE.NEW.OBJECT",209:"SHARE",210:"SHARE.NAME",211:"DUPLICATE",212:"APPLY.STYLE",213:"ASSIGN.TO.OBJECT",214:"OBJECT.PROTECTION",215:"HIDE.OBJECT",216:"SET.EXTRACT",217:"CREATE.PUBLISHER",218:"SUBSCRIBE.TO",219:"ATTRIBUTES",220:"SHOW.TOOLBAR",222:"PRINT.PREVIEW",223:"EDIT.COLOR",224:"SHOW.LEVELS",225:"FORMAT.MAIN",226:"FORMAT.OVERLAY",227:"ON.RECALC",228:"EDIT.SERIES",229:"DEFINE.STYLE",240:"LINE.PRINT",243:"ENTER.DATA",249:"GALLERY.RADAR",250:"MERGE.STYLES",251:"EDITION.OPTIONS",252:"PASTE.PICTURE",253:"PASTE.PICTURE.LINK",254:"SPELLING",256:"ZOOM",259:"INSERT.OBJECT",260:"WINDOW.MINIMIZE",265:"SOUND.NOTE",266:"SOUND.PLAY",267:"FORMAT.SHAPE",268:"EXTEND.POLYGON",269:"FORMAT.AUTO",272:"GALLERY.3D.BAR",273:"GALLERY.3D.SURFACE",274:"FILL.AUTO",276:"CUSTOMIZE.TOOLBAR",277:"ADD.TOOL",278:"EDIT.OBJECT",279:"ON.DOUBLECLICK",280:"ON.ENTRY",281:"WORKBOOK.ADD",282:"WORKBOOK.MOVE",283:"WORKBOOK.COPY",284:"WORKBOOK.OPTIONS",285:"SAVE.WORKSPACE",288:"CHART.WIZARD",289:"DELETE.TOOL",290:"MOVE.TOOL",291:"WORKBOOK.SELECT",292:"WORKBOOK.ACTIVATE",293:"ASSIGN.TO.TOOL",295:"COPY.TOOL",296:"RESET.TOOL",297:"CONSTRAIN.NUMERIC",298:"PASTE.TOOL",302:"WORKBOOK.NEW",305:"SCENARIO.CELLS",306:"SCENARIO.DELETE",307:"SCENARIO.ADD",308:"SCENARIO.EDIT",309:"SCENARIO.SHOW",310:"SCENARIO.SHOW.NEXT",311:"SCENARIO.SUMMARY",312:"PIVOT.TABLE.WIZARD",313:"PIVOT.FIELD.PROPERTIES",314:"PIVOT.FIELD",315:"PIVOT.ITEM",316:"PIVOT.ADD.FIELDS",318:"OPTIONS.CALCULATION",319:"OPTIONS.EDIT",320:"OPTIONS.VIEW",321:"ADDIN.MANAGER",322:"MENU.EDITOR",323:"ATTACH.TOOLBARS",324:"VBAActivate",325:"OPTIONS.CHART",328:"VBA.INSERT.FILE",330:"VBA.PROCEDURE.DEFINITION",336:"ROUTING.SLIP",338:"ROUTE.DOCUMENT",339:"MAIL.LOGON",342:"INSERT.PICTURE",343:"EDIT.TOOL",344:"GALLERY.DOUGHNUT",350:"CHART.TREND",352:"PIVOT.ITEM.PROPERTIES",354:"WORKBOOK.INSERT",355:"OPTIONS.TRANSITION",356:"OPTIONS.GENERAL",370:"FILTER.ADVANCED",373:"MAIL.ADD.MAILER",374:"MAIL.DELETE.MAILER",375:"MAIL.REPLY",376:"MAIL.REPLY.ALL",377:"MAIL.FORWARD",378:"MAIL.NEXT.LETTER",379:"DATA.LABEL",380:"INSERT.TITLE",381:"FONT.PROPERTIES",382:"MACRO.OPTIONS",383:"WORKBOOK.HIDE",384:"WORKBOOK.UNHIDE",385:"WORKBOOK.DELETE",386:"WORKBOOK.NAME",388:"GALLERY.CUSTOM",390:"ADD.CHART.AUTOFORMAT",391:"DELETE.CHART.AUTOFORMAT",392:"CHART.ADD.DATA",393:"AUTO.OUTLINE",394:"TAB.ORDER",395:"SHOW.DIALOG",396:"SELECT.ALL",397:"UNGROUP.SHEETS",398:"SUBTOTAL.CREATE",399:"SUBTOTAL.REMOVE",400:"RENAME.OBJECT",412:"WORKBOOK.SCROLL",413:"WORKBOOK.NEXT",414:"WORKBOOK.PREV",415:"WORKBOOK.TAB.SPLIT",416:"FULL.SCREEN",417:"WORKBOOK.PROTECT",420:"SCROLLBAR.PROPERTIES",421:"PIVOT.SHOW.PAGES",422:"TEXT.TO.COLUMNS",423:"FORMAT.CHARTTYPE",424:"LINK.FORMAT",425:"TRACER.DISPLAY",430:"TRACER.NAVIGATE",431:"TRACER.CLEAR",432:"TRACER.ERROR",433:"PIVOT.FIELD.GROUP",434:"PIVOT.FIELD.UNGROUP",435:"CHECKBOX.PROPERTIES",436:"LABEL.PROPERTIES",437:"LISTBOX.PROPERTIES",438:"EDITBOX.PROPERTIES",439:"PIVOT.REFRESH",440:"LINK.COMBO",441:"OPEN.TEXT",442:"HIDE.DIALOG",443:"SET.DIALOG.FOCUS",444:"ENABLE.OBJECT",445:"PUSHBUTTON.PROPERTIES",446:"SET.DIALOG.DEFAULT",447:"FILTER",448:"FILTER.SHOW.ALL",449:"CLEAR.OUTLINE",450:"FUNCTION.WIZARD",451:"ADD.LIST.ITEM",452:"SET.LIST.ITEM",453:"REMOVE.LIST.ITEM",454:"SELECT.LIST.ITEM",455:"SET.CONTROL.VALUE",456:"SAVE.COPY.AS",458:"OPTIONS.LISTS.ADD",459:"OPTIONS.LISTS.DELETE",460:"SERIES.AXES",461:"SERIES.X",462:"SERIES.Y",463:"ERRORBAR.X",464:"ERRORBAR.Y",465:"FORMAT.CHART",466:"SERIES.ORDER",467:"MAIL.LOGOFF",468:"CLEAR.ROUTING.SLIP",469:"APP.ACTIVATE.MICROSOFT",470:"MAIL.EDIT.MAILER",471:"ON.SHEET",472:"STANDARD.WIDTH",473:"SCENARIO.MERGE",474:"SUMMARY.INFO",475:"FIND.FILE",476:"ACTIVE.CELL.FONT",477:"ENABLE.TIPWIZARD",478:"VBA.MAKE.ADDIN",480:"INSERTDATATABLE",481:"WORKGROUP.OPTIONS",482:"MAIL.SEND.MAILER",485:"AUTOCORRECT",489:"POST.DOCUMENT",491:"PICKLIST",493:"VIEW.SHOW",494:"VIEW.DEFINE",495:"VIEW.DELETE",509:"SHEET.BACKGROUND",510:"INSERT.MAP.OBJECT",511:"OPTIONS.MENONO",517:"MSOCHECKS",518:"NORMAL",519:"LAYOUT",520:"RM.PRINT.AREA",521:"CLEAR.PRINT.AREA",522:"ADD.PRINT.AREA",523:"MOVE.BRK",545:"HIDECURR.NOTE",546:"HIDEALL.NOTES",547:"DELETE.NOTE",548:"TRAVERSE.NOTES",549:"ACTIVATE.NOTES",620:"PROTECT.REVISIONS",621:"UNPROTECT.REVISIONS",647:"OPTIONS.ME",653:"WEB.PUBLISH",667:"NEWWEBQUERY",673:"PIVOT.TABLE.CHART",753:"OPTIONS.SAVE",755:"OPTIONS.SPELL",808:"HIDEALL.INKANNOTS"},l1={0:"COUNT",1:"IF",2:"ISNA",3:"ISERROR",4:"SUM",5:"AVERAGE",6:"MIN",7:"MAX",8:"ROW",9:"COLUMN",10:"NA",11:"NPV",12:"STDEV",13:"DOLLAR",14:"FIXED",15:"SIN",16:"COS",17:"TAN",18:"ATAN",19:"PI",20:"SQRT",21:"EXP",22:"LN",23:"LOG10",24:"ABS",25:"INT",26:"SIGN",27:"ROUND",28:"LOOKUP",29:"INDEX",30:"REPT",31:"MID",32:"LEN",33:"VALUE",34:"TRUE",35:"FALSE",36:"AND",37:"OR",38:"NOT",39:"MOD",40:"DCOUNT",41:"DSUM",42:"DAVERAGE",43:"DMIN",44:"DMAX",45:"DSTDEV",46:"VAR",47:"DVAR",48:"TEXT",49:"LINEST",50:"TREND",51:"LOGEST",52:"GROWTH",53:"GOTO",54:"HALT",55:"RETURN",56:"PV",57:"FV",58:"NPER",59:"PMT",60:"RATE",61:"MIRR",62:"IRR",63:"RAND",64:"MATCH",65:"DATE",66:"TIME",67:"DAY",68:"MONTH",69:"YEAR",70:"WEEKDAY",71:"HOUR",72:"MINUTE",73:"SECOND",74:"NOW",75:"AREAS",76:"ROWS",77:"COLUMNS",78:"OFFSET",79:"ABSREF",80:"RELREF",81:"ARGUMENT",82:"SEARCH",83:"TRANSPOSE",84:"ERROR",85:"STEP",86:"TYPE",87:"ECHO",88:"SET.NAME",89:"CALLER",90:"DEREF",91:"WINDOWS",92:"SERIES",93:"DOCUMENTS",94:"ACTIVE.CELL",95:"SELECTION",96:"RESULT",97:"ATAN2",98:"ASIN",99:"ACOS",100:"CHOOSE",101:"HLOOKUP",102:"VLOOKUP",103:"LINKS",104:"INPUT",105:"ISREF",106:"GET.FORMULA",107:"GET.NAME",108:"SET.VALUE",109:"LOG",110:"EXEC",111:"CHAR",112:"LOWER",113:"UPPER",114:"PROPER",115:"LEFT",116:"RIGHT",117:"EXACT",118:"TRIM",119:"REPLACE",120:"SUBSTITUTE",121:"CODE",122:"NAMES",123:"DIRECTORY",124:"FIND",125:"CELL",126:"ISERR",127:"ISTEXT",128:"ISNUMBER",129:"ISBLANK",130:"T",131:"N",132:"FOPEN",133:"FCLOSE",134:"FSIZE",135:"FREADLN",136:"FREAD",137:"FWRITELN",138:"FWRITE",139:"FPOS",140:"DATEVALUE",141:"TIMEVALUE",142:"SLN",143:"SYD",144:"DDB",145:"GET.DEF",146:"REFTEXT",147:"TEXTREF",148:"INDIRECT",149:"REGISTER",150:"CALL",151:"ADD.BAR",152:"ADD.MENU",153:"ADD.COMMAND",154:"ENABLE.COMMAND",155:"CHECK.COMMAND",156:"RENAME.COMMAND",157:"SHOW.BAR",158:"DELETE.MENU",159:"DELETE.COMMAND",160:"GET.CHART.ITEM",161:"DIALOG.BOX",162:"CLEAN",163:"MDETERM",164:"MINVERSE",165:"MMULT",166:"FILES",167:"IPMT",168:"PPMT",169:"COUNTA",170:"CANCEL.KEY",171:"FOR",172:"WHILE",173:"BREAK",174:"NEXT",175:"INITIATE",176:"REQUEST",177:"POKE",178:"EXECUTE",179:"TERMINATE",180:"RESTART",181:"HELP",182:"GET.BAR",183:"PRODUCT",184:"FACT",185:"GET.CELL",186:"GET.WORKSPACE",187:"GET.WINDOW",188:"GET.DOCUMENT",189:"DPRODUCT",190:"ISNONTEXT",191:"GET.NOTE",192:"NOTE",193:"STDEVP",194:"VARP",195:"DSTDEVP",196:"DVARP",197:"TRUNC",198:"ISLOGICAL",199:"DCOUNTA",200:"DELETE.BAR",201:"UNREGISTER",204:"USDOLLAR",205:"FINDB",206:"SEARCHB",207:"REPLACEB",208:"LEFTB",209:"RIGHTB",210:"MIDB",211:"LENB",212:"ROUNDUP",213:"ROUNDDOWN",214:"ASC",215:"DBCS",216:"RANK",219:"ADDRESS",220:"DAYS360",221:"TODAY",222:"VDB",223:"ELSE",224:"ELSE.IF",225:"END.IF",226:"FOR.CELL",227:"MEDIAN",228:"SUMPRODUCT",229:"SINH",230:"COSH",231:"TANH",232:"ASINH",233:"ACOSH",234:"ATANH",235:"DGET",236:"CREATE.OBJECT",237:"VOLATILE",238:"LAST.ERROR",239:"CUSTOM.UNDO",240:"CUSTOM.REPEAT",241:"FORMULA.CONVERT",242:"GET.LINK.INFO",243:"TEXT.BOX",244:"INFO",245:"GROUP",246:"GET.OBJECT",247:"DB",248:"PAUSE",251:"RESUME",252:"FREQUENCY",253:"ADD.TOOLBAR",254:"DELETE.TOOLBAR",255:"User",256:"RESET.TOOLBAR",257:"EVALUATE",258:"GET.TOOLBAR",259:"GET.TOOL",260:"SPELLING.CHECK",261:"ERROR.TYPE",262:"APP.TITLE",263:"WINDOW.TITLE",264:"SAVE.TOOLBAR",265:"ENABLE.TOOL",266:"PRESS.TOOL",267:"REGISTER.ID",268:"GET.WORKBOOK",269:"AVEDEV",270:"BETADIST",271:"GAMMALN",272:"BETAINV",273:"BINOMDIST",274:"CHIDIST",275:"CHIINV",276:"COMBIN",277:"CONFIDENCE",278:"CRITBINOM",279:"EVEN",280:"EXPONDIST",281:"FDIST",282:"FINV",283:"FISHER",284:"FISHERINV",285:"FLOOR",286:"GAMMADIST",287:"GAMMAINV",288:"CEILING",289:"HYPGEOMDIST",290:"LOGNORMDIST",291:"LOGINV",292:"NEGBINOMDIST",293:"NORMDIST",294:"NORMSDIST",295:"NORMINV",296:"NORMSINV",297:"STANDARDIZE",298:"ODD",299:"PERMUT",300:"POISSON",301:"TDIST",302:"WEIBULL",303:"SUMXMY2",304:"SUMX2MY2",305:"SUMX2PY2",306:"CHITEST",307:"CORREL",308:"COVAR",309:"FORECAST",310:"FTEST",311:"INTERCEPT",312:"PEARSON",313:"RSQ",314:"STEYX",315:"SLOPE",316:"TTEST",317:"PROB",318:"DEVSQ",319:"GEOMEAN",320:"HARMEAN",321:"SUMSQ",322:"KURT",323:"SKEW",324:"ZTEST",325:"LARGE",326:"SMALL",327:"QUARTILE",328:"PERCENTILE",329:"PERCENTRANK",330:"MODE",331:"TRIMMEAN",332:"TINV",334:"MOVIE.COMMAND",335:"GET.MOVIE",336:"CONCATENATE",337:"POWER",338:"PIVOT.ADD.DATA",339:"GET.PIVOT.TABLE",340:"GET.PIVOT.FIELD",341:"GET.PIVOT.ITEM",342:"RADIANS",343:"DEGREES",344:"SUBTOTAL",345:"SUMIF",346:"COUNTIF",347:"COUNTBLANK",348:"SCENARIO.GET",349:"OPTIONS.LISTS.GET",350:"ISPMT",351:"DATEDIF",352:"DATESTRING",353:"NUMBERSTRING",354:"ROMAN",355:"OPEN.DIALOG",356:"SAVE.DIALOG",357:"VIEW.GET",358:"GETPIVOTDATA",359:"HYPERLINK",360:"PHONETIC",361:"AVERAGEA",362:"MAXA",363:"MINA",364:"STDEVPA",365:"VARPA",366:"STDEVA",367:"VARA",368:"BAHTTEXT",369:"THAIDAYOFWEEK",370:"THAIDIGIT",371:"THAIMONTHOFYEAR",372:"THAINUMSOUND",373:"THAINUMSTRING",374:"THAISTRINGLENGTH",375:"ISTHAIDIGIT",376:"ROUNDBAHTDOWN",377:"ROUNDBAHTUP",378:"THAIYEAR",379:"RTD",380:"CUBEVALUE",381:"CUBEMEMBER",382:"CUBEMEMBERPROPERTY",383:"CUBERANKEDMEMBER",384:"HEX2BIN",385:"HEX2DEC",386:"HEX2OCT",387:"DEC2BIN",388:"DEC2HEX",389:"DEC2OCT",390:"OCT2BIN",391:"OCT2HEX",392:"OCT2DEC",393:"BIN2DEC",394:"BIN2OCT",395:"BIN2HEX",396:"IMSUB",397:"IMDIV",398:"IMPOWER",399:"IMABS",400:"IMSQRT",401:"IMLN",402:"IMLOG2",403:"IMLOG10",404:"IMSIN",405:"IMCOS",406:"IMEXP",407:"IMARGUMENT",408:"IMCONJUGATE",409:"IMAGINARY",410:"IMREAL",411:"COMPLEX",412:"IMSUM",413:"IMPRODUCT",414:"SERIESSUM",415:"FACTDOUBLE",416:"SQRTPI",417:"QUOTIENT",418:"DELTA",419:"GESTEP",420:"ISEVEN",421:"ISODD",422:"MROUND",423:"ERF",424:"ERFC",425:"BESSELJ",426:"BESSELK",427:"BESSELY",428:"BESSELI",429:"XIRR",430:"XNPV",431:"PRICEMAT",432:"YIELDMAT",433:"INTRATE",434:"RECEIVED",435:"DISC",436:"PRICEDISC",437:"YIELDDISC",438:"TBILLEQ",439:"TBILLPRICE",440:"TBILLYIELD",441:"PRICE",442:"YIELD",443:"DOLLARDE",444:"DOLLARFR",445:"NOMINAL",446:"EFFECT",447:"CUMPRINC",448:"CUMIPMT",449:"EDATE",450:"EOMONTH",451:"YEARFRAC",452:"COUPDAYBS",453:"COUPDAYS",454:"COUPDAYSNC",455:"COUPNCD",456:"COUPNUM",457:"COUPPCD",458:"DURATION",459:"MDURATION",460:"ODDLPRICE",461:"ODDLYIELD",462:"ODDFPRICE",463:"ODDFYIELD",464:"RANDBETWEEN",465:"WEEKNUM",466:"AMORDEGRC",467:"AMORLINC",468:"CONVERT",724:"SHEETJS",469:"ACCRINT",470:"ACCRINTM",471:"WORKDAY",472:"NETWORKDAYS",473:"GCD",474:"MULTINOMIAL",475:"LCM",476:"FVSCHEDULE",477:"CUBEKPIMEMBER",478:"CUBESET",479:"CUBESETCOUNT",480:"IFERROR",481:"COUNTIFS",482:"SUMIFS",483:"AVERAGEIF",484:"AVERAGEIFS"},aN={2:1,3:1,10:0,15:1,16:1,17:1,18:1,19:0,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,34:0,35:0,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,63:0,65:3,66:3,67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:0,75:1,76:1,77:1,79:2,80:2,83:1,85:0,86:1,89:0,90:1,94:0,95:0,97:2,98:1,99:1,101:3,102:3,105:1,106:1,108:2,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,144:4,161:1,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,186:1,189:3,190:1,195:3,196:3,197:1,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,225:0,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,247:4,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,382:3,385:1,392:1,393:1,396:2,397:2,398:2,399:1,400:1,401:1,402:1,403:1,404:1,405:1,406:1,407:1,408:1,409:1,410:1,414:4,415:1,416:1,417:2,420:1,421:1,422:2,424:1,425:2,426:2,427:2,428:2,430:3,438:3,439:3,440:3,443:2,444:2,445:2,446:2,447:6,448:6,449:2,450:2,464:2,468:3,476:2,479:1,480:2,65535:0};function c1(e){return"of:"==e.slice(0,3)&&(e=e.slice(3)),61==e.charCodeAt(0)&&61==(e=e.slice(1)).charCodeAt(0)&&(e=e.slice(1)),(e=(e=(e=e.replace(/COM\.MICROSOFT\./g,"")).replace(/\[((?:\.[A-Z]+[0-9]+)(?::\.[A-Z]+[0-9]+)?)\]/g,function(t,r){return r.replace(/\./g,"")})).replace(/\[.(#[A-Z]*[?!])\]/g,"$1")).replace(/[;~]/g,",").replace(/\|/g,";")}function _f(e){var t=e.split(":");return[t[0].split(".")[0],t[0].split(".")[1]+(t.length>1?":"+(t[1].split(".")[1]||t[1].split(".")[0]):"")]}var hl={},Jo={};function so(e,t){if(e){var r=[.7,.7,.75,.75,.3,.3];"xlml"==t&&(r=[1,1,1,1,.5,.5]),null==e.left&&(e.left=r[0]),null==e.right&&(e.right=r[1]),null==e.top&&(e.top=r[2]),null==e.bottom&&(e.bottom=r[3]),null==e.header&&(e.header=r[4]),null==e.footer&&(e.footer=r[5])}}function d1(e,t,r,i,s,n){try{i.cellNF&&(e.z=Be[t])}catch(a){if(i.WTF)throw a}if("z"!==e.t||i.cellStyles){if("d"===e.t&&"string"==typeof e.v&&(e.v=Kt(e.v)),(!i||!1!==i.cellText)&&"z"!==e.t)try{if(null==Be[t]&&cs(l_[t]||"General",t),"e"===e.t)e.w=e.w||Ms[e.v];else if(0===t)if("n"===e.t)e.w=(0|e.v)===e.v?e.v.toString(10):$a(e.v);else if("d"===e.t){var o=wr(e.v);e.w=(0|o)===o?o.toString(10):$a(o)}else{if(void 0===e.v)return"";e.w=zn(e.v,Jo)}else e.w=xi(t,"d"===e.t?wr(e.v):e.v,Jo)}catch(a){if(i.WTF)throw a}if(i.cellStyles&&null!=r)try{e.s=n.Fills[r],e.s.fgColor&&e.s.fgColor.theme&&!e.s.fgColor.rgb&&(e.s.fgColor.rgb=ed(s.themeElements.clrScheme[e.s.fgColor.theme].rgb,e.s.fgColor.tint||0),i.WTF&&(e.s.fgColor.raw_rgb=s.themeElements.clrScheme[e.s.fgColor.theme].rgb)),e.s.bgColor&&e.s.bgColor.theme&&(e.s.bgColor.rgb=ed(s.themeElements.clrScheme[e.s.bgColor.theme].rgb,e.s.bgColor.tint||0),i.WTF&&(e.s.bgColor.raw_rgb=s.themeElements.clrScheme[e.s.bgColor.theme].rgb))}catch(a){if(i.WTF&&n.Fills)throw a}}}var dN=/<(?:\w:)?mergeCell ref="[A-Z0-9:]+"\s*[\/]?>/g,uN=/<(?:\w+:)?sheetData[^>]*>([\s\S]*)<\/(?:\w+:)?sheetData>/,hN=/<(?:\w:)?hyperlink [^>]*>/gm,fN=/"(\w*:\w*)"/,gN=/<(?:\w:)?col\b[^>]*[\/]?>/g,pN=/<(?:\w:)?autoFilter[^>]*([\/]|>([\s\S]*)<\/(?:\w:)?autoFilter)>/g,mN=/<(?:\w:)?pageMargins[^>]*\/>/g,u1=/<(?:\w:)?sheetPr\b(?:[^>a-z][^>]*)?\/>/,vN=/<(?:\w:)?sheetPr[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetPr)>/,CN=/<(?:\w:)?sheetViews[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetViews)>/;function Of(e,t,r,i){var s=ze(e);r.Sheets[i]||(r.Sheets[i]={}),s.codeName&&(r.Sheets[i].CodeName=ut(Tt(s.codeName)))}var IN=/<(?:\w:)?sheetView(?:[^>a-z][^>]*)?\/?>/,BN=function(){var e=/<(?:\w+:)?c[ \/>]/,t=/<\/(?:\w+:)?row>/,r=/r=["']([^"']*)["']/,i=/<(?:\w+:)?is>([\S\s]*?)<\/(?:\w+:)?is>/,s=/ref=["']([^"']*)["']/,n=Xa("v"),o=Xa("f");return function(l,c,d,u,h,f){for(var E,S,H,V,oe,p=0,g="",m=[],v=[],w=0,C=0,y=0,k="",_=0,M=0,B=0,re=0,ue=Array.isArray(f.CellXf),Ae=[],ke=[],Ze=Array.isArray(c),we=[],be={},te=!1,A=!!d.sheetStubs,j=l.split(t),L=0,O=j.length;L!=O;++L){var ee=(g=j[L].trim()).length;if(0!==ee){var xe=0;e:for(p=0;p<ee;++p)switch(g[p]){case">":if("/"!=g[p-1]){++p;break e}if(d&&d.cellStyles){if(_=null!=(S=ze(g.slice(xe,p),!0)).r?parseInt(S.r,10):_+1,M=-1,d.sheetRows&&d.sheetRows<_)continue;be={},te=!1,S.ht&&(te=!0,be.hpt=parseFloat(S.ht),be.hpx=Xo(be.hpt)),"1"==S.hidden&&(te=!0,be.hidden=!0),null!=S.outlineLevel&&(te=!0,be.level=+S.outlineLevel),te&&(we[_-1]=be)}break;case"<":xe=p}if(xe>=p)break;if(_=null!=(S=ze(g.slice(xe,p),!0)).r?parseInt(S.r,10):_+1,M=-1,!(d.sheetRows&&d.sheetRows<_)){u.s.r>_-1&&(u.s.r=_-1),u.e.r<_-1&&(u.e.r=_-1),d&&d.cellStyles&&(be={},te=!1,S.ht&&(te=!0,be.hpt=parseFloat(S.ht),be.hpx=Xo(be.hpt)),"1"==S.hidden&&(te=!0,be.hidden=!0),null!=S.outlineLevel&&(te=!0,be.level=+S.outlineLevel),te&&(we[_-1]=be)),m=g.slice(p).split(e);for(var ce=0;ce!=m.length&&"<"==m[ce].trim().charAt(0);++ce);for(m=m.slice(ce),p=0;p!=m.length;++p)if(0!==(g=m[p].trim()).length){if(v=g.match(r),w=p,C=0,y=0,g="<c "+("<"==g.slice(0,1)?">":"")+g,null!=v&&2===v.length){for(w=0,k=v[1],C=0;C!=k.length&&!((y=k.charCodeAt(C)-64)<1||y>26);++C)w=26*w+y;M=--w}else++M;for(C=0;C!=g.length&&62!==g.charCodeAt(C);++C);if(++C,(S=ze(g.slice(0,C),!0)).r||(S.r=We({r:_-1,c:M})),E={t:""},null!=(v=(k=g.slice(C)).match(n))&&""!==v[1]&&(E.v=ut(v[1])),d.cellFormula){if(null!=(v=k.match(o))&&""!==v[1]){if(E.f=ut(Tt(v[1])).replace(/\r\n/g,"\n"),d.xlfn||(E.f=Jw(E.f)),v[0].indexOf('t="array"')>-1)E.F=(k.match(s)||[])[1],E.F.indexOf(":")>-1&&Ae.push([ot(E.F),E.F]);else if(v[0].indexOf('t="shared"')>-1){V=ze(v[0]);var de=ut(Tt(v[1]));d.xlfn||(de=Jw(de)),ke[parseInt(V.si,10)]=[V,de,S.r]}}else(v=k.match(/<f[^>]*\/>/))&&ke[(V=ze(v[0])).si]&&(E.f=L7(ke[V.si][1],ke[V.si][2],S.r));var ie=qt(S.r);for(C=0;C<Ae.length;++C)ie.r>=Ae[C][0].s.r&&ie.r<=Ae[C][0].e.r&&ie.c>=Ae[C][0].s.c&&ie.c<=Ae[C][0].e.c&&(E.F=Ae[C][1])}if(null==S.t&&void 0===E.v)if(E.f||E.F)E.v=0,E.t="n";else{if(!A)continue;E.t="z"}else E.t=S.t||"n";switch(u.s.c>M&&(u.s.c=M),u.e.c<M&&(u.e.c=M),E.t){case"n":if(""==E.v||null==E.v){if(!A)continue;E.t="z"}else E.v=parseFloat(E.v);break;case"s":if(typeof E.v>"u"){if(!A)continue;E.t="z"}else H=hl[parseInt(E.v,10)],E.v=H.t,E.r=H.r,d.cellHTML&&(E.h=H.h);break;case"str":E.t="s",E.v=null!=E.v?Tt(E.v):"",d.cellHTML&&(E.h=jh(E.v));break;case"inlineStr":v=k.match(i),E.t="s",null!=v&&(H=Ef(v[1]))?(E.v=H.t,d.cellHTML&&(E.h=H.h)):E.v="";break;case"b":E.v=_t(E.v);break;case"d":d.cellDates?E.v=Kt(E.v,1):(E.v=wr(Kt(E.v,1)),E.t="n");break;case"e":(!d||!1!==d.cellText)&&(E.w=E.v),E.v=$C[E.v]}if(B=re=0,oe=null,ue&&void 0!==S.s&&null!=(oe=f.CellXf[S.s])&&(null!=oe.numFmtId&&(B=oe.numFmtId),d.cellStyles&&null!=oe.fillId&&(re=oe.fillId)),d1(E,B,re,d,h,f),d.cellDates&&ue&&"n"==E.t&&Wn(Be[B])&&(E.t="d",E.v=Gc(E.v)),S.cm&&d.xlmeta){var Xe=(d.xlmeta.Cell||[])[+S.cm-1];Xe&&"XLDAPR"==Xe.type&&(E.D=!0)}if(Ze){var D=qt(S.r);c[D.r]||(c[D.r]=[]),c[D.r][D.c]=E}else c[S.r]=E}}}}we.length>0&&(c["!rows"]=we)}}(),zN=Xn;function f1(e){return[Kn(e),Wr(e),"n"]}var FH=Xn,g1=["left","right","top","bottom","header","footer"];var Bf=[["allowRefreshQuery",!1,"bool"],["autoCompressPictures",!0,"bool"],["backupFile",!1,"bool"],["checkCompatibility",!1,"bool"],["CodeName",""],["date1904",!1,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",!1,"bool"],["hidePivotFieldList",!1,"bool"],["promptedSolutions",!1,"bool"],["publishItems",!1,"bool"],["refreshAllConnections",!1,"bool"],["saveExternalLinkValues",!0,"bool"],["showBorderUnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]],aG=[["activeTab",0,"int"],["autoFilterDateGrouping",!0,"bool"],["firstSheet",0,"int"],["minimized",!1,"bool"],["showHorizontalScroll",!0,"bool"],["showSheetTabs",!0,"bool"],["showVerticalScroll",!0,"bool"],["tabRatio",600,"int"],["visibility","visible"]],lG=[],cG=[["calcCompleted","true"],["calcMode","auto"],["calcOnSave","true"],["concurrentCalc","true"],["fullCalcOnLoad","false"],["fullPrecision","true"],["iterate","false"],["iterateCount","100"],["iterateDelta","0.001"],["refMode","A1"]];function p1(e,t){for(var r=0;r!=e.length;++r)for(var i=e[r],s=0;s!=t.length;++s){var n=t[s];if(null==i[n[0]])i[n[0]]=n[1];else switch(n[2]){case"bool":"string"==typeof i[n[0]]&&(i[n[0]]=_t(i[n[0]]));break;case"int":"string"==typeof i[n[0]]&&(i[n[0]]=parseInt(i[n[0]],10))}}}function m1(e,t){for(var r=0;r!=t.length;++r){var i=t[r];if(null==e[i[0]])e[i[0]]=i[1];else switch(i[2]){case"bool":"string"==typeof e[i[0]]&&(e[i[0]]=_t(e[i[0]]));break;case"int":"string"==typeof e[i[0]]&&(e[i[0]]=parseInt(e[i[0]],10))}}}function v1(e){m1(e.WBProps,Bf),m1(e.CalcPr,cG),p1(e.WBView,aG),p1(e.Sheets,lG),Jo.date1904=_t(e.WBProps.date1904)}var uG="][*?/\\".split("");var fG=/<\w+:workbook/;function wG(e,t){var r={};return e.read_shift(4),r.ArchID=e.read_shift(4),e.l+=t-8,r}function TG(e,t,r,i,s,n,o,a){return".bin"===t.slice(-4)?function zH(e,t,r,i,s,n,o){if(!e)return e;var a=t||{};i||(i={"!id":{}});var c,p,g,m,v,w,C,y,k,E,l=a.dense?[]:{},d={s:{r:2e6,c:2e6},e:{r:0,c:0}},u=[],h=!1,f=!1,S=[];a.biff=12,a["!row"]=0;var _=0,M=!1,H=[],V={},B=a.supbooks||s.supbooks||[[]];if(B.sharedf=V,B.arrayf=H,B.SheetNames=s.SheetNames||s.Sheets.map(function(be){return be.name}),!a.supbooks&&(a.supbooks=B,s.Names))for(var re=0;re<s.Names.length;++re)B[0][re+1]=s.Names[re];var ke,Ze,ue=[],oe=[],Ae=!1;if(ml[16]={n:"BrtShortReal",f:f1},As(e,function(te,A,j){if(!f)switch(j){case 148:c=te;break;case 0:p=te,a.sheetRows&&a.sheetRows<=p.r&&(f=!0),k=er(v=p.r),a["!row"]=p.r,(te.hidden||te.hpt||null!=te.level)&&(te.hpt&&(te.hpx=Xo(te.hpt)),oe[te.r]=te);break;case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 13:case 14:case 15:case 16:case 17:case 18:case 62:switch(g={t:te[2]},te[2]){case"n":g.v=te[1];break;case"s":g.v=(y=hl[te[1]]).t,g.r=y.r;break;case"b":g.v=!!te[1];break;case"e":g.v=te[1],!1!==a.cellText&&(g.w=Ms[g.v]);break;case"str":g.t="s",g.v=te[1];break;case"is":g.t="s",g.v=te[1].t}if((m=o.CellXf[te[0].iStyleRef])&&d1(g,m.numFmtId,null,a,n,o),w=-1==te[0].c?w+1:te[0].c,a.dense?(l[v]||(l[v]=[]),l[v][w]=g):l[Lt(w)+k]=g,a.cellFormula){for(M=!1,_=0;_<H.length;++_){var L=H[_];p.r>=L[0].s.r&&p.r<=L[0].e.r&&w>=L[0].s.c&&w<=L[0].e.c&&(g.F=Ke(L[0]),M=!0)}!M&&te.length>3&&(g.f=te[3])}if(d.s.r>p.r&&(d.s.r=p.r),d.s.c>w&&(d.s.c=w),d.e.r<p.r&&(d.e.r=p.r),d.e.c<w&&(d.e.c=w),a.cellDates&&m&&"n"==g.t&&Wn(Be[m.numFmtId])){var O=cn(g.v);O&&(g.t="d",g.v=new Date(O.y,O.m-1,O.d,O.H,O.M,O.S,O.u))}ke&&("XLDAPR"==ke.type&&(g.D=!0),ke=void 0),Ze&&(Ze=void 0);break;case 1:case 12:if(!a.sheetStubs||h)break;g={t:"z",v:void 0},w=-1==te[0].c?w+1:te[0].c,a.dense?(l[v]||(l[v]=[]),l[v][w]=g):l[Lt(w)+k]=g,d.s.r>p.r&&(d.s.r=p.r),d.s.c>w&&(d.s.c=w),d.e.r<p.r&&(d.e.r=p.r),d.e.c<w&&(d.e.c=w),ke&&("XLDAPR"==ke.type&&(g.D=!0),ke=void 0),Ze&&(Ze=void 0);break;case 176:S.push(te);break;case 49:ke=((a.xlmeta||{}).Cell||[])[te-1];break;case 494:var ee=i["!id"][te.relId];for(ee?(te.Target=ee.Target,te.loc&&(te.Target+="#"+te.loc),te.Rel=ee):""==te.relId&&(te.Target="#"+te.loc),v=te.rfx.s.r;v<=te.rfx.e.r;++v)for(w=te.rfx.s.c;w<=te.rfx.e.c;++w)a.dense?(l[v]||(l[v]=[]),l[v][w]||(l[v][w]={t:"z",v:void 0}),l[v][w].l=te):(C=We({c:w,r:v}),l[C]||(l[C]={t:"z",v:void 0}),l[C].l=te);break;case 426:if(!a.cellFormula)break;H.push(te),(E=a.dense?l[v][w]:l[Lt(w)+k]).f=jr(te[1],0,{r:p.r,c:w},B,a),E.F=Ke(te[0]);break;case 427:if(!a.cellFormula)break;V[We(te[0].s)]=te[1],(E=a.dense?l[v][w]:l[Lt(w)+k]).f=jr(te[1],0,{r:p.r,c:w},B,a);break;case 60:if(!a.cellStyles)break;for(;te.e>=te.s;)ue[te.e--]={width:te.w/256,hidden:!!(1&te.flags),level:te.level},Ae||(Ae=!0,kf(te.w/256)),io(ue[te.e+1]);break;case 161:l["!autofilter"]={ref:Ke(te)};break;case 476:l["!margins"]=te;break;case 147:s.Sheets[r]||(s.Sheets[r]={}),te.name&&(s.Sheets[r].CodeName=te.name),(te.above||te.left)&&(l["!outline"]={above:te.above,left:te.left});break;case 137:s.Views||(s.Views=[{}]),s.Views[0]||(s.Views[0]={}),te.RTL&&(s.Views[0].RTL=!0);break;case 485:case 64:case 1053:case 151:case 152:case 175:case 644:case 625:case 562:case 396:case 1112:case 1146:case 471:case 1050:case 649:case 1105:case 589:case 607:case 564:case 1055:case 168:case 174:case 1180:case 499:case 507:case 550:case 171:case 167:case 1177:case 169:case 1181:case 551:case 552:case 661:case 639:case 478:case 537:case 477:case 536:case 1103:case 680:case 1104:case 1024:case 663:case 535:case 678:case 504:case 1043:case 428:case 170:case 3072:case 50:case 2070:case 1045:break;case 35:h=!0;break;case 36:h=!1;break;case 37:u.push(j),h=!0;break;case 38:u.pop(),h=!1;break;default:if(!A.T&&(!h||a.WTF))throw new Error("Unexpected record 0x"+j.toString(16))}},a),delete a.supbooks,delete a["!row"],!l["!ref"]&&(d.s.r<2e6||c&&(c.e.r>0||c.e.c>0||c.s.r>0||c.s.c>0))&&(l["!ref"]=Ke(c||d)),a.sheetRows&&l["!ref"]){var we=ot(l["!ref"]);a.sheetRows<=+we.e.r&&(we.e.r=a.sheetRows-1,we.e.r>d.e.r&&(we.e.r=d.e.r),we.e.r<we.s.r&&(we.s.r=we.e.r),we.e.c>d.e.c&&(we.e.c=d.e.c),we.e.c<we.s.c&&(we.s.c=we.e.c),l["!fullref"]=l["!ref"],l["!ref"]=Ke(we))}return S.length>0&&(l["!merges"]=S),ue.length>0&&(l["!cols"]=ue),oe.length>0&&(l["!rows"]=oe),l}(e,i,r,s,n,o,a):function wN(e,t,r,i,s,n,o){if(!e)return e;i||(i={"!id":{}});var a=t.dense?[]:{},l={s:{r:2e6,c:2e6},e:{r:0,c:0}},c="",d="",u=e.match(uN);u?(c=e.slice(0,u.index),d=e.slice(u.index+u[0].length)):c=d=e;var h=c.match(u1);h?Of(h[0],0,s,r):(h=c.match(vN))&&function SN(e,t,r,i,s){Of(e.slice(0,e.indexOf(">")),0,i,s)}(h[0],0,0,s,r);var f=(c.match(/<(?:\w*:)?dimension/)||{index:-1}).index;if(f>0){var p=c.slice(f,f+50).match(fN);p&&function cN(e,t){var r=ot(t);r.s.r<=r.e.r&&r.s.c<=r.e.c&&r.s.r>=0&&r.s.c>=0&&(e["!ref"]=Ke(r))}(a,p[1])}var g=c.match(CN);g&&g[1]&&function _N(e,t){t.Views||(t.Views=[{}]),(e.match(IN)||[]).forEach(function(r,i){var s=ze(r);t.Views[i]||(t.Views[i]={}),+s.zoomScale&&(t.Views[i].zoom=+s.zoomScale),_t(s.rightToLeft)&&(t.Views[i].RTL=!0)})}(g[1],s);var m=[];if(t.cellStyles){var v=c.match(gN);v&&function PN(e,t){for(var r=!1,i=0;i!=t.length;++i){var s=ze(t[i],!0);s.hidden&&(s.hidden=_t(s.hidden));var n=parseInt(s.min,10)-1,o=parseInt(s.max,10)-1;for(s.outlineLevel&&(s.level=+s.outlineLevel||0),delete s.min,delete s.max,s.width=+s.width,!r&&s.width&&(r=!0,kf(s.width)),io(s);n<=o;)e[n++]=Pt(s)}}(m,v)}u&&BN(u[1],a,t,l,n,o);var w=d.match(pN);w&&(a["!autofilter"]=function AN(e){return{ref:(e.match(/ref="([^"]*)"/)||[])[1]}}(w[0]));var C=[],y=d.match(dN);if(y)for(f=0;f!=y.length;++f)C[f]=ot(y[f].slice(y[f].indexOf('"')+1));var k=d.match(hN);k&&function RN(e,t,r){for(var i=Array.isArray(e),s=0;s!=t.length;++s){var n=ze(Tt(t[s]),!0);if(!n.ref)return;var o=((r||{})["!id"]||[])[n.id];o?(n.Target=o.Target,n.location&&(n.Target+="#"+ut(n.location))):(n.Target="#"+ut(n.location),o={Target:n.Target,TargetMode:"Internal"}),n.Rel=o,n.tooltip&&(n.Tooltip=n.tooltip,delete n.tooltip);for(var a=ot(n.ref),l=a.s.r;l<=a.e.r;++l)for(var c=a.s.c;c<=a.e.c;++c){var d=We({c,r:l});i?(e[l]||(e[l]=[]),e[l][c]||(e[l][c]={t:"z",v:void 0}),e[l][c].l=n):(e[d]||(e[d]={t:"z",v:void 0}),e[d].l=n)}}}(a,k,i);var E=d.match(mN);if(E&&(a["!margins"]=function kN(e){var t={};return["left","right","top","bottom","header","footer"].forEach(function(r){e[r]&&(t[r]=parseFloat(e[r]))}),t}(ze(E[0]))),!a["!ref"]&&l.e.c>=l.s.c&&l.e.r>=l.s.r&&(a["!ref"]=Ke(l)),t.sheetRows>0&&a["!ref"]){var S=ot(a["!ref"]);t.sheetRows<=+S.e.r&&(S.e.r=t.sheetRows-1,S.e.r>l.e.r&&(S.e.r=l.e.r),S.e.r<S.s.r&&(S.s.r=S.e.r),S.e.c>l.e.c&&(S.e.c=l.e.c),S.e.c<S.s.c&&(S.s.c=S.e.c),a["!fullref"]=a["!ref"],a["!ref"]=Ke(S))}return m.length>0&&(a["!cols"]=m),C.length>0&&(a["!merges"]=C),a}(e,i,r,s,n,o,a)}var gl,S1=/([\w:]+)=((?:")([^"]*)(?:")|(?:')([^']*)(?:'))/g,b1=/([\w:]+)=((?:")(?:[^"]*)(?:")|(?:')(?:[^']*)(?:'))/;function Yi(e,t){var r=e.split(/\s+/),i=[];if(t||(i[0]=r[0]),1===r.length)return i;var n,o,l,s=e.match(S1);if(s)for(l=0;l!=s.length;++l)-1===(o=(n=s[l].match(b1))[1].indexOf(":"))?i[n[1]]=n[2].slice(1,n[2].length-1):i["xmlns:"===n[1].slice(0,6)?"xmlns"+n[1].slice(6):n[1].slice(o+1)]=n[2].slice(1,n[2].length-1);return i}function $G(e){var r={};if(1===e.split(/\s+/).length)return r;var s,n,a,i=e.match(S1);if(i)for(a=0;a!=i.length;++a)-1===(n=(s=i[a].match(b1))[1].indexOf(":"))?r[s[1]]=s[2].slice(1,s[2].length-1):r["xmlns:"===s[1].slice(0,6)?"xmlns"+s[1].slice(6):s[1].slice(n+1)]=s[2].slice(1,s[2].length-1);return r}function KG(e,t,r,i){var s=i;switch((r[0].match(/dt:dt="([\w.]+)"/)||["",""])[1]){case"boolean":s=_t(i);break;case"i2":case"int":s=parseInt(i,10);break;case"r4":case"float":s=parseFloat(i);break;case"date":case"dateTime.tz":s=Kt(i);break;case"i8":case"string":case"fixed":case"uuid":case"bin.base64":break;default:throw new Error("bad custprop:"+r[0])}e[ut(t)]=s}function XG(e,t,r){if(r.cellStyles&&t.Interior){var i=t.Interior;i.Pattern&&(i.patternType=lO[i.Pattern]||i.Pattern)}e[t.ID]=t}function YG(e,t,r,i,s,n,o,a,l,c){var d="General",u=i.StyleID,h={};c=c||{};var f=[],p=0;for(void 0===u&&a&&(u=a.StyleID),void 0===u&&o&&(u=o.StyleID);void 0!==n[u]&&(n[u].nf&&(d=n[u].nf),n[u].Interior&&f.push(n[u].Interior),n[u].Parent);)u=n[u].Parent;switch(r.Type){case"Boolean":i.t="b",i.v=_t(e);break;case"String":i.t="s",i.r=gC(ut(e)),i.v=e.indexOf("<")>-1?ut(t||e).replace(/<.*?>/g,""):i.r;break;case"DateTime":"Z"!=e.slice(-1)&&(e+="Z"),i.v=(Kt(e)-new Date(Date.UTC(1899,11,30)))/864e5,i.v!=i.v?i.v=ut(e):i.v<60&&(i.v=i.v-1),(!d||"General"==d)&&(d="yyyy-mm-dd");case"Number":void 0===i.v&&(i.v=+e),i.t||(i.t="n");break;case"Error":i.t="e",i.v=$C[e],!1!==c.cellText&&(i.w=e);break;default:""==e&&""==t?i.t="z":(i.t="s",i.v=gC(t||e))}if(function qG(e,t,r){if("z"!==e.t){if(!r||!1!==r.cellText)try{e.w="e"===e.t?e.w||Ms[e.v]:"General"===t?"n"===e.t?(0|e.v)===e.v?e.v.toString(10):$a(e.v):zn(e.v):function jG(e,t){var r=gl[e]||ut(e);return"General"===r?zn(t):xi(r,t)}(t||"General",e.v)}catch(n){if(r.WTF)throw n}try{var i=gl[t]||t||"General";if(r.cellNF&&(e.z=i),r.cellDates&&"n"==e.t&&Wn(i)){var s=cn(e.v);s&&(e.t="d",e.v=new Date(s.y,s.m-1,s.d,s.H,s.M,s.S,s.u))}}catch(n){if(r.WTF)throw n}}}(i,d,c),!1!==c.cellFormula)if(i.Formula){var g=ut(i.Formula);61==g.charCodeAt(0)&&(g=g.slice(1)),i.f=Qo(g,s),delete i.Formula,"RC"==i.ArrayRange?i.F=Qo("RC:RC",s):i.ArrayRange&&(i.F=Qo(i.ArrayRange,s),l.push([ot(i.F),i.F]))}else for(p=0;p<l.length;++p)s.r>=l[p][0].s.r&&s.r<=l[p][0].e.r&&s.c>=l[p][0].s.c&&s.c<=l[p][0].e.c&&(i.F=l[p][1]);c.cellStyles&&(f.forEach(function(m){!h.patternType&&m.patternType&&(h.patternType=m.patternType)}),i.s=h),void 0!==i.StyleID&&(i.ixfe=i.StyleID)}function QG(e){e.t=e.v||"",e.t=e.t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e.v=e.w=e.ixfe=void 0}function Nf(e,t){var r=t||{};zo();var i=Ho(Xh(e));("binary"==r.type||"array"==r.type||"base64"==r.type)&&(i=Tt(i));var s=i.slice(0,1024).toLowerCase(),n=!1;if((1023&(s=s.replace(/".*?"/g,"")).indexOf(">"))>Math.min(1023&s.indexOf(","),1023&s.indexOf(";"))){var o=Pt(r);return o.type="string",qo.to_workbook(i,o)}if(-1==s.indexOf("<?xml")&&["html","table","head","meta","script","style","div"].forEach(function(ar){s.indexOf("<"+ar)>=0&&(n=!0)}),n)return function I9(e,t){var r=e.match(/<table[\s\S]*?>[\s\S]*?<\/table>/gi);if(!r||0==r.length)throw new Error("Invalid HTML: could not find <table>");if(1==r.length)return fn(R1(r[0],t),t);var i={SheetNames:[],Sheets:{}};return r.forEach(function(s,n){eg(i,R1(s,t),"Sheet"+(n+1))}),i}(i,r);gl={"General Number":"General","General Date":Be[22],"Long Date":"dddd, mmmm dd, yyyy","Medium Date":Be[15],"Short Date":Be[14],"Long Time":Be[19],"Medium Time":Be[18],"Short Time":Be[20],Currency:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',Fixed:Be[2],Standard:Be[4],Percent:Be[10],Scientific:Be[11],"Yes/No":'"Yes";"Yes";"No";@',"True/False":'"True";"True";"False";@',"On/Off":'"Yes";"Yes";"No";@'};var a,c,ke,l=[],d={},u=[],h=r.dense?[]:{},f="",p={},g={},m=Yi('<Data ss:Type="String">'),v=0,w=0,C=0,y={s:{r:2e6,c:2e6},e:{r:0,c:0}},k={},E={},S="",_=0,M=[],H={},V={},B=0,re=[],ue=[],oe={},Ae=[],Ze=!1,we=[],be=[],te={},A=0,j=0,L={Sheets:[],WBProps:{date1904:!1}},O={};Ya.lastIndex=0,i=i.replace(/<!--([\s\S]*?)-->/gm,"");for(var ee="";a=Ya.exec(i);)switch(a[3]=(ee=a[3]).toLowerCase()){case"data":if("data"==ee){if("/"===a[1]){if((c=l.pop())[0]!==a[3])throw new Error("Bad state: "+c.join("|"))}else"/"!==a[0].charAt(a[0].length-2)&&l.push([a[3],!0]);break}if(l[l.length-1][1])break;"/"===a[1]?YG(i.slice(v,a.index),S,m,"comment"==l[l.length-1][0]?oe:p,{c:w,r:C},k,Ae[w],g,we,r):(S="",m=Yi(a[0]),v=a.index+a[0].length);break;case"cell":if("/"===a[1])if(ue.length>0&&(p.c=ue),(!r.sheetRows||r.sheetRows>C)&&void 0!==p.v&&(r.dense?(h[C]||(h[C]=[]),h[C][w]=p):h[Lt(w)+er(C)]=p),p.HRef&&(p.l={Target:ut(p.HRef)},p.HRefScreenTip&&(p.l.Tooltip=p.HRefScreenTip),delete p.HRef,delete p.HRefScreenTip),(p.MergeAcross||p.MergeDown)&&(A=w+(0|parseInt(p.MergeAcross,10)),j=C+(0|parseInt(p.MergeDown,10)),M.push({s:{c:w,r:C},e:{c:A,r:j}})),r.sheetStubs)if(p.MergeAcross||p.MergeDown){for(var xe=w;xe<=A;++xe)for(var ce=C;ce<=j;++ce)(xe>w||ce>C)&&(r.dense?(h[ce]||(h[ce]=[]),h[ce][xe]={t:"z"}):h[Lt(xe)+er(ce)]={t:"z"});w=A+1}else++w;else p.MergeAcross?w=A+1:++w;else(p=$G(a[0])).Index&&(w=+p.Index-1),w<y.s.c&&(y.s.c=w),w>y.e.c&&(y.e.c=w),"/>"===a[0].slice(-2)&&++w,ue=[];break;case"row":"/"===a[1]||"/>"===a[0].slice(-2)?(C<y.s.r&&(y.s.r=C),C>y.e.r&&(y.e.r=C),"/>"===a[0].slice(-2)&&(g=Yi(a[0])).Index&&(C=+g.Index-1),w=0,++C):((g=Yi(a[0])).Index&&(C=+g.Index-1),te={},("0"==g.AutoFitHeight||g.Height)&&(te.hpx=parseInt(g.Height,10),te.hpt=al(te.hpx),be[C]=te),"1"==g.Hidden&&(te.hidden=!0,be[C]=te));break;case"worksheet":if("/"===a[1]){if((c=l.pop())[0]!==a[3])throw new Error("Bad state: "+c.join("|"));u.push(f),y.s.r<=y.e.r&&y.s.c<=y.e.c&&(h["!ref"]=Ke(y),r.sheetRows&&r.sheetRows<=y.e.r&&(h["!fullref"]=h["!ref"],y.e.r=r.sheetRows-1,h["!ref"]=Ke(y))),M.length&&(h["!merges"]=M),Ae.length>0&&(h["!cols"]=Ae),be.length>0&&(h["!rows"]=be),d[f]=h}else y={s:{r:2e6,c:2e6},e:{r:0,c:0}},C=w=0,l.push([a[3],!1]),c=Yi(a[0]),f=ut(c.Name),h=r.dense?[]:{},M=[],we=[],be=[],L.Sheets.push(O={name:f,Hidden:0});break;case"table":if("/"===a[1]){if((c=l.pop())[0]!==a[3])throw new Error("Bad state: "+c.join("|"))}else{if("/>"==a[0].slice(-2))break;l.push([a[3],!1]),Ae=[],Ze=!1}break;case"style":"/"===a[1]?XG(k,E,r):E=Yi(a[0]);break;case"numberformat":E.nf=ut(Yi(a[0]).Format||"General"),gl[E.nf]&&(E.nf=gl[E.nf]);for(var de=0;392!=de&&Be[de]!=E.nf;++de);if(392==de)for(de=57;392!=de;++de)if(null==Be[de]){cs(E.nf,de);break}break;case"column":if("table"!==l[l.length-1][0])break;if((ke=Yi(a[0])).Hidden&&(ke.hidden=!0,delete ke.Hidden),ke.Width&&(ke.wpx=parseInt(ke.Width,10)),!Ze&&ke.wpx>10){Ze=!0,$r=6;for(var ie=0;ie<Ae.length;++ie)Ae[ie]&&io(Ae[ie])}Ze&&io(ke),Ae[ke.Index-1||Ae.length]=ke;for(var Xe=0;Xe<+ke.Span;++Xe)Ae[Ae.length]=Pt(ke);break;case"namedrange":if("/"===a[1])break;L.Names||(L.Names=[]);var D=ze(a[0]),yt={Name:D.Name,Ref:Qo(D.RefersTo.slice(1),{r:0,c:0})};L.Sheets.length>0&&(yt.Sheet=L.Sheets.length-1),L.Names.push(yt);break;case"namedcell":case"b":case"i":case"u":case"s":case"em":case"h2":case"h3":case"sub":case"sup":case"span":case"alignment":case"borders":case"border":case"protection":case"paragraphs":case"name":case"pixelsperinch":case"null":break;case"font":if("/>"===a[0].slice(-2))break;"/"===a[1]?S+=i.slice(_,a.index):_=a.index+a[0].length;break;case"interior":if(!r.cellStyles)break;E.Interior=Yi(a[0]);break;case"author":case"title":case"description":case"created":case"keywords":case"subject":case"category":case"company":case"lastauthor":case"lastsaved":case"lastprinted":case"version":case"revision":case"totaltime":case"hyperlinkbase":case"manager":case"contentstatus":case"identifier":case"language":case"appname":if("/>"===a[0].slice(-2))break;"/"===a[1]?b8(H,ee,i.slice(B,a.index)):B=a.index+a[0].length;break;case"styles":case"workbook":if("/"===a[1]){if((c=l.pop())[0]!==a[3])throw new Error("Bad state: "+c.join("|"))}else l.push([a[3],!1]);break;case"comment":if("/"===a[1]){if((c=l.pop())[0]!==a[3])throw new Error("Bad state: "+c.join("|"));QG(oe),ue.push(oe)}else l.push([a[3],!1]),oe={a:(c=Yi(a[0])).Author};break;case"autofilter":if("/"===a[1]){if((c=l.pop())[0]!==a[3])throw new Error("Bad state: "+c.join("|"))}else if("/"!==a[0].charAt(a[0].length-2)){var it=Yi(a[0]);h["!autofilter"]={ref:Qo(it.Range).replace(/\$/g,"")},l.push([a[3],!0])}break;case"datavalidation":if("/"===a[1]){if((c=l.pop())[0]!==a[3])throw new Error("Bad state: "+c.join("|"))}else"/"!==a[0].charAt(a[0].length-2)&&l.push([a[3],!0]);break;case"componentoptions":case"documentproperties":case"customdocumentproperties":case"officedocumentsettings":case"pivottable":case"pivotcache":case"names":case"mapinfo":case"pagebreaks":case"querytable":case"sorting":case"schema":case"conditionalformatting":case"smarttagtype":case"smarttags":case"excelworkbook":case"workbookoptions":case"worksheetoptions":if("/"===a[1]){if((c=l.pop())[0]!==a[3])throw new Error("Bad state: "+c.join("|"))}else"/"!==a[0].charAt(a[0].length-2)&&l.push([a[3],!0]);break;default:if(0==l.length&&"document"==a[3]||0==l.length&&"uof"==a[3])return N1(i,r);var Et=!0;switch(l[l.length-1][0]){case"officedocumentsettings":switch(a[3]){case"allowpng":case"removepersonalinformation":case"downloadcomponents":case"locationofcomponents":case"colors":case"color":case"index":case"rgb":case"targetscreensize":case"readonlyrecommended":break;default:Et=!1}break;case"componentoptions":switch(a[3]){case"toolbar":case"hideofficelogo":case"spreadsheetautofit":case"label":case"caption":case"maxheight":case"maxwidth":case"nextsheetnumber":break;default:Et=!1}break;case"excelworkbook":switch(a[3]){case"date1904":L.WBProps.date1904=!0;break;case"windowheight":case"windowwidth":case"windowtopx":case"windowtopy":case"tabratio":case"protectstructure":case"protectwindow":case"protectwindows":case"activesheet":case"displayinknotes":case"firstvisiblesheet":case"supbook":case"sheetname":case"sheetindex":case"sheetindexfirst":case"sheetindexlast":case"dll":case"acceptlabelsinformulas":case"donotsavelinkvalues":case"iteration":case"maxiterations":case"maxchange":case"path":case"xct":case"count":case"selectedsheets":case"calculation":case"uncalced":case"startupprompt":case"crn":case"externname":case"formula":case"colfirst":case"collast":case"wantadvise":case"boolean":case"error":case"text":case"ole":case"noautorecover":case"publishobjects":case"donotcalculatebeforesave":case"number":case"refmoder1c1":case"embedsavesmarttags":break;default:Et=!1}break;case"workbookoptions":switch(a[3]){case"owcversion":case"height":case"width":break;default:Et=!1}break;case"worksheetoptions":switch(a[3]){case"visible":if("/>"!==a[0].slice(-2))if("/"===a[1])switch(i.slice(B,a.index)){case"SheetHidden":O.Hidden=1;break;case"SheetVeryHidden":O.Hidden=2}else B=a.index+a[0].length;break;case"header":h["!margins"]||so(h["!margins"]={},"xlml"),isNaN(+ze(a[0]).Margin)||(h["!margins"].header=+ze(a[0]).Margin);break;case"footer":h["!margins"]||so(h["!margins"]={},"xlml"),isNaN(+ze(a[0]).Margin)||(h["!margins"].footer=+ze(a[0]).Margin);break;case"pagemargins":var st=ze(a[0]);h["!margins"]||so(h["!margins"]={},"xlml"),isNaN(+st.Top)||(h["!margins"].top=+st.Top),isNaN(+st.Left)||(h["!margins"].left=+st.Left),isNaN(+st.Right)||(h["!margins"].right=+st.Right),isNaN(+st.Bottom)||(h["!margins"].bottom=+st.Bottom);break;case"displayrighttoleft":L.Views||(L.Views=[]),L.Views[0]||(L.Views[0]={}),L.Views[0].RTL=!0;break;case"freezepanes":case"frozennosplit":case"splithorizontal":case"splitvertical":case"donotdisplaygridlines":case"activerow":case"activecol":case"toprowbottompane":case"leftcolumnrightpane":case"unsynced":case"print":case"printerrors":case"panes":case"scale":case"pane":case"number":case"layout":case"pagesetup":case"selected":case"protectobjects":case"enableselection":case"protectscenarios":case"validprinterinfo":case"horizontalresolution":case"verticalresolution":case"numberofcopies":case"activepane":case"toprowvisible":case"leftcolumnvisible":case"fittopage":case"rangeselection":case"papersizeindex":case"pagelayoutzoom":case"pagebreakzoom":case"filteron":case"fitwidth":case"fitheight":case"commentslayout":case"zoom":case"lefttoright":case"gridlines":case"allowsort":case"allowfilter":case"allowinsertrows":case"allowdeleterows":case"allowinsertcols":case"allowdeletecols":case"allowinserthyperlinks":case"allowformatcells":case"allowsizecols":case"allowsizerows":case"tabcolorindex":case"donotdisplayheadings":case"showpagelayoutzoom":case"blackandwhite":case"donotdisplayzeros":case"displaypagebreak":case"rowcolheadings":case"donotdisplayoutline":case"noorientation":case"allowusepivottables":case"zeroheight":case"viewablerange":case"selection":case"protectcontents":break;case"nosummaryrowsbelowdetail":h["!outline"]||(h["!outline"]={}),h["!outline"].above=!0;break;case"nosummarycolumnsrightdetail":h["!outline"]||(h["!outline"]={}),h["!outline"].left=!0;break;default:Et=!1}break;case"pivottable":case"pivotcache":switch(a[3]){case"immediateitemsondrop":case"showpagemultipleitemlabel":case"compactrowindent":case"location":case"pivotfield":case"orientation":case"layoutform":case"layoutsubtotallocation":case"layoutcompactrow":case"position":case"pivotitem":case"datatype":case"datafield":case"sourcename":case"parentfield":case"ptlineitems":case"ptlineitem":case"countofsameitems":case"item":case"itemtype":case"ptsource":case"cacheindex":case"consolidationreference":case"filename":case"reference":case"nocolumngrand":case"norowgrand":case"blanklineafteritems":case"hidden":case"subtotal":case"basefield":case"mapchilditems":case"function":case"refreshonfileopen":case"printsettitles":case"mergelabels":case"defaultversion":case"refreshname":case"refreshdate":case"refreshdatecopy":case"versionlastrefresh":case"versionlastupdate":case"versionupdateablemin":case"versionrefreshablemin":case"calculation":break;default:Et=!1}break;case"pagebreaks":switch(a[3]){case"colbreaks":case"colbreak":case"rowbreaks":case"rowbreak":case"colstart":case"colend":case"rowend":break;default:Et=!1}break;case"autofilter":switch(a[3]){case"autofiltercolumn":case"autofiltercondition":case"autofilterand":case"autofilteror":break;default:Et=!1}break;case"querytable":switch(a[3]){case"id":case"autoformatfont":case"autoformatpattern":case"querysource":case"querytype":case"enableredirections":case"refreshedinxl9":case"urlstring":case"htmltables":case"connection":case"commandtext":case"refreshinfo":case"notitles":case"nextid":case"columninfo":case"overwritecells":case"donotpromptforfile":case"textwizardsettings":case"source":case"number":case"decimal":case"thousandseparator":case"trailingminusnumbers":case"formatsettings":case"fieldtype":case"delimiters":case"tab":case"comma":case"autoformatname":case"versionlastedit":case"versionlastrefresh":break;default:Et=!1}break;case"datavalidation":switch(a[3]){case"range":case"type":case"min":case"max":case"sort":case"descending":case"order":case"casesensitive":case"value":case"errorstyle":case"errormessage":case"errortitle":case"inputmessage":case"inputtitle":case"combohide":case"inputhide":case"condition":case"qualifier":case"useblank":case"value1":case"value2":case"format":case"cellrangelist":break;default:Et=!1}break;case"sorting":case"conditionalformatting":switch(a[3]){case"range":case"type":case"min":case"max":case"sort":case"descending":case"order":case"casesensitive":case"value":case"errorstyle":case"errormessage":case"errortitle":case"cellrangelist":case"inputmessage":case"inputtitle":case"combohide":case"inputhide":case"condition":case"qualifier":case"useblank":case"value1":case"value2":case"format":break;default:Et=!1}break;case"mapinfo":case"schema":case"data":switch(a[3]){case"map":case"entry":case"range":case"xpath":case"field":case"xsdtype":case"filteron":case"aggregate":case"elementtype":case"attributetype":case"schema":case"element":case"complextype":case"datatype":case"all":case"attribute":case"extends":case"row":break;default:Et=!1}break;case"smarttags":break;default:Et=!1}if(Et||a[3].match(/!\[CDATA/))break;if(!l[l.length-1][1])throw"Unrecognized tag: "+a[3]+"|"+l.join("|");if("customdocumentproperties"===l[l.length-1][0]){if("/>"===a[0].slice(-2))break;"/"===a[1]?KG(V,ee,re,i.slice(B,a.index)):(re=a,B=a.index+a[0].length);break}if(r.WTF)throw"Unrecognized tag: "+a[3]+"|"+l.join("|")}var Ee={};return!r.bookSheets&&!r.bookProps&&(Ee.Sheets=d),Ee.SheetNames=u,Ee.Workbook=L,Ee.SSF=Pt(Be),Ee.Props=H,Ee.Custprops=V,Ee}function Hf(e,t){switch(jf(t=t||{}),t.type||"base64"){case"base64":return Nf(Ci(e),t);case"binary":case"buffer":case"file":return Nf(e,t);case"array":return Nf(ln(e),t)}}var u9=[60,1084,2066,2165,2175];function h9(e,t,r,i,s){var n=i,o=[],a=r.slice(r.l,r.l+n);if(s&&s.enc&&s.enc.insitu&&a.length>0)switch(e){case 9:case 521:case 1033:case 2057:case 47:case 405:case 225:case 406:case 312:case 404:case 10:case 133:break;default:s.enc.insitu(a)}o.push(a),r.l+=n;for(var l=Ds(r,r.l),c=Gf[l],d=0;null!=c&&u9.indexOf(l)>-1;)n=Ds(r,r.l+2),d=r.l+4,2066==l?d+=4:(2165==l||2175==l)&&(d+=12),a=r.slice(d,r.l+4+n),o.push(a),r.l+=4+n,c=Gf[l=Ds(r,r.l)];var u=br(o);Mr(u,0);var h=0;u.lens=[];for(var f=0;f<o.length;++f)u.lens.push(h),h+=o[f].length;if(u.length<i)throw"XLS Record 0x"+e.toString(16)+" Truncated: "+u.length+" < "+i;return t.f(u,u.length,s)}function gs(e,t,r){if("z"!==e.t&&e.XF){var i=0;try{i=e.z||e.XF.numFmtId||0,t.cellNF&&(e.z=Be[i])}catch(n){if(t.WTF)throw n}if(!t||!1!==t.cellText)try{e.w="e"===e.t?e.w||Ms[e.v]:0===i||"General"==i?"n"===e.t?(0|e.v)===e.v?e.v.toString(10):$a(e.v):zn(e.v):xi(i,e.v,{date1904:!!r,dateNF:t&&t.dateNF})}catch(n){if(t.WTF)throw n}if(t.cellDates&&i&&"n"==e.t&&Wn(Be[i]||String(i))){var s=cn(e.v);s&&(e.t="d",e.v=new Date(s.y,s.m-1,s.d,s.H,s.M,s.S,s.u))}}}function ad(e,t,r){return{v:e,ixfe:t,t:r}}function E1(e,t){var r,i,s,n;if(t||(t={}),jf(t),Mc(),t.codepage&&Ac(t.codepage),e.FullPaths){if(Le.find(e,"/encryption"))throw new Error("File is password-protected");r=Le.find(e,"!CompObj"),i=Le.find(e,"/Workbook")||Le.find(e,"/Book")}else{switch(t.type){case"base64":e=wi(Ci(e));break;case"binary":e=wi(e);break;case"buffer":break;case"array":Array.isArray(e)||(e=Array.prototype.slice.call(e))}Mr(e,0),i={content:e}}if(r&&function d9(e){var t={},r=e.content;if(r.l=28,t.AnsiUserType=r.read_shift(0,"lpstr-ansi"),t.AnsiClipboardFormat=function t8(e){return VC(e,1)}(r),r.length-r.l<=4)return t;var i=r.read_shift(4);if(0==i||i>40||(r.l-=4,t.Reserved1=r.read_shift(0,"lpstr-ansi"),r.length-r.l<=4)||1907505652!==(i=r.read_shift(4))||(t.UnicodeClipboardFormat=function r8(e){return VC(e,2)}(r),0==(i=r.read_shift(4))||i>40))return t;r.l-=4,t.Reserved2=r.read_shift(0,"lpwstr")}(r),t.bookProps&&!t.bookSheets)s={};else{var o=tt?"buffer":"array";if(i&&i.content)s=function f9(e,t){var u,f,g,m,C,y,r={opts:{}},i={},s=t.dense?[]:{},n={},o={},a=null,l=[],c="",d={},h="",v={},w=[],k=[],E=[],S={Sheets:[],WBProps:{date1904:!1},Views:[{}]},_={},M=function(rt){return rt<8?Qn[rt]:rt<64&&E[rt-8]||Qn[rt]},V=function(rt,lr,Vi){if(!(te>1||Vi.sheetRows&&rt.r>=Vi.sheetRows)){if(Vi.cellStyles&&lr.XF&&lr.XF.data&&function(rt,lr,Vi){var oo,xr=lr.XF.data;xr&&xr.patternType&&Vi&&Vi.cellStyles&&(lr.s={},lr.s.patternType=xr.patternType,(oo=sl(M(xr.icvFore)))&&(lr.s.fgColor={rgb:oo}),(oo=sl(M(xr.icvBack)))&&(lr.s.bgColor={rgb:oo}))}(0,lr,Vi),delete lr.ixfe,delete lr.XF,u=rt,h=We(rt),(!o||!o.s||!o.e)&&(o={s:{r:0,c:0},e:{r:0,c:0}}),rt.r<o.s.r&&(o.s.r=rt.r),rt.c<o.s.c&&(o.s.c=rt.c),rt.r+1>o.e.r&&(o.e.r=rt.r+1),rt.c+1>o.e.c&&(o.e.c=rt.c+1),Vi.cellFormula&&lr.f)for(var xr=0;xr<w.length;++xr)if(!(w[xr][0].s.c>rt.c||w[xr][0].s.r>rt.r||w[xr][0].e.c<rt.c||w[xr][0].e.r<rt.r)){lr.F=Ke(w[xr][0]),(w[xr][0].s.c!=rt.c||w[xr][0].s.r!=rt.r)&&delete lr.f,lr.f&&(lr.f=""+jr(w[xr][1],0,rt,we,B));break}Vi.dense?(s[rt.r]||(s[rt.r]=[]),s[rt.r][rt.c]=lr):s[h]=lr}},B={enc:!1,sbcch:0,snames:[],sharedf:v,arrayf:w,rrtabid:[],lastuser:"",biff:8,codepage:0,winlocked:0,cellStyles:!!t&&!!t.cellStyles,WTF:!!t&&!!t.wtf};t.password&&(B.password=t.password);var re,ue=[],oe=[],Ae=[],ke=[],Ze=!1,we=[];we.SheetNames=B.snames,we.sharedf=B.sharedf,we.arrayf=B.arrayf,we.names=[],we.XTI=[];var O,be=0,te=0,A=0,j=[],L=[];B.codepage=1200,Ai(1200);for(var ee=!1;e.l<e.length-1;){var xe=e.l,ce=e.read_shift(2);if(0===ce&&10===be)break;var de=e.l===e.length?0:e.read_shift(2),ie=Gf[ce];if(ie&&ie.f){if(t.bookSheets&&133===be&&133!==ce)break;if(be=ce,2===ie.r||12==ie.r){var Xe=e.read_shift(2);if(de-=2,!B.enc&&Xe!==ce&&((255&Xe)<<8|Xe>>8)!==ce)throw new Error("rt mismatch: "+Xe+"!="+ce);12==ie.r&&(e.l+=10,de-=10)}var D={};if(D=10===ce?ie.f(e,de,B):h9(ce,ie,e,de,B),0==te&&-1===[9,521,1033,2057].indexOf(be))continue;switch(ce){case 34:r.opts.Date1904=S.WBProps.date1904=D;break;case 134:r.opts.WriteProtect=!0;break;case 47:if(B.enc||(e.l=0),B.enc=D,!t.password)throw new Error("File is password-protected");if(null==D.valid)throw new Error("Encryption scheme unsupported");if(!D.valid)throw new Error("Password is incorrect");break;case 92:B.lastuser=D;break;case 66:var yt=Number(D);switch(yt){case 21010:yt=1200;break;case 32768:yt=1e4;break;case 32769:yt=1252}Ai(B.codepage=yt),ee=!0;break;case 317:B.rrtabid=D;break;case 25:B.winlocked=D;break;case 439:r.opts.RefreshAll=D;break;case 12:r.opts.CalcCount=D;break;case 16:r.opts.CalcDelta=D;break;case 17:r.opts.CalcIter=D;break;case 13:r.opts.CalcMode=D;break;case 14:r.opts.CalcPrecision=D;break;case 95:r.opts.CalcSaveRecalc=D;break;case 15:B.CalcRefMode=D;break;case 2211:r.opts.FullCalc=D;break;case 129:D.fDialog&&(s["!type"]="dialog"),D.fBelow||((s["!outline"]||(s["!outline"]={})).above=!0),D.fRight||((s["!outline"]||(s["!outline"]={})).left=!0);break;case 224:k.push(D);break;case 430:we.push([D]),we[we.length-1].XTI=[];break;case 35:case 547:we[we.length-1].push(D);break;case 24:case 536:O={Name:D.Name,Ref:jr(D.rgce,0,null,we,B)},D.itab>0&&(O.Sheet=D.itab-1),we.names.push(O),we[0]||(we[0]=[],we[0].XTI=[]),we[we.length-1].push(D),"_xlnm._FilterDatabase"==D.Name&&D.itab>0&&D.rgce&&D.rgce[0]&&D.rgce[0][0]&&"PtgArea3d"==D.rgce[0][0][0]&&(L[D.itab-1]={ref:Ke(D.rgce[0][0][1][2])});break;case 22:B.ExternCount=D;break;case 23:0==we.length&&(we[0]=[],we[0].XTI=[]),we[we.length-1].XTI=we[we.length-1].XTI.concat(D),we.XTI=we.XTI.concat(D);break;case 2196:if(B.biff<8)break;null!=O&&(O.Comment=D[1]);break;case 18:s["!protect"]=D;break;case 19:0!==D&&B.WTF&&console.error("Password verifier: "+D);break;case 133:n[D.pos]=D,B.snames.push(D.name);break;case 10:if(--te)break;if(o.e){if(o.e.r>0&&o.e.c>0){if(o.e.r--,o.e.c--,s["!ref"]=Ke(o),t.sheetRows&&t.sheetRows<=o.e.r){var it=o.e.r;o.e.r=t.sheetRows-1,s["!fullref"]=s["!ref"],s["!ref"]=Ke(o),o.e.r=it}o.e.r++,o.e.c++}ue.length>0&&(s["!merges"]=ue),oe.length>0&&(s["!objects"]=oe),Ae.length>0&&(s["!cols"]=Ae),ke.length>0&&(s["!rows"]=ke),S.Sheets.push(_)}""===c?d=s:i[c]=s,s=t.dense?[]:{};break;case 9:case 521:case 1033:case 2057:if(8===B.biff&&(B.biff={9:2,521:3,1033:4}[ce]||{512:2,768:3,1024:4,1280:5,1536:8,2:2,7:2}[D.BIFFVer]||8),B.biffguess=0==D.BIFFVer,0==D.BIFFVer&&4096==D.dt&&(B.biff=5,ee=!0,Ai(B.codepage=28591)),8==B.biff&&0==D.BIFFVer&&16==D.dt&&(B.biff=2),te++)break;if(s=t.dense?[]:{},B.biff<8&&!ee&&(ee=!0,Ai(B.codepage=t.codepage||1252)),B.biff<5||0==D.BIFFVer&&4096==D.dt){""===c&&(c="Sheet1"),o={s:{r:0,c:0},e:{r:0,c:0}};var Et={pos:e.l-de,name:c};n[Et.pos]=Et,B.snames.push(c)}else c=(n[xe]||{name:""}).name;32==D.dt&&(s["!type"]="chart"),64==D.dt&&(s["!type"]="macro"),ue=[],oe=[],B.arrayf=w=[],Ae=[],ke=[],Ze=!1,_={Hidden:(n[xe]||{hs:0}).hs,name:c};break;case 515:case 3:case 2:"chart"==s["!type"]&&(t.dense?(s[D.r]||[])[D.c]:s[We({c:D.c,r:D.r})])&&++D.c,C={ixfe:D.ixfe,XF:k[D.ixfe]||{},v:D.val,t:"n"},A>0&&(C.z=j[C.ixfe>>8&63]),gs(C,t,r.opts.Date1904),V({c:D.c,r:D.r},C,t);break;case 5:case 517:C={ixfe:D.ixfe,XF:k[D.ixfe],v:D.val,t:D.t},A>0&&(C.z=j[C.ixfe>>8&63]),gs(C,t,r.opts.Date1904),V({c:D.c,r:D.r},C,t);break;case 638:C={ixfe:D.ixfe,XF:k[D.ixfe],v:D.rknum,t:"n"},A>0&&(C.z=j[C.ixfe>>8&63]),gs(C,t,r.opts.Date1904),V({c:D.c,r:D.r},C,t);break;case 189:for(var st=D.c;st<=D.C;++st){var Ee=D.rkrec[st-D.c][0];C={ixfe:Ee,XF:k[Ee],v:D.rkrec[st-D.c][1],t:"n"},A>0&&(C.z=j[C.ixfe>>8&63]),gs(C,t,r.opts.Date1904),V({c:st,r:D.r},C,t)}break;case 6:case 518:case 1030:if("String"==D.val){a=D;break}if((C=ad(D.val,D.cell.ixfe,D.tt)).XF=k[C.ixfe],t.cellFormula){var ar=D.formula;if(ar&&ar[0]&&ar[0][0]&&"PtgExp"==ar[0][0][0]){var Gi=ar[0][0][1][0],ms=ar[0][0][1][1],_s=We({r:Gi,c:ms});v[_s]?C.f=""+jr(D.formula,0,D.cell,we,B):C.F=((t.dense?(s[Gi]||[])[ms]:s[_s])||{}).F}else C.f=""+jr(D.formula,0,D.cell,we,B)}A>0&&(C.z=j[C.ixfe>>8&63]),gs(C,t,r.opts.Date1904),V(D.cell,C,t),a=D;break;case 7:case 519:if(!a)throw new Error("String record expects Formula");a.val=D,(C=ad(D,a.cell.ixfe,"s")).XF=k[C.ixfe],t.cellFormula&&(C.f=""+jr(a.formula,0,a.cell,we,B)),A>0&&(C.z=j[C.ixfe>>8&63]),gs(C,t,r.opts.Date1904),V(a.cell,C,t),a=null;break;case 33:case 545:w.push(D);var xl=We(D[0].s);if(f=t.dense?(s[D[0].s.r]||[])[D[0].s.c]:s[xl],t.cellFormula&&f){if(!a||!xl||!f)break;f.f=""+jr(D[1],0,D[0],we,B),f.F=Ke(D[0])}break;case 1212:if(!t.cellFormula)break;if(h){if(!a)break;v[We(a.cell)]=D[0],((f=t.dense?(s[a.cell.r]||[])[a.cell.c]:s[We(a.cell)])||{}).f=""+jr(D[0],0,u,we,B)}break;case 253:C=ad(l[D.isst].t,D.ixfe,"s"),l[D.isst].h&&(C.h=l[D.isst].h),C.XF=k[C.ixfe],A>0&&(C.z=j[C.ixfe>>8&63]),gs(C,t,r.opts.Date1904),V({c:D.c,r:D.r},C,t);break;case 513:t.sheetStubs&&(C={ixfe:D.ixfe,XF:k[D.ixfe],t:"z"},A>0&&(C.z=j[C.ixfe>>8&63]),gs(C,t,r.opts.Date1904),V({c:D.c,r:D.r},C,t));break;case 190:if(t.sheetStubs)for(var Cn=D.c;Cn<=D.C;++Cn){var Ei=D.ixfe[Cn-D.c];C={ixfe:Ei,XF:k[Ei],t:"z"},A>0&&(C.z=j[C.ixfe>>8&63]),gs(C,t,r.opts.Date1904),V({c:Cn,r:D.r},C,t)}break;case 214:case 516:case 4:(C=ad(D.val,D.ixfe,"s")).XF=k[C.ixfe],A>0&&(C.z=j[C.ixfe>>8&63]),gs(C,t,r.opts.Date1904),V({c:D.c,r:D.r},C,t);break;case 0:case 512:1===te&&(o=D);break;case 252:l=D;break;case 1054:if(4==B.biff){j[A++]=D[1];for(var Ls=0;Ls<A+163&&Be[Ls]!=D[1];++Ls);Ls>=163&&cs(D[1],A+163)}else cs(D[1],D[0]);break;case 30:j[A++]=D;for(var wn=0;wn<A+163&&Be[wn]!=D;++wn);wn>=163&&cs(D,A+163);break;case 229:ue=ue.concat(D);break;case 93:oe[D.cmo[0]]=B.lastobj=D;break;case 438:B.lastobj.TxO=D;break;case 127:B.lastobj.ImData=D;break;case 440:for(m=D[0].s.r;m<=D[0].e.r;++m)for(g=D[0].s.c;g<=D[0].e.c;++g)(f=t.dense?(s[m]||[])[g]:s[We({c:g,r:m})])&&(f.l=D[1]);break;case 2048:for(m=D[0].s.r;m<=D[0].e.r;++m)for(g=D[0].s.c;g<=D[0].e.c;++g)(f=t.dense?(s[m]||[])[g]:s[We({c:g,r:m})])&&f.l&&(f.l.Tooltip=D[1]);break;case 28:if(B.biff<=5&&B.biff>=2)break;f=t.dense?(s[D[0].r]||[])[D[0].c]:s[We(D[0])];var Sl=oe[D[2]];f||(t.dense?(s[D[0].r]||(s[D[0].r]=[]),f=s[D[0].r][D[0].c]={t:"z"}):f=s[We(D[0])]={t:"z"},o.e.r=Math.max(o.e.r,D[0].r),o.s.r=Math.min(o.s.r,D[0].r),o.e.c=Math.max(o.e.c,D[0].c),o.s.c=Math.min(o.s.c,D[0].c)),f.c||(f.c=[]),f.c.push({a:D[1],t:Sl.TxO.t});break;case 2173:t7(0,D.ext);break;case 125:if(!B.cellStyles)break;for(;D.e>=D.s;)Ae[D.e--]={width:D.w/256,level:D.level||0,hidden:!!(1&D.flags)},Ze||(Ze=!0,kf(D.w/256)),io(Ae[D.e+1]);break;case 520:var ri={};null!=D.level&&(ke[D.r]=ri,ri.level=D.level),D.hidden&&(ke[D.r]=ri,ri.hidden=!0),D.hpt&&(ke[D.r]=ri,ri.hpt=D.hpt,ri.hpx=Xo(D.hpt));break;case 38:case 39:case 40:case 41:s["!margins"]||so(s["!margins"]={}),s["!margins"][{38:"left",39:"right",40:"top",41:"bottom"}[ce]]=D;break;case 161:s["!margins"]||so(s["!margins"]={}),s["!margins"].header=D.header,s["!margins"].footer=D.footer;break;case 574:D.RTL&&(S.Views[0].RTL=!0);break;case 146:E=D;break;case 2198:re=D;break;case 140:y=D;break;case 442:c?_.CodeName=D||_.name:S.WBProps.CodeName=D||"ThisWorkbook"}}else ie||console.error("Missing Info for XLS Record 0x"+ce.toString(16)),e.l+=de}return r.SheetNames=Jt(n).sort(function(vs,rt){return Number(vs)-Number(rt)}).map(function(vs){return n[vs].name}),t.bookSheets||(r.Sheets=i),!r.SheetNames.length&&d["!ref"]?(r.SheetNames.push("Sheet1"),r.Sheets&&(r.Sheets.Sheet1=d)):r.Preamble=d,r.Sheets&&L.forEach(function(vs,rt){r.Sheets[r.SheetNames[rt]]["!autofilter"]=vs}),r.Strings=l,r.SSF=Pt(Be),B.enc&&(r.Encryption=B.enc),re&&(r.Themes=re),r.Metadata={},void 0!==y&&(r.Metadata.Country=y),we.names.length>0&&(S.Names=we.names),r.Workbook=S,r}(i.content,t);else if((n=Le.find(e,"PerfectOffice_MAIN"))&&n.content)s=ro.to_workbook(n.content,(t.type=o,t));else{if(!(n=Le.find(e,"NativeContent_MAIN"))||!n.content)throw(n=Le.find(e,"MN0"))&&n.content?new Error("Unsupported Works 4 for Mac file"):new Error("Cannot find Workbook stream");s=ro.to_workbook(n.content,(t.type=o,t))}t.bookVBA&&e.FullPaths&&Le.find(e,"/_VBA_PROJECT_CUR/VBA/dir")&&(s.vbaraw=function P7(e){var t=Le.utils.cfb_new({root:"R"});return e.FullPaths.forEach(function(r,i){if("/"!==r.slice(-1)&&r.match(/_VBA_PROJECT_CUR/)){var s=r.replace(/^[^\/]*/,"R").replace(/\/_VBA_PROJECT_CUR\u0000*/,"");Le.utils.cfb_add(t,s,e.FileIndex[i].content)}}),Le.write(t)}(e))}var a={};return e.FullPaths&&function g9(e,t,r){var i=Le.find(e,"/!DocumentSummaryInformation");if(i&&i.size>0)try{var s=cw(i,ff,"02d5cdd59c2e1b10939708002b2cf9ae");for(var n in s)t[n]=s[n]}catch(c){if(r.WTF)throw c}var o=Le.find(e,"/!SummaryInformation");if(o&&o.size>0)try{var a=cw(o,gf,"e0859ff2f94f6810ab9108002b27b3d9");for(var l in a)null==t[l]&&(t[l]=a[l])}catch(c){if(r.WTF)throw c}t.HeadingPairs&&t.TitlesOfParts&&(QC(t.HeadingPairs,t.TitlesOfParts,t,r),delete t.HeadingPairs,delete t.TitlesOfParts)}(e,a,t),s.Props=s.Custprops=a,t.bookFiles&&(s.cfb=e),s}var ml={0:{f:function HN(e,t){var r={},i=e.l+t;r.r=e.read_shift(4),e.l+=4;var s=e.read_shift(2);e.l+=1;var n=e.read_shift(1);return e.l=i,7&n&&(r.level=7&n),16&n&&(r.hidden=!0),32&n&&(r.hpt=s/20),r}},1:{f:function KN(e){return[_i(e)]}},2:{f:function hH(e){return[_i(e),uf(e),"n"]}},3:{f:function tH(e){return[_i(e),e.read_shift(1),"e"]}},4:{f:function QN(e){return[_i(e),e.read_shift(1),"b"]}},5:{f:function cH(e){return[_i(e),Wr(e),"n"]}},6:{f:function vH(e){return[_i(e),zr(e),"str"]}},7:{f:function nH(e){return[_i(e),e.read_shift(4),"s"]}},8:{f:function EH(e,t,r){var i=e.l+t,s=_i(e);s.r=r["!row"];var o=[s,zr(e),"str"];if(r.cellFormula){e.l+=2;var a=nd(e,i-e.l,r);o[3]=jr(a,0,s,r.supbooks,r)}else e.l=i;return o}},9:{f:function yH(e,t,r){var i=e.l+t,s=_i(e);s.r=r["!row"];var o=[s,Wr(e),"n"];if(r.cellFormula){e.l+=2;var a=nd(e,i-e.l,r);o[3]=jr(a,0,s,r.supbooks,r)}else e.l=i;return o}},10:{f:function SH(e,t,r){var i=e.l+t,s=_i(e);s.r=r["!row"];var o=[s,e.read_shift(1),"b"];if(r.cellFormula){e.l+=2;var a=nd(e,i-e.l,r);o[3]=jr(a,0,s,r.supbooks,r)}else e.l=i;return o}},11:{f:function bH(e,t,r){var i=e.l+t,s=_i(e);s.r=r["!row"];var o=[s,e.read_shift(1),"e"];if(r.cellFormula){e.l+=2;var a=nd(e,i-e.l,r);o[3]=jr(a,0,s,r.supbooks,r)}else e.l=i;return o}},12:{f:function XN(e){return[Kn(e)]}},13:{f:function gH(e){return[Kn(e),uf(e),"n"]}},14:{f:function iH(e){return[Kn(e),e.read_shift(1),"e"]}},15:{f:function ZN(e){return[Kn(e),e.read_shift(1),"b"]}},16:{f:f1},17:{f:function wH(e){return[Kn(e),zr(e),"str"]}},18:{f:function aH(e){return[Kn(e),e.read_shift(4),"s"]}},19:{f:of},20:{},21:{},22:{},23:{},24:{},25:{},26:{},27:{},28:{},29:{},30:{},31:{},32:{},33:{},34:{},35:{T:1},36:{T:-1},37:{T:1},38:{T:-1},39:{f:function xG(e,t,r){var i=e.l+t;e.l+=4,e.l+=1;var s=e.read_shift(4),n=Q_(e),o=sN(e,0,r),a=af(e);e.l=i;var l={Name:n,Ptg:o};return s<268435455&&(l.Sheet=s),a&&(l.Comment=a),l}},40:{},42:{},43:{f:function wO(e,t,r){var i={};i.sz=e.read_shift(2)/20;var s=function Z_(e){var t=e.read_shift(1);return e.l++,{fBold:1&t,fItalic:2&t,fUnderline:4&t,fStrikeout:8&t,fOutline:16&t,fShadow:32&t,fCondense:64&t,fExtend:128&t}}(e);switch(s.fItalic&&(i.italic=1),s.fCondense&&(i.condense=1),s.fExtend&&(i.extend=1),s.fShadow&&(i.shadow=1),s.fOutline&&(i.outline=1),s.fStrikeout&&(i.strike=1),700===e.read_shift(2)&&(i.bold=1),e.read_shift(2)){case 1:i.vertAlign="superscript";break;case 2:i.vertAlign="subscript"}var o=e.read_shift(1);0!=o&&(i.underline=o);var a=e.read_shift(1);a>0&&(i.family=a);var l=e.read_shift(1);switch(l>0&&(i.charset=l),e.l++,i.color=function J_(e){var t={},i=e.read_shift(1)>>>1,s=e.read_shift(1),n=e.read_shift(2,"i"),o=e.read_shift(1),a=e.read_shift(1),l=e.read_shift(1);switch(e.l++,i){case 0:t.auto=1;break;case 1:t.index=s;var c=Qn[s];c&&(t.rgb=sl(c));break;case 2:t.rgb=sl([o,a,l]);break;case 3:t.theme=s}return 0!=n&&(t.tint=n>0?n/32767:n/32768),t}(e),e.read_shift(1)){case 1:i.scheme="major";break;case 2:i.scheme="minor"}return i.name=zr(e),i}},44:{f:function vO(e,t){return[e.read_shift(2),zr(e)]}},45:{f:bO},46:{f:EO},47:{f:function yO(e,t){var r=e.l+t,i=e.read_shift(2),s=e.read_shift(2);return e.l=r,{ixfe:i,numFmtId:s}}},48:{},49:{f:function $_(e){return e.read_shift(4,"i")}},50:{},51:{f:function s7(e){for(var t=[],r=e.read_shift(4);r-- >0;)t.push([e.read_shift(4),e.read_shift(4)]);return t}},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:Dw},62:{f:function mH(e){return[_i(e),of(e),"is"]}},63:{f:function f7(e){var t={};t.i=e.read_shift(4);var r={};r.r=e.read_shift(4),r.c=e.read_shift(4),t.r=We(r);var i=e.read_shift(1);return 2&i&&(t.l="1"),8&i&&(t.a="1"),t}},64:{f:function GH(){}},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:Vr,p:0},132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:function OH(e){var t=e.read_shift(2);return e.l+=28,{RTL:32&t}}},138:{T:-1},139:{T:1},140:{T:-1},141:{T:1},142:{T:-1},143:{T:1},144:{T:-1},145:{T:1},146:{T:-1},147:{f:function $N(e,t){var r={},i=e[e.l];return++e.l,r.above=!(64&i),r.left=!(128&i),e.l+=18,r.name=Y_(e,t-19),r}},148:{f:zN,p:16},151:{f:function DH(){}},152:{},153:{f:function vG(e,t){var r={},i=e.read_shift(4);r.defaultThemeVersion=e.read_shift(4);var s=t>8?zr(e):"";return s.length>0&&(r.CodeName=s),r.autoCompressPictures=!!(65536&i),r.backupFile=!!(64&i),r.checkCompatibility=!!(4096&i),r.date1904=!!(1&i),r.filterPrivacy=!!(8&i),r.hidePivotFieldList=!!(1024&i),r.promptedSolutions=!!(16&i),r.publishItems=!!(2048&i),r.refreshAllConnections=!!(262144&i),r.saveExternalLinkValues=!!(128&i),r.showBorderUnselectedTables=!!(4&i),r.showInkAnnotation=!!(32&i),r.showObjects=["all","placeholders","none"][i>>13&3],r.showPivotChartFilter=!!(32768&i),r.updateLinks=["userSet","never","always"][i>>8&3],r}},154:{},155:{},156:{f:function pG(e,t){var r={};return r.Hidden=e.read_shift(4),r.iTabID=e.read_shift(4),r.strRelID=cf(e,t-8),r.name=zr(e),r}},157:{},158:{},159:{T:1,f:function _5(e){return[e.read_shift(4),e.read_shift(4)]}},160:{T:-1},161:{T:1,f:Xn},162:{T:-1},163:{T:1},164:{T:-1},165:{T:1},166:{T:-1},167:{},168:{},169:{},170:{},171:{},172:{T:1},173:{T:-1},174:{},175:{},176:{f:FH},177:{T:1},178:{T:-1},179:{T:1},180:{T:-1},181:{T:1},182:{T:-1},183:{T:1},184:{T:-1},185:{T:1},186:{T:-1},187:{T:1},188:{T:-1},189:{T:1},190:{T:-1},191:{T:1},192:{T:-1},193:{T:1},194:{T:-1},195:{T:1},196:{T:-1},197:{T:1},198:{T:-1},199:{T:1},200:{T:-1},201:{T:1},202:{T:-1},203:{T:1},204:{T:-1},205:{T:1},206:{T:-1},207:{T:1},208:{T:-1},209:{T:1},210:{T:-1},211:{T:1},212:{T:-1},213:{T:1},214:{T:-1},215:{T:1},216:{T:-1},217:{T:1},218:{T:-1},219:{T:1},220:{T:-1},221:{T:1},222:{T:-1},223:{T:1},224:{T:-1},225:{T:1},226:{T:-1},227:{T:1},228:{T:-1},229:{T:1},230:{T:-1},231:{T:1},232:{T:-1},233:{T:1},234:{T:-1},235:{T:1},236:{T:-1},237:{T:1},238:{T:-1},239:{T:1},240:{T:-1},241:{T:1},242:{T:-1},243:{T:1},244:{T:-1},245:{T:1},246:{T:-1},247:{T:1},248:{T:-1},249:{T:1},250:{T:-1},251:{T:1},252:{T:-1},253:{T:1},254:{T:-1},255:{T:1},256:{T:-1},257:{T:1},258:{T:-1},259:{T:1},260:{T:-1},261:{T:1},262:{T:-1},263:{T:1},264:{T:-1},265:{T:1},266:{T:-1},267:{T:1},268:{T:-1},269:{T:1},270:{T:-1},271:{T:1},272:{T:-1},273:{T:1},274:{T:-1},275:{T:1},276:{T:-1},277:{},278:{T:1},279:{T:-1},280:{T:1},281:{T:-1},282:{T:1},283:{T:1},284:{T:-1},285:{T:1},286:{T:-1},287:{T:1},288:{T:-1},289:{T:1},290:{T:-1},291:{T:1},292:{T:-1},293:{T:1},294:{T:-1},295:{T:1},296:{T:-1},297:{T:1},298:{T:-1},299:{T:1},300:{T:-1},301:{T:1},302:{T:-1},303:{T:1},304:{T:-1},305:{T:1},306:{T:-1},307:{T:1},308:{T:-1},309:{T:1},310:{T:-1},311:{T:1},312:{T:-1},313:{T:-1},314:{T:1},315:{T:-1},316:{T:1},317:{T:-1},318:{T:1},319:{T:-1},320:{T:1},321:{T:-1},322:{T:1},323:{T:-1},324:{T:1},325:{T:-1},326:{T:1},327:{T:-1},328:{T:1},329:{T:-1},330:{T:1},331:{T:-1},332:{T:1},333:{T:-1},334:{T:1},335:{f:function r7(e,t){return{flags:e.read_shift(4),version:e.read_shift(4),name:zr(e)}}},336:{T:-1},337:{f:function a7(e){return e.l+=4,0!=e.read_shift(4)},T:1},338:{T:-1},339:{T:1},340:{T:-1},341:{T:1},342:{T:-1},343:{T:1},344:{T:-1},345:{T:1},346:{T:-1},347:{T:1},348:{T:-1},349:{T:1},350:{T:-1},351:{},352:{},353:{T:1},354:{T:-1},355:{f:cf},357:{},358:{},359:{},360:{T:1},361:{},362:{f:Tw},363:{},364:{},366:{},367:{},368:{},369:{},370:{},371:{},372:{T:1},373:{T:-1},374:{T:1},375:{T:-1},376:{T:1},377:{T:-1},378:{T:1},379:{T:-1},380:{T:1},381:{T:-1},382:{T:1},383:{T:-1},384:{T:1},385:{T:-1},386:{T:1},387:{T:-1},388:{T:1},389:{T:-1},390:{T:1},391:{T:-1},392:{T:1},393:{T:-1},394:{T:1},395:{T:-1},396:{},397:{},398:{},399:{},400:{},401:{T:1},403:{},404:{},405:{},406:{},407:{},408:{},409:{},410:{},411:{},412:{},413:{},414:{},415:{},416:{},417:{},418:{},419:{},420:{},421:{},422:{T:1},423:{T:1},424:{T:-1},425:{T:-1},426:{f:function AH(e,t,r){var i=e.l+t,s=GC(e),n=e.read_shift(1),o=[s];if(o[2]=n,r.cellFormula){var a=iN(e,i-e.l,r);o[1]=a}else e.l=i;return o}},427:{f:function MH(e,t,r){var i=e.l+t,n=[Xn(e,16)];if(r.cellFormula){var o=nN(e,i-e.l,r);n[1]=o,e.l=i}else e.l=i;return n}},428:{},429:{T:1},430:{T:-1},431:{T:1},432:{T:-1},433:{T:1},434:{T:-1},435:{T:1},436:{T:-1},437:{T:1},438:{T:-1},439:{T:1},440:{T:-1},441:{T:1},442:{T:-1},443:{T:1},444:{T:-1},445:{T:1},446:{T:-1},447:{T:1},448:{T:-1},449:{T:1},450:{T:-1},451:{T:1},452:{T:-1},453:{T:1},454:{T:-1},455:{T:1},456:{T:-1},457:{T:1},458:{T:-1},459:{T:1},460:{T:-1},461:{T:1},462:{T:-1},463:{T:1},464:{T:-1},465:{T:1},466:{T:-1},467:{T:1},468:{T:-1},469:{T:1},470:{T:-1},471:{},472:{},473:{T:1},474:{T:-1},475:{},476:{f:function _H(e){var t={};return g1.forEach(function(r){t[r]=Wr(e)}),t}},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:function UN(){}},486:{T:1},487:{T:-1},488:{T:1},489:{T:-1},490:{T:1},491:{T:-1},492:{T:1},493:{T:-1},494:{f:function TH(e,t){var r=e.l+t,i=Xn(e,16),s=af(e),n=zr(e),o=zr(e),a=zr(e);e.l=r;var l={rfx:i,relId:s,loc:n,display:a};return o&&(l.Tooltip=o),l}},495:{T:1},496:{T:-1},497:{T:1},498:{T:-1},499:{},500:{T:1},501:{T:-1},502:{T:1},503:{T:-1},504:{},505:{T:1},506:{T:-1},507:{},508:{T:1},509:{T:-1},510:{T:1},511:{T:-1},512:{},513:{},514:{T:1},515:{T:-1},516:{T:1},517:{T:-1},518:{T:1},519:{T:-1},520:{T:1},521:{T:-1},522:{},523:{},524:{},525:{},526:{},527:{},528:{T:1},529:{T:-1},530:{T:1},531:{T:-1},532:{T:1},533:{T:-1},534:{},535:{},536:{},537:{},538:{T:1},539:{T:-1},540:{T:1},541:{T:-1},542:{T:1},548:{},549:{},550:{f:cf},551:{},552:{},553:{},554:{T:1},555:{T:-1},556:{T:1},557:{T:-1},558:{T:1},559:{T:-1},560:{T:1},561:{T:-1},562:{},564:{},565:{T:1},566:{T:-1},569:{T:1},570:{T:-1},572:{},573:{T:1},574:{T:-1},577:{},578:{},579:{},580:{},581:{},582:{},583:{},584:{},585:{},586:{},587:{},588:{T:-1},589:{},590:{T:1},591:{T:-1},592:{T:1},593:{T:-1},594:{T:1},595:{T:-1},596:{},597:{T:1},598:{T:-1},599:{T:1},600:{T:-1},601:{T:1},602:{T:-1},603:{T:1},604:{T:-1},605:{T:1},606:{T:-1},607:{},608:{T:1},609:{T:-1},610:{},611:{T:1},612:{T:-1},613:{T:1},614:{T:-1},615:{T:1},616:{T:-1},617:{T:1},618:{T:-1},619:{T:1},620:{T:-1},625:{},626:{T:1},627:{T:-1},628:{T:1},629:{T:-1},630:{T:1},631:{T:-1},632:{f:E7},633:{T:1},634:{T:-1},635:{T:1,f:function b7(e){var t={};t.iauthor=e.read_shift(4);var r=Xn(e,16);return t.rfx=r.s,t.ref=We(r.s),e.l+=16,t}},636:{T:-1},637:{f:q_},638:{T:1},639:{},640:{T:-1},641:{T:1},642:{T:-1},643:{T:1},644:{},645:{T:-1},646:{T:1},648:{T:1},649:{},650:{T:-1},651:{f:function sG(e,t){return e.l+=10,{name:zr(e)}}},652:{},653:{T:1},654:{T:-1},655:{T:1},656:{T:-1},657:{T:1},658:{T:-1},659:{},660:{T:1},661:{},662:{T:-1},663:{},664:{T:1},665:{},666:{T:-1},667:{},668:{},669:{},671:{T:1},672:{T:-1},673:{T:1},674:{T:-1},675:{},676:{},677:{},678:{},679:{},680:{},681:{},1024:{},1025:{},1026:{T:1},1027:{T:-1},1028:{T:1},1029:{T:-1},1030:{},1031:{T:1},1032:{T:-1},1033:{T:1},1034:{T:-1},1035:{},1036:{},1037:{},1038:{T:1},1039:{T:-1},1040:{},1041:{T:1},1042:{T:-1},1043:{},1044:{},1045:{},1046:{T:1},1047:{T:-1},1048:{T:1},1049:{T:-1},1050:{},1051:{T:1},1052:{T:1},1053:{f:function VH(){}},1054:{T:1},1055:{},1056:{T:1},1057:{T:-1},1058:{T:1},1059:{T:-1},1061:{},1062:{T:1},1063:{T:-1},1064:{T:1},1065:{T:-1},1066:{T:1},1067:{T:-1},1068:{T:1},1069:{T:-1},1070:{T:1},1071:{T:-1},1072:{T:1},1073:{T:-1},1075:{T:1},1076:{T:-1},1077:{T:1},1078:{T:-1},1079:{T:1},1080:{T:-1},1081:{T:1},1082:{T:-1},1083:{T:1},1084:{T:-1},1085:{},1086:{T:1},1087:{T:-1},1088:{T:1},1089:{T:-1},1090:{T:1},1091:{T:-1},1092:{T:1},1093:{T:-1},1094:{T:1},1095:{T:-1},1096:{},1097:{T:1},1098:{},1099:{T:-1},1100:{T:1},1101:{T:-1},1102:{},1103:{},1104:{},1105:{},1111:{},1112:{},1113:{T:1},1114:{T:-1},1115:{T:1},1116:{T:-1},1117:{},1118:{T:1},1119:{T:-1},1120:{T:1},1121:{T:-1},1122:{T:1},1123:{T:-1},1124:{T:1},1125:{T:-1},1126:{},1128:{T:1},1129:{T:-1},1130:{},1131:{T:1},1132:{T:-1},1133:{T:1},1134:{T:-1},1135:{T:1},1136:{T:-1},1137:{T:1},1138:{T:-1},1139:{T:1},1140:{T:-1},1141:{},1142:{T:1},1143:{T:-1},1144:{T:1},1145:{T:-1},1146:{},1147:{T:1},1148:{T:-1},1149:{T:1},1150:{T:-1},1152:{T:1},1153:{T:-1},1154:{T:-1},1155:{T:-1},1156:{T:-1},1157:{T:1},1158:{T:-1},1159:{T:1},1160:{T:-1},1161:{T:1},1162:{T:-1},1163:{T:1},1164:{T:-1},1165:{T:1},1166:{T:-1},1167:{T:1},1168:{T:-1},1169:{T:1},1170:{T:-1},1171:{},1172:{T:1},1173:{T:-1},1177:{},1178:{T:1},1180:{},1181:{},1182:{},2048:{T:1},2049:{T:-1},2050:{},2051:{T:1},2052:{T:-1},2053:{},2054:{},2055:{T:1},2056:{T:-1},2057:{T:1},2058:{T:-1},2060:{},2067:{},2068:{T:1},2069:{T:-1},2070:{},2071:{},2072:{T:1},2073:{T:-1},2075:{},2076:{},2077:{T:1},2078:{T:-1},2079:{},2080:{T:1},2081:{T:-1},2082:{},2083:{T:1},2084:{T:-1},2085:{T:1},2086:{T:-1},2087:{T:1},2088:{T:-1},2089:{T:1},2090:{T:-1},2091:{},2092:{},2093:{T:1},2094:{T:-1},2095:{},2096:{T:1},2097:{T:-1},2098:{T:1},2099:{T:-1},2100:{T:1},2101:{T:-1},2102:{},2103:{T:1},2104:{T:-1},2105:{},2106:{T:1},2107:{T:-1},2108:{},2109:{T:1},2110:{T:-1},2111:{T:1},2112:{T:-1},2113:{T:1},2114:{T:-1},2115:{},2116:{},2117:{},2118:{T:1},2119:{T:-1},2120:{},2121:{T:1},2122:{T:-1},2123:{T:1},2124:{T:-1},2125:{},2126:{T:1},2127:{T:-1},2128:{},2129:{T:1},2130:{T:-1},2131:{T:1},2132:{T:-1},2133:{T:1},2134:{},2135:{},2136:{},2137:{T:1},2138:{T:-1},2139:{T:1},2140:{T:-1},2141:{},3072:{},3073:{},4096:{T:1},4097:{T:-1},5002:{T:1},5003:{T:-1},5081:{T:1},5082:{T:-1},5083:{},5084:{T:1},5085:{T:-1},5086:{T:1},5087:{T:-1},5088:{},5089:{},5090:{},5092:{T:1},5093:{T:-1},5094:{},5095:{T:1},5096:{T:-1},5097:{},5099:{},65535:{n:""}},Gf={6:{f:If},10:{f:gn},12:{f:hr},13:{f:hr},14:{f:or},15:{f:or},16:{f:Wr},17:{f:or},18:{f:or},19:{f:hr},20:{f:Fw},21:{f:Fw},23:{f:Tw},24:{f:kw},25:{f:or},26:{},27:{},28:{f:function WL(e,t,r){return function zL(e,t,r){if(!(r.biff<8)){var i=e.read_shift(2),s=e.read_shift(2),n=e.read_shift(2),o=e.read_shift(2),a=eo(e,0,r);return r.biff<8&&e.read_shift(1),[{r:i,c:s},a,o,n]}}(e,0,r)}},29:{},34:{f:or},35:{f:Rw},38:{f:Wr},39:{f:Wr},40:{f:Wr},41:{f:Wr},42:{f:or},43:{f:or},47:{f:function tO(e,t,r){var i={Type:r.biff>=8?e.read_shift(2):0};return i.Type?function eO(e,t,r){var i=r||{};return i.Info=e.read_shift(2),e.l-=2,i.Data=1===i.Info?function Y5(e){var t={},r=t.EncryptionVersionInfo=Is(e,4);if(1!=r.Major||1!=r.Minor)throw"unrecognized version code "+r.Major+" : "+r.Minor;return t.Salt=e.read_shift(16),t.EncryptedVerifier=e.read_shift(16),t.EncryptedVerifierHash=e.read_shift(16),t}(e):function X5(e,t){var r={},i=r.EncryptionVersionInfo=Is(e,4);if(t-=4,2!=i.Minor)throw new Error("unrecognized minor version code: "+i.Minor);if(i.Major>4||i.Major<2)throw new Error("unrecognized major version code: "+i.Major);r.Flags=e.read_shift(4),t-=4;var s=e.read_shift(4);return t-=4,r.EncryptionHeader=Ow(e,s),r.EncryptionVerifier=Bw(e,t-=s),r}(e,t),i}(e,t-2,i):function Z5(e,t,r,i){var s={key:hr(e),verificationBytes:hr(e)};r.password&&(s.verifier=function Ff(e){var r,n,t=0,i=Lw(e),s=i.length+1;for((r=an(s))[0]=i.length,n=1;n!=s;++n)r[n]=i[n-1];for(n=s-1;n>=0;--n)t=((16384&t?1:0)|t<<1&32767)^r[n];return 52811^t}(r.password)),i.valid=s.verificationBytes===s.verifier,i.valid&&(i.insitu=function(e){var t=0,r=Nw(e);return function(i){var s=function(e,t,r,i,s){var n,o;for(s||(s=t),i||(i=Nw("")),n=0;n!=t.length;++n)o=t[n],s[n]=o=255&((o^=i[r])>>5|o<<3),++r;return[s,r,i]}(0,i,t,r);return t=s[1],s[0]}}(r.password))}(e,0,r,i),i}},49:{f:function mL(e,t,r){var i={dyHeight:e.read_shift(2),fl:e.read_shift(2)};switch(r&&r.biff||8){case 2:break;case 3:case 4:e.l+=2;break;default:e.l+=10}return i.name=rl(e,0,r),i}},51:{f:hr},60:{},61:{f:function uL(e){return{Pos:[e.read_shift(2),e.read_shift(2)],Dim:[e.read_shift(2),e.read_shift(2)],Flags:e.read_shift(2),CurTab:e.read_shift(2),FirstTab:e.read_shift(2),Selected:e.read_shift(2),TabRatio:e.read_shift(2)}}},64:{f:or},65:{f:function pL(){}},66:{f:hr},77:{},80:{},81:{},82:{},85:{f:hr},89:{},90:{},91:{},92:{f:function eL(e,t,r){if(r.enc)return e.l+=t,"";var i=e.l,s=eo(e,0,r);return e.read_shift(t+i-e.l),s}},93:{f:function jL(e,t,r){if(r&&r.biff<8)return function qL(e,t,r){e.l+=4;var i=e.read_shift(2),s=e.read_shift(2),n=e.read_shift(2);e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=6;var o=[];return o.push((KL[i]||Vr)(e,t-=36,r)),{cmo:[s,i,n],ft:o}}(e,t,r);var i=xw(e),s=function J8(e,t){for(var r=e.l+t,i=[];e.l<r;){var s=e.read_shift(2);e.l-=2;try{i.push(Q8[s](e,r-e.l))}catch{return e.l=r,i}}return e.l!=r&&(e.l=r),i}(e,t-22);return{cmo:i,ft:s}}},94:{},95:{f:or},96:{},97:{},99:{f:or},125:{f:Dw},128:{f:function AL(e){e.l+=4;var t=[e.read_shift(2),e.read_shift(2)];if(0!==t[0]&&t[0]--,0!==t[1]&&t[1]--,t[0]>7||t[1]>7)throw new Error("Bad Gutters: "+t.join("|"));return t}},129:{f:function rL(e,t,r){var i=r&&8==r.biff||2==t?e.read_shift(2):(e.l+=t,0);return{fDialog:16&i,fBelow:64&i,fRight:128&i}}},130:{f:hr},131:{f:or},132:{f:or},133:{f:function iL(e,t,r){var i=e.read_shift(4),s=3&e.read_shift(1),n=e.read_shift(1);switch(n){case 0:n="Worksheet";break;case 1:n="Macrosheet";break;case 2:n="Chartsheet";break;case 6:n="VBAModule"}var o=rl(e,0,r);return 0===o.length&&(o="Sheet1"),{pos:i,hs:s,dt:n,name:o}}},134:{},140:{f:function e5(e){var r,t=[0,0];return r=e.read_shift(2),t[0]=UC[r]||r,r=e.read_shift(2),t[1]=UC[r]||r,t}},141:{f:hr},144:{},146:{f:function i5(e){for(var t=e.read_shift(2),r=[];t-- >0;)r.push(mw(e));return r}},151:{},152:{},153:{},154:{},155:{},156:{f:hr},157:{},158:{},160:{f:d5},161:{f:function o5(e,t){var r={};return t<32||(e.l+=16,r.header=Wr(e),r.footer=Wr(e),e.l+=2),r}},174:{},175:{},176:{},177:{},178:{},180:{},181:{},182:{},184:{},185:{},189:{f:function kL(e,t){for(var r=e.l+t-2,i=e.read_shift(2),s=e.read_shift(2),n=[];e.l<r;)n.push(vw(e));if(e.l!==r)throw new Error("MulRK read error");var o=e.read_shift(2);if(n.length!=o-s+1)throw new Error("MulRK length mismatch");return{r:i,c:s,C:o,rkrec:n}}},190:{f:function TL(e,t){for(var r=e.l+t-2,i=e.read_shift(2),s=e.read_shift(2),n=[];e.l<r;)n.push(e.read_shift(2));if(e.l!==r)throw new Error("MulBlank read error");var o=e.read_shift(2);if(n.length!=o-s+1)throw new Error("MulBlank length mismatch");return{r:i,c:s,C:o,ixfe:n}}},193:{f:gn},197:{},198:{},199:{},200:{},201:{},202:{f:or},203:{},204:{},205:{},206:{},207:{},208:{},209:{},210:{},211:{},213:{},215:{},216:{},217:{},218:{f:hr},220:{},221:{f:or},222:{},224:{f:function DL(e,t,r){var i={};return i.ifnt=e.read_shift(2),i.numFmtId=e.read_shift(2),i.flags=e.read_shift(2),i.fStyle=i.flags>>2&1,i.data=function PL(e,t,r,i){var s={},n=e.read_shift(4),o=e.read_shift(4),a=e.read_shift(4),l=e.read_shift(2);return s.patternType=l8[a>>26],i.cellStyles&&(s.alc=7&n,s.fWrap=n>>3&1,s.alcV=n>>4&7,s.fJustLast=n>>7&1,s.trot=n>>8&255,s.cIndent=n>>16&15,s.fShrinkToFit=n>>20&1,s.iReadOrder=n>>22&2,s.fAtrNum=n>>26&1,s.fAtrFnt=n>>27&1,s.fAtrAlc=n>>28&1,s.fAtrBdr=n>>29&1,s.fAtrPat=n>>30&1,s.fAtrProt=n>>31&1,s.dgLeft=15&o,s.dgRight=o>>4&15,s.dgTop=o>>8&15,s.dgBottom=o>>12&15,s.icvLeft=o>>16&127,s.icvRight=o>>23&127,s.grbitDiag=o>>30&3,s.icvTop=127&a,s.icvBottom=a>>7&127,s.icvDiag=a>>14&127,s.dgDiag=a>>21&15,s.icvFore=127&l,s.icvBack=l>>7&127,s.fsxButton=l>>14&1),s}(e,0,0,r),i}},225:{f:function Z8(e,t){return 0===t||e.read_shift(2),1200}},226:{f:gn},227:{},229:{f:function UL(e,t){for(var r=[],i=e.read_shift(2);i--;)r.push(Jc(e));return r}},233:{},235:{},236:{},237:{},239:{},240:{},241:{},242:{},244:{},245:{},246:{},247:{},248:{},249:{},251:{},252:{f:function nL(e,t){for(var r=e.l+t,i=e.read_shift(4),s=e.read_shift(4),n=[],o=0;o!=s&&e.l<r;++o)n.push(O8(e));return n.Count=i,n.Unique=s,n}},253:{f:function CL(e){var t=fs(e);return t.isst=e.read_shift(4),t}},255:{f:function aL(e,t){var r={};return r.dsst=e.read_shift(2),e.l+=t-2,r}},256:{},259:{},290:{},311:{},312:{},315:{},317:{f:uw},318:{},319:{},320:{},330:{},331:{},333:{},334:{},335:{},336:{},337:{},338:{},339:{},340:{},351:{},352:{f:or},353:{f:gn},401:{},402:{},403:{},404:{},405:{},406:{},407:{},408:{},425:{},426:{},427:{},428:{},429:{},430:{f:function OL(e,t,r){var i=e.l+t,s=e.read_shift(2),n=e.read_shift(2);if(r.sbcch=n,1025==n||14849==n)return[n,s];if(n<1||n>255)throw new Error("Unexpected SupBook type: "+n);for(var o=Zn(e,n),a=[];i>e.l;)a.push(il(e));return[n,s,o,a]}},431:{f:or},432:{},433:{},434:{},437:{},438:{f:function XL(e,t,r){var i=e.l,s="";try{e.l+=4,-1==[0,5,7,11,12,14].indexOf((r.lastobj||{cmo:[0,0]}).cmo[1])?e.l+=6:function N8(e){var t=e.read_shift(1);e.l++;var r=e.read_shift(2);e.l+=2}(e);var a=e.read_shift(2);e.read_shift(2),hr(e);var l=e.read_shift(2);e.l+=l;for(var c=1;c<e.lens.length-1;++c){if(e.l-i!=e.lens[c])throw new Error("TxO: bad continue record");var d=e[e.l];if((s+=Zn(e,e.lens[c+1]-e.lens[c]-1)).length>=(d?a:2*a))break}if(s.length!==a&&s.length!==2*a)throw new Error("cchText: "+a+" != "+s.length);return e.l=i+t,{t:s}}catch{return e.l=i+t,{t:s}}}},439:{f:or},440:{f:function YL(e,t){var r=Jc(e);e.l+=16;var i=function z8(e,t){var r=e.l+t,i=e.read_shift(4);if(2!==i)throw new Error("Unrecognized streamVersion: "+i);var s=e.read_shift(2);e.l+=2;var n,o,a,l,d,u,c="";16&s&&(n=Qc(e)),128&s&&(o=Qc(e)),!(257&~s)&&(a=Qc(e)),1==(257&s)&&(l=function V8(e,t){var r=e.read_shift(16);switch(r){case"e0c9ea79f9bace118c8200aa004ba90b":return function H8(e){var t=e.read_shift(4),r=e.l,i=!1;t>24&&(e.l+=t-24,"795881f43b1d7f48af2c825dc4852763"===e.read_shift(16)&&(i=!0),e.l=r);var s=e.read_shift((i?t-24:t)>>1,"utf16le").replace(Hr,"");return i&&(e.l+=24),s}(e);case"0303000000000000c000000000000046":return function G8(e){for(var t=e.read_shift(2),r="";t-- >0;)r+="../";var i=e.read_shift(0,"lpstr-ansi");if(e.l+=2,57005!=e.read_shift(2))throw new Error("Bad FileMoniker");if(0===e.read_shift(4))return r+i.replace(/\\/g,"/");var n=e.read_shift(4);if(3!=e.read_shift(2))throw new Error("Bad FileMoniker");return r+e.read_shift(n>>1,"utf16le").replace(Hr,"")}(e);default:throw new Error("Unsupported Moniker "+r)}}(e)),8&s&&(c=Qc(e)),32&s&&(d=e.read_shift(16)),64&s&&(u=xf(e)),e.l=r;var h=o||a||l||"";h&&c&&(h+="#"+c),h||(h="#"+c),2&s&&"/"==h.charAt(0)&&"/"!=h.charAt(1)&&(h="file://"+h);var f={Target:h};return d&&(f.guid=d),u&&(f.time=u),n&&(f.Tooltip=n),f}(e,t-24);return[r,i]}},441:{},442:{f:il},443:{},444:{f:hr},445:{},446:{},448:{f:gn},449:{f:function dL(e){return e.read_shift(2),e.read_shift(4)},r:2},450:{f:gn},512:{f:bw},513:{f:c5},515:{f:function _L(e,t,r){r.biffguess&&2==r.biff&&(r.biff=5);var i=fs(e),s=Wr(e);return i.val=s,i}},516:{f:function xL(e,t,r){r.biffguess&&2==r.biff&&(r.biff=5);var s=fs(e);2==r.biff&&e.l++;var n=il(e,0,r);return s.val=n,s}},517:{f:Ew},519:{f:u5},520:{f:function lL(e){var t={};t.r=e.read_shift(2),t.c=e.read_shift(2),t.cnt=e.read_shift(2)-t.c;var r=e.read_shift(2);e.l+=4;var i=e.read_shift(1);return e.l+=3,7&i&&(t.level=7&i),32&i&&(t.hidden=!0),64&i&&(t.hpt=r/20),t}},523:{},545:{f:Pw},549:{f:Sw},566:{},574:{f:function fL(e,t,r){return r&&r.biff>=2&&r.biff<5?{}:{RTL:64&e.read_shift(2)}}},638:{f:function RL(e){var t=e.read_shift(2),r=e.read_shift(2),i=vw(e);return{r:t,c:r,ixfe:i[0],rknum:i[1]}}},659:{},1048:{},1054:{f:function bL(e,t,r){return[e.read_shift(2),eo(e,0,r)]}},1084:{},1212:{f:function GL(e,t,r){var i=ww(e);e.l++;var s=e.read_shift(1);return[ZB(e,t-=8,r),s,i]}},2048:{f:function JL(e,t){e.read_shift(2);var r=Jc(e),i=e.read_shift((t-10)/2,"dbcs-cont");return[r,i=i.replace(Hr,"")]}},2049:{},2050:{},2051:{},2052:{},2053:{},2054:{},2055:{},2056:{},2057:{f:Zc},2058:{},2059:{},2060:{},2061:{},2062:{},2063:{},2064:{},2066:{},2067:{},2128:{},2129:{},2130:{},2131:{},2132:{},2133:{},2134:{},2135:{},2136:{},2137:{},2138:{},2146:{},2147:{r:12},2148:{},2149:{},2150:{},2151:{f:gn},2152:{},2154:{},2155:{},2156:{},2161:{},2162:{},2164:{},2165:{},2166:{},2167:{},2168:{},2169:{},2170:{},2171:{},2172:{f:function s5(e){e.l+=2;var t={cxfs:0,crc:0};return t.cxfs=e.read_shift(2),t.crc=e.read_shift(4),t},r:12},2173:{f:function e7(e,t){e.l+=2;var i=e.read_shift(2);e.l+=2;for(var s=e.read_shift(2),n=[];s-- >0;)n.push(ZO(e));return{ixfe:i,ext:n}},r:12},2174:{},2175:{},2180:{},2181:{},2182:{},2183:{},2184:{},2185:{},2186:{},2187:{},2188:{f:or,r:12},2189:{},2190:{r:12},2191:{},2192:{},2194:{},2195:{},2196:{f:function HL(e,t,r){if(!(r.biff<8)){var i=e.read_shift(2),s=e.read_shift(2);return[Zn(e,i,r),Zn(e,s,r)]}e.l+=t},r:12},2197:{},2198:{f:function qO(e,t,r){var i=e.l+t;if(124226!==e.read_shift(4)){if(!r.cellStyles)return void(e.l=i);var o,n=e.slice(e.l);e.l=i;try{o=cC(n,{type:"array"})}catch{return}var a=Si(o,"theme/theme/theme1.xml",!0);if(a)return $w(a,r)}},r:12},2199:{},2200:{},2201:{},2202:{f:function VL(e){return[0!==e.read_shift(4),0!==e.read_shift(4),e.read_shift(4)]},r:12},2203:{f:gn},2204:{},2205:{},2206:{},2207:{},2211:{f:function cL(e){var t=function U8(e){var t=e.read_shift(2),r=e.read_shift(2);return e.l+=8,{type:t,flags:r}}(e);if(2211!=t.type)throw new Error("Invalid Future Record "+t.type);return 0!==e.read_shift(4)}},2212:{},2213:{},2214:{},2215:{},4097:{},4098:{},4099:{},4102:{},4103:{},4105:{},4106:{},4107:{},4108:{},4109:{},4116:{},4117:{},4118:{},4119:{},4120:{},4121:{},4122:{},4123:{},4124:{},4125:{},4126:{},4127:{},4128:{},4129:{},4130:{},4132:{},4133:{},4134:{f:hr},4135:{},4146:{},4147:{},4148:{},4149:{},4154:{},4156:{},4157:{},4158:{},4159:{},4160:{},4161:{},4163:{},4164:{f:function a5(e,t,r){var i={area:!1};if(5!=r.biff)return e.l+=t,i;var s=e.read_shift(1);return e.l+=3,16&s&&(i.area=!0),i}},4165:{},4166:{},4168:{},4170:{},4171:{},4174:{},4175:{},4176:{},4177:{},4187:{},4188:{f:function r5(e){for(var t=e.read_shift(2),r=[];t-- >0;)r.push(mw(e));return r}},4189:{},4191:{},4192:{},4193:{},4194:{},4195:{},4196:{},4197:{},4198:{},4199:{},4200:{},0:{f:bw},1:{},2:{f:function m5(e){var t=fs(e);++e.l;var r=e.read_shift(2);return t.t="n",t.val=r,t}},3:{f:function g5(e){var t=fs(e);++e.l;var r=Wr(e);return t.t="n",t.val=r,t}},4:{f:function f5(e,t,r){r.biffguess&&5==r.biff&&(r.biff=2);var i=fs(e);++e.l;var s=eo(e,0,r);return i.t="str",i.val=s,i}},5:{f:Ew},7:{f:function C5(e){var t=e.read_shift(1);return 0===t?(e.l++,""):e.read_shift(t,"sbcs-cont")}},8:{},9:{f:Zc},11:{},22:{f:hr},30:{f:EL},31:{},32:{},33:{f:Pw},36:{},37:{f:Sw},50:{f:function w5(e,t){e.l+=6,e.l+=2,e.l+=1,e.l+=3,e.l+=1,e.l+=t-13}},62:{},52:{},67:{},68:{f:hr},69:{},86:{},126:{},127:{f:function h5(e){var t=e.read_shift(2),r=e.read_shift(2),i=e.read_shift(4),s={fmt:t,env:r,len:i,data:e.slice(e.l,e.l+i)};return e.l+=i,s}},135:{},136:{},137:{},145:{},148:{},149:{},150:{},169:{},171:{},188:{},191:{},192:{},194:{},195:{},214:{f:function x5(e,t,r){var i=e.l+t,s=fs(e),n=e.read_shift(2),o=Zn(e,n,r);return e.l=i,s.t="str",s.val=o,s}},223:{},234:{},354:{},421:{},518:{f:If},521:{f:Zc},536:{f:kw},547:{f:Rw},561:{},579:{},1030:{f:If},1033:{f:Zc},1091:{},2157:{},2163:{},2177:{},2240:{},2241:{},2242:{},2243:{},2244:{},2245:{},2246:{},2247:{},2248:{},2249:{},2250:{},2251:{},2262:{r:12},29282:{}};function me(e,t,r,i){var s=t;if(!isNaN(s)){var n=i||(r||[]).length||0,o=e.next(4);o.write_shift(2,s),o.write_shift(2,n),n>0&&tf(r)&&e.push(r)}}function R1(e,t){var r=t||{},i=r.dense?[]:{},s=(e=e.replace(/<!--.*?-->/g,"")).match(/<table/i);if(!s)throw new Error("Invalid HTML: could not find <table>");var n=e.match(/<\/table/i),o=s.index,a=n&&n.index||e.length,l=w_(e.slice(o,a),/(:?<tr[^>]*>)/i,"<tr>"),c=-1,d=0,u=0,h=0,f={s:{r:1e7,c:1e7},e:{r:0,c:0}},p=[];for(o=0;o<l.length;++o){var g=l[o].trim(),m=g.slice(0,3).toLowerCase();if("<tr"!=m){if("<td"==m||"<th"==m){var v=g.split(/<\/t[dh]>/i);for(a=0;a<v.length;++a){var w=v[a].trim();if(w.match(/<t[dh]/i)){for(var C=w,y=0;"<"==C.charAt(0)&&(y=C.indexOf(">"))>-1;)C=C.slice(y+1);for(var k=0;k<p.length;++k){var E=p[k];E.s.c==d&&E.s.r<c&&c<=E.e.r&&(d=E.e.c+1,k=-1)}var S=ze(w.slice(0,w.indexOf(">")));h=S.colspan?+S.colspan:1,((u=+S.rowspan)>1||h>1)&&p.push({s:{r:c,c:d},e:{r:c+(u||1)-1,c:d+h-1}});var _=S.t||S["data-t"]||"";if(!C.length){d+=h;continue}if(C=vC(C),f.s.r>c&&(f.s.r=c),f.e.r<c&&(f.e.r=c),f.s.c>d&&(f.s.c=d),f.e.c<d&&(f.e.c=d),!C.length){d+=h;continue}var M={t:"s",v:C};r.raw||!C.trim().length||"s"==_||("TRUE"===C?M={t:"b",v:!0}:"FALSE"===C?M={t:"b",v:!1}:isNaN(qi(C))?isNaN(Wo(C).getDate())||(M={t:"d",v:Kt(C)},r.cellDates||(M={t:"n",v:wr(M.v)}),M.z=r.dateNF||Be[14]):M={t:"n",v:qi(C)}),r.dense?(i[c]||(i[c]=[]),i[c][d]=M):i[We({r:c,c:d})]=M,d+=h}}}}else{if(++c,r.sheetRows&&r.sheetRows<=c){--c;break}d=0}}return i["!ref"]=Ke(f),p.length&&(i["!merges"]=p),i}function k1(e,t,r,i){for(var s=e["!merges"]||[],n=[],o=t.s.c;o<=t.e.c;++o){for(var a=0,l=0,c=0;c<s.length;++c)if(!(s[c].s.r>r||s[c].s.c>o||s[c].e.r<r||s[c].e.c<o)){if(s[c].s.r<r||s[c].s.c<o){a=-1;break}a=s[c].e.r-s[c].s.r+1,l=s[c].e.c-s[c].s.c+1;break}if(!(a<0)){var d=We({r,c:o}),u=i.dense?(e[r]||[])[o]:e[d],h=u&&null!=u.v&&(u.h||jh(u.w||(hs(u),u.w)||""))||"",f={};a>1&&(f.rowspan=a),l>1&&(f.colspan=l),i.editable?h='<span contenteditable="true">'+h+"</span>":u&&(f["data-t"]=u&&u.t||"z",null!=u.v&&(f["data-v"]=u.v),null!=u.z&&(f["data-z"]=u.z),u.l&&"#"!=(u.l.Target||"#").charAt(0)&&(h='<a href="'+u.l.Target+'">'+h+"</a>")),f.id=(i.id||"sjs")+"-"+d,n.push(pe("td",h,f))}}return"<tr>"+n.join("")+"</tr>"}function M1(e,t,r){var i=r||{},s=0,n=0;if(null!=i.origin)if("number"==typeof i.origin)s=i.origin;else{var o="string"==typeof i.origin?qt(i.origin):i.origin;s=o.r,n=o.c}var a=t.getElementsByTagName("tr"),l=Math.min(i.sheetRows||1e7,a.length),c={s:{r:0,c:0},e:{r:s,c:n}};if(e["!ref"]){var d=yi(e["!ref"]);c.s.r=Math.min(c.s.r,d.s.r),c.s.c=Math.min(c.s.c,d.s.c),c.e.r=Math.max(c.e.r,d.e.r),c.e.c=Math.max(c.e.c,d.e.c),-1==s&&(c.e.r=s=d.e.r+1)}var u=[],h=0,f=e["!rows"]||(e["!rows"]=[]),p=0,g=0,m=0,v=0,w=0,C=0;for(e["!cols"]||(e["!cols"]=[]);p<a.length&&g<l;++p){var y=a[p];if(_1(y)){if(i.display)continue;f[g]={hidden:!0}}var k=y.children;for(m=v=0;m<k.length;++m){var E=k[m];if(!i.display||!_1(E)){var S=E.hasAttribute("data-v")?E.getAttribute("data-v"):E.hasAttribute("v")?E.getAttribute("v"):vC(E.innerHTML),_=E.getAttribute("data-z")||E.getAttribute("z");for(h=0;h<u.length;++h){var M=u[h];M.s.c==v+n&&M.s.r<g+s&&g+s<=M.e.r&&(v=M.e.c+1-n,h=-1)}C=+E.getAttribute("colspan")||1,((w=+E.getAttribute("rowspan")||1)>1||C>1)&&u.push({s:{r:g+s,c:v+n},e:{r:g+s+(w||1)-1,c:v+n+(C||1)-1}});var H={t:"s",v:S},V=E.getAttribute("data-t")||E.getAttribute("t")||"";null!=S&&(0==S.length?H.t=V||"z":i.raw||0==S.trim().length||"s"==V||("TRUE"===S?H={t:"b",v:!0}:"FALSE"===S?H={t:"b",v:!1}:isNaN(qi(S))?isNaN(Wo(S).getDate())||(H={t:"d",v:Kt(S)},i.cellDates||(H={t:"n",v:wr(H.v)}),H.z=i.dateNF||Be[14]):H={t:"n",v:qi(S)})),void 0===H.z&&null!=_&&(H.z=_);var B="",re=E.getElementsByTagName("A");if(re&&re.length)for(var ue=0;ue<re.length&&(!re[ue].hasAttribute("href")||"#"==(B=re[ue].getAttribute("href")).charAt(0));++ue);B&&"#"!=B.charAt(0)&&(H.l={Target:B}),i.dense?(e[g+s]||(e[g+s]=[]),e[g+s][v+n]=H):e[We({c:v+n,r:g+s})]=H,c.e.c<v+n&&(c.e.c=v+n),v+=C}}++g}return u.length&&(e["!merges"]=(e["!merges"]||[]).concat(u)),c.e.r=Math.max(c.e.r,g-1+s),e["!ref"]=Ke(c),g>=l&&(e["!fullref"]=Ke((c.e.r=a.length-p+g-1+s,c))),e}function I1(e,t){return M1((t||{}).dense?[]:{},e,t)}function _1(e){var t="",r=function L9(e){return e.ownerDocument.defaultView&&"function"==typeof e.ownerDocument.defaultView.getComputedStyle?e.ownerDocument.defaultView.getComputedStyle:"function"==typeof getComputedStyle?getComputedStyle:null}(e);return r&&(t=r(e).getPropertyValue("display")),t||(t=e.style&&e.style.display),"none"===t}function O9(e){var t=e.replace(/[\t\r\n]/g," ").trim().replace(/ +/g," ").replace(/<text:s\/>/g," ").replace(/<text:s text:c="(\d+)"\/>/g,function(i,s){return Array(parseInt(s,10)+1).join(" ")}).replace(/<text:tab[^>]*\/>/g,"\t").replace(/<text:line-break\/>/g,"\n");return[ut(t.replace(/<[^>]*>/g,""))]}var L1={day:["d","dd"],month:["m","mm"],year:["y","yy"],hours:["h","hh"],minutes:["m","mm"],seconds:["s","ss"],"am-pm":["A/P","AM/PM"],"day-of-week":["ddd","dddd"],era:["e","ee"],quarter:["\\Qm",'m\\"th quarter"']};function O1(e,t){var n,o,d,u,g,m,r=t||{},i=Xh(e),s=[],a={name:""},l="",c=0,h={},f=[],p=r.dense?[]:{},v={value:""},w="",C=0,k=[],E=-1,S=-1,_={s:{r:1e6,c:1e7},e:{r:0,c:0}},M=0,H={},V=[],B={},re=0,ue=0,oe=[],Ae=1,ke=1,Ze=[],we={Names:[]},be={},te=["",""],A=[],j={},L="",O=0,ee=!1,xe=!1,ce=0;for(Ya.lastIndex=0,i=i.replace(/<!--([\s\S]*?)-->/gm,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");g=Ya.exec(i);)switch(g[3]=g[3].replace(/_.*$/,"")){case"table":case"\u5de5\u4f5c\u8868":"/"===g[1]?(p["!ref"]=_.e.c>=_.s.c&&_.e.r>=_.s.r?Ke(_):"A1:A1",r.sheetRows>0&&r.sheetRows<=_.e.r&&(p["!fullref"]=p["!ref"],_.e.r=r.sheetRows-1,p["!ref"]=Ke(_)),V.length&&(p["!merges"]=V),oe.length&&(p["!rows"]=oe),d.name=d.\u540d\u79f0||d.name,typeof JSON<"u"&&JSON.stringify(d),f.push(d.name),h[d.name]=p,xe=!1):"/"!==g[0].charAt(g[0].length-2)&&(d=ze(g[0],!1),E=S=-1,_.s.r=_.s.c=1e7,_.e.r=_.e.c=0,p=r.dense?[]:{},V=[],oe=[],xe=!0);break;case"table-row-group":"/"===g[1]?--M:++M;break;case"table-row":case"\u884c":if("/"===g[1]){E+=Ae,Ae=1;break}if((u=ze(g[0],!1)).\u884c\u53f7?E=u.\u884c\u53f7-1:-1==E&&(E=0),(Ae=+u["number-rows-repeated"]||1)<10)for(ce=0;ce<Ae;++ce)M>0&&(oe[E+ce]={level:M});S=-1;break;case"covered-table-cell":"/"!==g[1]&&++S,r.sheetStubs&&(r.dense?(p[E]||(p[E]=[]),p[E][S]={t:"z"}):p[We({r:E,c:S})]={t:"z"}),w="",k=[];break;case"table-cell":case"\u6570\u636e":if("/"===g[0].charAt(g[0].length-2))++S,v=ze(g[0],!1),ke=parseInt(v["number-columns-repeated"]||"1",10),m={t:"z",v:null},v.formula&&0!=r.cellFormula&&(m.f=c1(ut(v.formula))),"string"==(v.\u6570\u636e\u7c7b\u578b||v["value-type"])&&(m.t="s",m.v=ut(v["string-value"]||""),r.dense?(p[E]||(p[E]=[]),p[E][S]=m):p[We({r:E,c:S})]=m),S+=ke-1;else if("/"!==g[1]){w="",C=0,k=[],ke=1;var de=Ae?E+Ae-1:E;if(++S>_.e.c&&(_.e.c=S),S<_.s.c&&(_.s.c=S),E<_.s.r&&(_.s.r=E),de>_.e.r&&(_.e.r=de),A=[],j={},m={t:(v=ze(g[0],!1)).\u6570\u636e\u7c7b\u578b||v["value-type"],v:null},r.cellFormula)if(v.formula&&(v.formula=ut(v.formula)),v["number-matrix-columns-spanned"]&&v["number-matrix-rows-spanned"]&&(re=parseInt(v["number-matrix-rows-spanned"],10)||0,ue=parseInt(v["number-matrix-columns-spanned"],10)||0,m.F=Ke(B={s:{r:E,c:S},e:{r:E+re-1,c:S+ue-1}}),Ze.push([B,m.F])),v.formula)m.f=c1(v.formula);else for(ce=0;ce<Ze.length;++ce)E>=Ze[ce][0].s.r&&E<=Ze[ce][0].e.r&&S>=Ze[ce][0].s.c&&S<=Ze[ce][0].e.c&&(m.F=Ze[ce][1]);switch((v["number-columns-spanned"]||v["number-rows-spanned"])&&(re=parseInt(v["number-rows-spanned"],10)||0,ue=parseInt(v["number-columns-spanned"],10)||0,V.push(B={s:{r:E,c:S},e:{r:E+re-1,c:S+ue-1}})),v["number-columns-repeated"]&&(ke=parseInt(v["number-columns-repeated"],10)),m.t){case"boolean":m.t="b",m.v=_t(v["boolean-value"]);break;case"float":case"percentage":case"currency":m.t="n",m.v=parseFloat(v.value);break;case"date":m.t="d",m.v=Kt(v["date-value"]),r.cellDates||(m.t="n",m.v=wr(m.v)),m.z="m/d/yy";break;case"time":m.t="n",m.v=m_(v["time-value"])/86400,r.cellDates&&(m.t="d",m.v=Gc(m.v)),m.z="HH:MM:SS";break;case"number":m.t="n",m.v=parseFloat(v.\u6570\u636e\u6570\u503c);break;default:if("string"!==m.t&&"text"!==m.t&&m.t)throw new Error("Unsupported value type "+m.t);m.t="s",null!=v["string-value"]&&(w=ut(v["string-value"]),k=[])}}else{if(ee=!1,"s"===m.t&&(m.v=w||"",k.length&&(m.R=k),ee=0==C),be.Target&&(m.l=be),A.length>0&&(m.c=A,A=[]),w&&!1!==r.cellText&&(m.w=w),ee&&(m.t="z",delete m.v),(!ee||r.sheetStubs)&&!(r.sheetRows&&r.sheetRows<=E))for(var ie=0;ie<Ae;++ie){if(ke=parseInt(v["number-columns-repeated"]||"1",10),r.dense)for(p[E+ie]||(p[E+ie]=[]),p[E+ie][S]=0==ie?m:Pt(m);--ke>0;)p[E+ie][S+ke]=Pt(m);else for(p[We({r:E+ie,c:S})]=m;--ke>0;)p[We({r:E+ie,c:S+ke})]=Pt(m);_.e.c<=S&&(_.e.c=S)}S+=(ke=parseInt(v["number-columns-repeated"]||"1",10))-1,ke=0,m={},w="",k=[]}be={};break;case"document":case"document-content":case"\u7535\u5b50\u8868\u683c\u6587\u6863":case"spreadsheet":case"\u4e3b\u4f53":case"scripts":case"styles":case"font-face-decls":case"master-styles":if("/"===g[1]){if((n=s.pop())[0]!==g[3])throw"Bad state: "+n}else"/"!==g[0].charAt(g[0].length-2)&&s.push([g[3],!0]);break;case"annotation":if("/"===g[1]){if((n=s.pop())[0]!==g[3])throw"Bad state: "+n;j.t=w,k.length&&(j.R=k),j.a=L,A.push(j)}else"/"!==g[0].charAt(g[0].length-2)&&s.push([g[3],!1]);L="",O=0,w="",C=0,k=[];break;case"creator":"/"===g[1]?L=i.slice(O,g.index):O=g.index+g[0].length;break;case"meta":case"\u5143\u6570\u636e":case"settings":case"config-item-set":case"config-item-map-indexed":case"config-item-map-entry":case"config-item-map-named":case"shapes":case"frame":case"text-box":case"image":case"data-pilot-tables":case"list-style":case"form":case"dde-links":case"event-listeners":case"chart":if("/"===g[1]){if((n=s.pop())[0]!==g[3])throw"Bad state: "+n}else"/"!==g[0].charAt(g[0].length-2)&&s.push([g[3],!1]);w="",C=0,k=[];break;case"scientific-number":case"currency-symbol":case"currency-style":case"script":case"libraries":case"automatic-styles":case"default-style":case"page-layout":case"style":case"map":case"font-face":case"paragraph-properties":case"table-properties":case"table-column-properties":case"table-row-properties":case"table-cell-properties":case"fraction":case"boolean-style":case"boolean":case"text-style":case"text-content":case"text-properties":case"embedded-text":case"body":case"\u7535\u5b50\u8868\u683c":case"forms":case"table-column":case"table-header-rows":case"table-rows":case"table-column-group":case"table-header-columns":case"table-columns":case"null-date":case"graphic-properties":case"calculation-settings":case"named-expressions":case"label-range":case"label-ranges":case"named-expression":case"sort":case"sort-by":case"sort-groups":case"tab":case"line-break":case"span":case"s":case"date":case"object":case"title":case"\u6807\u9898":case"desc":case"binary-data":case"table-source":case"scenario":case"iteration":case"content-validations":case"content-validation":case"help-message":case"error-message":case"database-ranges":case"filter":case"filter-and":case"filter-or":case"filter-condition":case"list-level-style-bullet":case"list-level-style-number":case"list-level-properties":case"sender-firstname":case"sender-lastname":case"sender-initials":case"sender-title":case"sender-position":case"sender-email":case"sender-phone-private":case"sender-fax":case"sender-company":case"sender-phone-work":case"sender-street":case"sender-city":case"sender-postal-code":case"sender-country":case"sender-state-or-province":case"author-name":case"author-initials":case"chapter":case"file-name":case"template-name":case"sheet-name":case"event-listener":case"initial-creator":case"creation-date":case"print-date":case"generator":case"document-statistic":case"user-defined":case"editing-duration":case"editing-cycles":case"config-item":case"page-number":case"page-count":case"time":case"cell-range-source":case"detective":case"operation":case"highlighted-range":case"data-pilot-table":case"source-cell-range":case"source-service":case"data-pilot-field":case"data-pilot-level":case"data-pilot-subtotals":case"data-pilot-subtotal":case"data-pilot-members":case"data-pilot-member":case"data-pilot-display-info":case"data-pilot-sort-info":case"data-pilot-layout-info":case"data-pilot-field-reference":case"data-pilot-groups":case"data-pilot-group":case"data-pilot-group-member":case"rect":case"dde-connection-decls":case"dde-connection-decl":case"dde-link":case"dde-source":case"properties":case"property":case"table-protection":case"data-pilot-grand-total":case"office-document-common-attrs":break;case"number-style":case"percentage-style":case"date-style":case"time-style":if("/"===g[1]){if(H[a.name]=l,(n=s.pop())[0]!==g[3])throw"Bad state: "+n}else"/"!==g[0].charAt(g[0].length-2)&&(l="",a=ze(g[0],!1),s.push([g[3],!0]));break;case"number":case"day":case"month":case"year":case"era":case"day-of-week":case"week-of-year":case"quarter":case"hours":case"minutes":case"seconds":case"am-pm":switch(s[s.length-1][0]){case"time-style":case"date-style":o=ze(g[0],!1),l+=L1[g[3]]["long"===o.style?1:0]}break;case"text":if("/>"===g[0].slice(-2))break;if("/"===g[1])switch(s[s.length-1][0]){case"number-style":case"date-style":case"time-style":l+=i.slice(c,g.index)}else c=g.index+g[0].length;break;case"named-range":te=_f((o=ze(g[0],!1))["cell-range-address"]);var Xe={Name:o.name,Ref:te[0]+"!"+te[1]};xe&&(Xe.Sheet=f.length),we.Names.push(Xe);break;case"p":case"\u6587\u672c\u4e32":if(["master-styles"].indexOf(s[s.length-1][0])>-1)break;if("/"!==g[1]||v&&v["string-value"])ze(g[0],!1),C=g.index+g[0].length;else{var D=O9(i.slice(C,g.index));w=(w.length>0?w+"\n":"")+D[0]}break;case"database-range":if("/"===g[1])break;try{h[(te=_f(ze(g[0])["target-range-address"]))[0]]["!autofilter"]={ref:te[1]}}catch{}break;case"a":if("/"!==g[1]){if(!(be=ze(g[0],!1)).href)break;be.Target=ut(be.href),delete be.href,"#"==be.Target.charAt(0)&&be.Target.indexOf(".")>-1?(te=_f(be.Target.slice(1)),be.Target="#"+te[0]+"!"+te[1]):be.Target.match(/^\.\.[\\\/]/)&&(be.Target=be.Target.slice(3))}break;default:switch(g[2]){case"dc:":case"calcext:":case"loext:":case"ooo:":case"chartooo:":case"draw:":case"style:":case"chart:":case"form:":case"uof:":case"\u8868:":case"\u5b57:":break;default:if(r.WTF)throw new Error(g)}}var yt={Sheets:h,SheetNames:f,Workbook:we};return r.bookSheets&&delete yt.Sheets,yt}function N1(e,t){return O1(e,t)}function no(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Vf(e){return typeof TextDecoder<"u"?(new TextDecoder).decode(e):Tt(ln(e))}function vn(e){var t=e.reduce(function(s,n){return s+n.length},0),r=new Uint8Array(t),i=0;return e.forEach(function(s){r.set(s,i),i+=s.length}),r}function V1(e){return 16843009*((e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135)>>>24}function Cl(e,t){var r=t?t[0]:0,i=127&e[r];e:if(e[r++]>=128&&(i|=(127&e[r])<<7,e[r++]<128||(i|=(127&e[r])<<14,e[r++]<128)||(i|=(127&e[r])<<21,e[r++]<128)||(i+=(127&e[r])*Math.pow(2,28),++r,e[r++]<128)||(i+=(127&e[r])*Math.pow(2,35),++r,e[r++]<128)||(i+=(127&e[r])*Math.pow(2,42),++r,e[r++]<128)))break e;return t&&(t[0]=r),i}function tr(e){var t=0,r=127&e[t];e:if(e[t++]>=128){if(r|=(127&e[t])<<7,e[t++]<128||(r|=(127&e[t])<<14,e[t++]<128)||(r|=(127&e[t])<<21,e[t++]<128))break e;r|=(127&e[t])<<28}return r}function ht(e){for(var t=[],r=[0];r[0]<e.length;){var a,i=r[0],s=Cl(e,r),n=7&s,o=0;if(0==(s=Math.floor(s/8)))break;switch(n){case 0:for(var l=r[0];e[r[0]++]>=128;);a=e.slice(l,r[0]);break;case 5:a=e.slice(r[0],r[0]+(o=4)),r[0]+=o;break;case 1:a=e.slice(r[0],r[0]+(o=8)),r[0]+=o;break;case 2:o=Cl(e,r),a=e.slice(r[0],r[0]+o),r[0]+=o;break;default:throw new Error("PB Type ".concat(n," for Field ").concat(s," at offset ").concat(i))}var c={data:a,type:n};null==t[s]?t[s]=[c]:t[s].push(c)}return t}function zf(e,t){return e?.map(function(r){return t(r.data)})||[]}function z9(e,t){if(0!=e)throw new Error("Unexpected Snappy chunk type ".concat(e));for(var r=[0],i=Cl(t,r),s=[];r[0]<t.length;){var n=3&t[r[0]];if(0!=n){var l=0,c=0;if(1==n?(c=4+(t[r[0]]>>2&7),l=(224&t[r[0]++])<<3,l|=t[r[0]++]):(c=1+(t[r[0]++]>>2),2==n?(l=t[r[0]]|t[r[0]+1]<<8,r[0]+=2):(l=(t[r[0]]|t[r[0]+1]<<8|t[r[0]+2]<<16|t[r[0]+3]<<24)>>>0,r[0]+=4)),s=[vn(s)],0==l)throw new Error("Invalid offset 0");if(l>s[0].length)throw new Error("Invalid offset beyond length");if(c>=l)for(s.push(s[0].slice(-l)),c-=l;c>=s[s.length-1].length;)s.push(s[s.length-1]),c-=s[s.length-1].length;s.push(s[0].slice(-l,-l+c))}else{var o=t[r[0]++]>>2;if(o<60)++o;else{var a=o-59;o=t[r[0]],a>1&&(o|=t[r[0]+1]<<8),a>2&&(o|=t[r[0]+2]<<16),a>3&&(o|=t[r[0]+3]<<24),o>>>=0,o++,r[0]+=a}s.push(t.slice(r[0],r[0]+o)),r[0]+=o}}var d=vn(s);if(d.length!=i)throw new Error("Unexpected length: ".concat(d.length," != ").concat(i));return d}function $9(e,t,r){switch(e[0]){case 0:case 1:case 2:case 3:return function W9(e,t,r,i){var u,s=no(e),n=s.getUint32(4,!0),o=(i>1?12:8)+4*V1(n&(i>1?3470:398)),a=-1,l=-1,c=NaN,d=new Date(2001,0,1);switch(512&n&&(a=s.getUint32(o,!0),o+=4),o+=4*V1(n&(i>1?12288:4096)),16&n&&(l=s.getUint32(o,!0),o+=4),32&n&&(c=s.getFloat64(o,!0),o+=8),64&n&&(d.setTime(d.getTime()+1e3*s.getFloat64(o,!0)),o+=8),e[2]){case 0:break;case 2:u={t:"n",v:c};break;case 3:u={t:"s",v:t[l]};break;case 5:u={t:"d",v:d};break;case 6:u={t:"b",v:c>0};break;case 7:u={t:"n",v:c/86400};break;case 8:u={t:"e",v:0};break;case 9:if(a>-1)u={t:"s",v:r[a]};else if(l>-1)u={t:"s",v:t[l]};else{if(isNaN(c))throw new Error("Unsupported cell type ".concat(e.slice(0,4)));u={t:"n",v:c}}break;default:throw new Error("Unsupported cell type ".concat(e.slice(0,4)))}return u}(e,t,r,e[0]);case 5:return function U9(e,t,r){var u,i=no(e),s=i.getUint32(8,!0),n=12,o=-1,a=-1,l=NaN,c=NaN,d=new Date(2001,0,1);switch(1&s&&(l=function G9(e,t){for(var r=(127&e[t+15])<<7|e[t+14]>>1,i=1&e[t+14],s=t+13;s>=t;--s)i=256*i+e[s];return(128&e[t+15]?-i:i)*Math.pow(10,r-6176)}(e,n),n+=16),2&s&&(c=i.getFloat64(n,!0),n+=8),4&s&&(d.setTime(d.getTime()+1e3*i.getFloat64(n,!0)),n+=8),8&s&&(a=i.getUint32(n,!0),n+=4),16&s&&(o=i.getUint32(n,!0),n+=4),e[1]){case 0:break;case 2:case 10:u={t:"n",v:l};break;case 3:u={t:"s",v:t[a]};break;case 5:u={t:"d",v:d};break;case 6:u={t:"b",v:c>0};break;case 7:u={t:"n",v:c/86400};break;case 8:u={t:"e",v:0};break;case 9:if(!(o>-1))throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(31&s," : ").concat(e.slice(0,4)));u={t:"s",v:r[o]};break;default:throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(31&s," : ").concat(e.slice(0,4)))}return u}(e,t,r);default:throw new Error("Unsupported payload version ".concat(e[0]))}}function Kr(e){return Cl(ht(e)[1][0].data)}function z1(e,t){var r=ht(t.data),i=tr(r[1][0].data),n=[];return(r[3]||[]).forEach(function(o){var a=ht(o.data),l=tr(a[1][0].data)>>>0;switch(i){case 1:n[l]=Vf(a[3][0].data);break;case 8:var d=ht(e[Kr(a[9][0].data)][0].data),u=e[Kr(d[1][0].data)][0],h=tr(u.meta[1][0].data);if(2001!=h)throw new Error("2000 unexpected reference to ".concat(h));var f=ht(u.data);n[l]=f[3].map(function(p){return Vf(p.data)}).join("")}}),n}function X9(e,t){var i={"!ref":"A1"},s=e[Kr(ht(t.data)[2][0].data)],n=tr(s[0].meta[1][0].data);if(6001!=n)throw new Error("6000 unexpected reference to ".concat(n));return function q9(e,t,r){var i,s=ht(t.data),n={s:{r:0,c:0},e:{r:0,c:0}};if(n.e.r=(tr(s[6][0].data)>>>0)-1,n.e.r<0)throw new Error("Invalid row varint ".concat(s[6][0].data));if(n.e.c=(tr(s[7][0].data)>>>0)-1,n.e.c<0)throw new Error("Invalid col varint ".concat(s[7][0].data));r["!ref"]=Ke(n);var o=ht(s[4][0].data),a=z1(e,e[Kr(o[4][0].data)][0]),l=null!=(i=o[17])&&i[0]?z1(e,e[Kr(o[17][0].data)][0]):[],c=ht(o[3][0].data),d=0;c[1].forEach(function(u){var h=ht(u.data),f=e[Kr(h[2][0].data)][0],p=tr(f.meta[1][0].data);if(6002!=p)throw new Error("6001 unexpected reference to ".concat(p));var g=function K9(e,t){var r,i=ht(t.data),s=null!=(r=i?.[7])&&r[0]?tr(i[7][0].data)>>>0>0?1:0:-1,n=zf(i[5],function(o){return function j9(e,t){var r,i,s,n,o,a,l,c,d,u,h,f,p,g,y,k,m=ht(e),v=tr(m[1][0].data)>>>0,w=tr(m[2][0].data)>>>0,C=(null==(i=null==(r=m[8])?void 0:r[0])?void 0:i.data)&&tr(m[8][0].data)>0||!1;if(null!=(n=null==(s=m[7])?void 0:s[0])&&n.data&&0!=t)y=null==(a=null==(o=m[7])?void 0:o[0])?void 0:a.data,k=null==(c=null==(l=m[6])?void 0:l[0])?void 0:c.data;else{if(null==(u=null==(d=m[4])?void 0:d[0])||!u.data||1==t)throw"NUMBERS Tile missing ".concat(t," cell storage");y=null==(f=null==(h=m[4])?void 0:h[0])?void 0:f.data,k=null==(g=null==(p=m[3])?void 0:p[0])?void 0:g.data}for(var E=C?4:1,S=no(y),_=[],M=0;M<y.length/2;++M){var H=S.getUint16(2*M,!0);H<65535&&_.push([M,H])}if(_.length!=w)throw"Expected ".concat(w," cells, found ").concat(_.length);var V=[];for(M=0;M<_.length-1;++M)V[_[M][0]]=k.subarray(_[M][1]*E,_[M+1][1]*E);return _.length>=1&&(V[_[_.length-1][0]]=k.subarray(_[_.length-1][1]*E)),{R:v,cells:V}}(o,s)});return{nrows:tr(i[4][0].data)>>>0,data:n.reduce(function(o,a){return o[a.R]||(o[a.R]=[]),a.cells.forEach(function(l,c){if(o[a.R][c])throw new Error("Duplicate cell r=".concat(a.R," c=").concat(c));o[a.R][c]=l}),o},[])}}(0,f);g.data.forEach(function(m,v){m.forEach(function(w,C){var y=We({r:d+v,c:C}),k=$9(w,a,l);k&&(r[y]=k)})}),d+=g.nrows})}(e,s[0],i),i}function $f(e){var t,r,i,s,n={},o=[];if(e.FullPaths.forEach(function(l){if(l.match(/\.iwpv2/))throw new Error("Unsupported password protection")}),e.FileIndex.forEach(function(l){if(l.name.match(/\.iwa$/)){var c,d;try{c=function Ni(e){for(var t=[],r=0;r<e.length;){var i=e[r++],s=e[r]|e[r+1]<<8|e[r+2]<<16;t.push(z9(i,e.slice(r+=3,r+s))),r+=s}if(r!==e.length)throw new Error("data is not a valid framed stream!");return vn(t)}(l.content)}catch(u){return console.log("?? "+l.content.length+" "+(u.message||u))}try{d=function Bi(e){for(var t,r=[],i=[0];i[0]<e.length;){var s=Cl(e,i),n=ht(e.slice(i[0],i[0]+s));i[0]+=s;var o={id:tr(n[1][0].data),messages:[]};n[2].forEach(function(a){var l=ht(a.data),c=tr(l[3][0].data);o.messages.push({meta:l,data:e.slice(i[0],i[0]+c)}),i[0]+=c}),null!=(t=n[3])&&t[0]&&(o.merge=tr(n[3][0].data)>>>0>0),r.push(o)}return r}(c)}catch(u){return console.log("## "+(u.message||u))}d.forEach(function(u){n[u.id]=u.messages,o.push(u.id)})}}),!o.length)throw new Error("File has no messages");var a=(null==(s=null==(i=null==(r=null==(t=n?.[1])?void 0:t[0])?void 0:r.meta)?void 0:i[1])?void 0:s[0].data)&&1==tr(n[1][0].meta[1][0].data)&&n[1][0];if(a||o.forEach(function(l){n[l].forEach(function(c){if(1==tr(c.meta[1][0].data)>>>0){if(a)throw new Error("Document has multiple roots");a=c}})}),!a)throw new Error("Cannot find Document root");return function Q9(e,t){var r={SheetNames:[],Sheets:{}};if(zf(ht(t.data)[1],Kr).forEach(function(n){e[n].forEach(function(o){if(2==tr(o.meta[1][0].data)){var l=function Y9(e,t){var r,i=ht(t.data),s={name:null!=(r=i[1])&&r[0]?Vf(i[1][0].data):"",sheets:[]};return zf(i[2],Kr).forEach(function(o){e[o].forEach(function(a){6e3==tr(a.meta[1][0].data)&&s.sheets.push(X9(e,a))})}),s}(e,o);l.sheets.forEach(function(c,d){eg(r,c,0==d?l.name:l.name+"_"+d,!0)})}})}),0==r.SheetNames.length)throw new Error("Empty NUMBERS file");return r}(n,a)}function jf(e){!function W1(e){return function(r){for(var i=0;i!=e.length;++i){var s=e[i];void 0===r[s[0]]&&(r[s[0]]=s[1]),"n"===s[2]&&(r[s[0]]=Number(r[s[0]]))}}}([["cellNF",!1],["cellHTML",!0],["cellFormula",!0],["cellStyles",!1],["cellText",!0],["cellDates",!1],["sheetStubs",!1],["sheetRows",0,"n"],["bookDeps",!1],["bookSheets",!1],["bookProps",!1],["bookFiles",!1],["bookVBA",!1],["password",""],["WTF",!1]])(e)}function eV(e){return qe.WS.indexOf(e)>-1?"sheet":qe.CS&&e==qe.CS?"chart":qe.DS&&e==qe.DS?"dialog":qe.MS&&e==qe.MS?"macro":e&&e.length?e:"sheet"}function rV(e,t,r,i,s,n,o,a,l,c,d,u){try{n[i]=tl(Si(e,r,!0),t);var f,h=cr(e,t);switch(a){case"sheet":f=TG(h,t,s,l,n[i],c,d,u);break;case"chart":if(!(f=function PG(e,t,r,i,s,n,o,a){return".bin"===t.slice(-4)?function nG(e,t,r,i,s){if(!e)return e;i||(i={"!id":{}});var n={"!type":"chart","!drawel":null,"!rel":""},o=[],a=!1;return As(e,function(c,d,u){switch(u){case 550:n["!rel"]=c;break;case 651:s.Sheets[r]||(s.Sheets[r]={}),c.name&&(s.Sheets[r].CodeName=c.name);break;case 562:case 652:case 669:case 679:case 551:case 552:case 476:case 3072:break;case 35:a=!0;break;case 36:a=!1;break;case 37:o.push(u);break;case 38:o.pop();break;default:if(d.T>0)o.push(u);else if(d.T<0)o.pop();else if(!a||t.WTF)throw new Error("Unexpected record 0x"+u.toString(16))}},t),i["!id"][n["!rel"]]&&(n["!drawel"]=i["!id"][n["!rel"]]),n}(e,i,r,s,n):function rG(e,t,r,i,s){if(!e)return e;i||(i={"!id":{}});var o,n={"!type":"chart","!drawel":null,"!rel":""},a=e.match(u1);return a&&Of(a[0],0,s,r),(o=e.match(/drawing r:id="(.*?)"/))&&(n["!rel"]=o[1]),i["!id"][n["!rel"]]&&(n["!drawel"]=i["!id"][n["!rel"]]),n}(e,0,r,s,n)}(h,t,s,l,n[i],c))||!f["!drawel"])break;var p=qa(f["!drawel"].Target,t),g=el(p),m=function m7(e,t){if(!e)return"??";var r=(e.match(/<c:chart [^>]*r:id="([^"]*)"/)||["",""])[1];return t["!id"][r].Target}(Si(e,p,!0),tl(Si(e,g,!0),p)),v=qa(m,p),w=el(v);f=function tG(e,t,r,i,s,n){var o=n||{"!type":"chart"};if(!e)return n;var a=0,l=0,c="A",d={s:{r:2e6,c:2e6},e:{r:0,c:0}};return(e.match(/<c:numCache>[\s\S]*?<\/c:numCache>/gm)||[]).forEach(function(u){var h=function eG(e){var i,t=[],r=e.match(/^<c:numCache>/);(e.match(/<c:pt idx="(\d*)">(.*?)<\/c:pt>/gm)||[]).forEach(function(n){var o=n.match(/<c:pt idx="(\d*?)"><c:v>(.*)<\/c:v><\/c:pt>/);o&&(t[+o[1]]=r?+o[2]:o[2])});var s=ut((e.match(/<c:formatCode>([\s\S]*?)<\/c:formatCode>/)||["","General"])[1]);return(e.match(/<c:f>(.*?)<\/c:f>/gm)||[]).forEach(function(n){i=n.replace(/<.*?>/g,"")}),[t,s,i]}(u);d.s.r=d.s.c=0,d.e.c=a,c=Lt(a),h[0].forEach(function(f,p){o[c+er(p)]={t:"n",v:f,z:h[1]},l=p}),d.e.r<l&&(d.e.r=l),++a}),a>0&&(o["!ref"]=Ke(d)),o}(Si(e,v,!0),0,0,tl(Si(e,w,!0),v),0,f);break;case"macro":f=function DG(e,t){return t.slice(-4),{"!type":"macro"}}(0,t);break;case"dialog":f=function AG(e,t){return t.slice(-4),{"!type":"dialog"}}(0,t);break;default:throw new Error("Unrecognized sheet type "+a)}o[i]=f;var C=[];n&&n[i]&&Jt(n[i]).forEach(function(y){var k="";if(n[i][y].Type==qe.CMNT){k=qa(n[i][y].Target,t);var E=function LG(e,t,r){return".bin"===t.slice(-4)?function R7(e,t){var r=[],i=[],s={},n=!1;return As(e,function(a,l,c){switch(c){case 632:i.push(a);break;case 635:s=a;break;case 637:s.t=a.t,s.h=a.h,s.r=a.r;break;case 636:if(s.author=i[s.iauthor],delete s.iauthor,t.sheetRows&&s.rfx&&t.sheetRows<=s.rfx.r)break;s.t||(s.t=""),delete s.rfx,r.push(s);break;case 3072:case 37:case 38:break;case 35:n=!0;break;case 36:n=!1;break;default:if(!l.T&&(!n||t.WTF))throw new Error("Unexpected record 0x"+c.toString(16))}}),r}(e,r):function v7(e,t){if(e.match(/<(?:\w+:)?comments *\/>/))return[];var r=[],i=[],s=e.match(/<(?:\w+:)?authors>([\s\S]*)<\/(?:\w+:)?authors>/);s&&s[1]&&s[1].split(/<\/\w*:?author>/).forEach(function(o){if(""!==o&&""!==o.trim()){var a=o.match(/<(?:\w+:)?author[^>]*>(.*)/);a&&r.push(a[1])}});var n=e.match(/<(?:\w+:)?commentList>([\s\S]*)<\/(?:\w+:)?commentList>/);return n&&n[1]&&n[1].split(/<\/\w*:?comment>/).forEach(function(o){if(""!==o&&""!==o.trim()){var a=o.match(/<(?:\w+:)?comment[^>]*>/);if(a){var l=ze(a[0]),c={author:l.authorId&&r[l.authorId]||"sheetjsghost",ref:l.ref,guid:l.guid},d=qt(l.ref);if(!(t.sheetRows&&t.sheetRows<=d.r)){var u=o.match(/<(?:\w+:)?text>([\s\S]*)<\/(?:\w+:)?text>/),h=!!u&&!!u[1]&&Ef(u[1])||{r:"",t:"",h:""};c.r=h.r,"<t></t>"==h.r&&(h.t=h.h=""),c.t=(h.t||"").replace(/\r\n/g,"\n").replace(/\r/g,"\n"),t.cellHTML&&(c.h=h.h),i.push(c)}}}}),i}(e,r)}(cr(e,k,!0),k,l);if(!E||!E.length)return;qw(f,E,!1)}n[i][y].Type==qe.TCMNT&&(k=qa(n[i][y].Target,t),C=C.concat(function C7(e,t){var r=[],i=!1,s={},n=0;return e.replace(Gr,function(a,l){var c=ze(a);switch(ds(c[0])){case"<?xml":case"<ThreadedComments":case"</ThreadedComments>":case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<threadedComment":s={author:c.personId,guid:c.id,ref:c.ref,T:1};break;case"</threadedComment>":null!=s.t&&r.push(s);break;case"<text>":case"<text":n=l+a.length;break;case"</text>":s.t=e.slice(n,l).replace(/\r\n/g,"\n").replace(/\r/g,"\n");break;case"<mentions":case"<mentions>":case"<ext":i=!0;break;case"</mentions>":case"</ext>":i=!1;break;default:if(!i&&t.WTF)throw new Error("unrecognized "+c[0]+" in threaded comments")}return a}),r}(cr(e,k,!0),l)))}),C&&C.length&&qw(f,C,!0,l.people||[])}catch(y){if(l.WTF)throw y}}function Hi(e){return"/"==e.charAt(0)?e.slice(1):e}function iV(e,t){if(zo(),jf(t=t||{}),Ii(e,"META-INF/manifest.xml")||Ii(e,"objectdata.xml"))return function B1(e,t){t=t||{},Ii(e,"META-INF/manifest.xml")&&function f8(e,t){for(var i,s,r=Xh(e);i=Ya.exec(r);)switch(i[3]){case"manifest":break;case"file-entry":if("/"==(s=ze(i[0],!1)).path&&"application/vnd.oasis.opendocument.spreadsheet"!==s.type)throw new Error("This OpenDocument is not a spreadsheet");break;case"encryption-data":case"algorithm":case"start-key-generation":case"key-derivation":throw new Error("Unsupported ODS Encryption");default:if(t&&t.WTF)throw i}}(cr(e,"META-INF/manifest.xml"),t);var r=Si(e,"content.xml");if(!r)throw new Error("Missing content.xml in ODS / UOF file");var i=O1(Tt(r),t);return Ii(e,"meta.xml")&&(i.Props=qC(cr(e,"meta.xml"))),i}(e,t);if(Ii(e,"Index/Document.iwa")){if(typeof Uint8Array>"u")throw new Error("NUMBERS file parsing requires Uint8Array support");if(e.FileIndex)return $f(e);var r=Le.utils.cfb_new();return lC(e).forEach(function(ue){!function Je(e,t,r){if(e.FullPaths){var i;if("string"==typeof r)return i=tt?Ts(r):function NI(e){for(var t=[],r=0,i=e.length+250,s=an(e.length+255),n=0;n<e.length;++n){var o=e.charCodeAt(n);if(o<128)s[r++]=o;else if(o<2048)s[r++]=192|o>>6&31,s[r++]=128|63&o;else if(o>=55296&&o<57344){o=64+(1023&o);var a=1023&e.charCodeAt(++n);s[r++]=240|o>>8&7,s[r++]=128|o>>2&63,s[r++]=128|a>>6&15|(3&o)<<4,s[r++]=128|63&a}else s[r++]=224|o>>12&15,s[r++]=128|o>>6&63,s[r++]=128|63&o;r>i&&(t.push(s.slice(0,r)),r=0,s=an(65535),i=65530)}return t.push(s.slice(0,r)),br(t)}(r),Le.utils.cfb_add(e,t,i);Le.utils.cfb_add(e,t,r)}else e.file(t,r)}(r,ue,aC(e,ue))}),$f(r)}if(!Ii(e,"[Content_Types].xml"))throw Ii(e,"index.xml.gz")?new Error("Unsupported NUMBERS 08 file"):Ii(e,"index.xml")?new Error("Unsupported NUMBERS 09 file"):new Error("Unsupported ZIP file");var o,a,i=lC(e),s=function u8(e){var t={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""};if(!e||!e.match)return t;var r={};if((e.match(Gr)||[]).forEach(function(i){var s=ze(i);switch(s[0].replace(y_,"<")){case"<?xml":break;case"<Types":t.xmlns=s["xmlns"+(s[0].match(/<(\w+):/)||["",""])[1]];break;case"<Default":r[s.Extension]=s.ContentType;break;case"<Override":void 0!==t[pf[s.ContentType]]&&t[pf[s.ContentType]].push(s.PartName)}}),"http://schemas.openxmlformats.org/package/2006/content-types"!==t.xmlns)throw new Error("Unknown Namespace: "+t.xmlns);return t.calcchain=t.calcchains.length>0?t.calcchains[0]:"",t.sst=t.strs.length>0?t.strs[0]:"",t.style=t.styles.length>0?t.styles[0]:"",t.defaults=r,delete t.calcchains,t}(Si(e,"[Content_Types].xml")),n=!1;if(0===s.workbooks.length&&cr(e,a="xl/workbook.xml",!0)&&s.workbooks.push(a),0===s.workbooks.length){if(!cr(e,a="xl/workbook.bin",!0))throw new Error("Could not find workbook");s.workbooks.push(a),n=!0}"bin"==s.workbooks[0].slice(-3)&&(n=!0);var l={},c={};if(!t.bookSheets&&!t.bookProps){if(hl=[],s.sst)try{hl=function _G(e,t,r){return".bin"===t.slice(-4)?function L5(e,t){var r=[],i=!1;return As(e,function(n,o,a){switch(a){case 159:r.Count=n[0],r.Unique=n[1];break;case 19:r.push(n);break;case 160:return!0;case 35:i=!0;break;case 36:i=!1;break;default:if(!i||t.WTF)throw new Error("Unexpected record 0x"+a.toString(16))}}),r}(e,r):function M5(e,t){var r=[],i="";if(!e)return r;var s=e.match(P5);if(s){i=s[2].replace(D5,"").split(A5);for(var n=0;n!=i.length;++n){var o=Ef(i[n].trim(),t);null!=o&&(r[r.length]=o)}s=ze(s[1]),r.Count=s.count,r.Unique=s.uniqueCount}return r}(e,r)}(cr(e,Hi(s.sst)),s.sst,t)}catch(ue){if(t.WTF)throw ue}t.cellStyles&&s.themes.length&&(l=function IG(e,t,r){return $w(e,r)}(Si(e,s.themes[0].replace(/^\//,""),!0)||"",0,t)),s.style&&(c=function MG(e,t,r,i){return".bin"===t.slice(-4)?function TO(e,t,r){var i={NumberFmt:[]};for(var s in Be)i.NumberFmt[s]=Be[s];i.CellXf=[],i.Fonts=[];var n=[],o=!1;return As(e,function(l,c,d){switch(d){case 44:i.NumberFmt[l[0]]=l[1],cs(l[1],l[0]);break;case 43:i.Fonts.push(l),null!=l.color.theme&&t&&t.themeElements&&t.themeElements.clrScheme&&(l.color.rgb=ed(t.themeElements.clrScheme[l.color.theme].rgb,l.color.tint||0));break;case 1025:case 45:case 46:case 48:case 507:case 572:case 475:case 1171:case 2102:case 1130:case 512:case 2095:case 3072:break;case 47:617==n[n.length-1]&&i.CellXf.push(l);break;case 35:o=!0;break;case 36:o=!1;break;case 37:n.push(d),o=!0;break;case 38:n.pop(),o=!1;break;default:if(c.T>0)n.push(d);else if(c.T<0)n.pop();else if(!o||r.WTF&&37!=n[n.length-1])throw new Error("Unexpected record 0x"+d.toString(16))}}),i}(e,r,i):mO(e,r,i)}(cr(e,Hi(s.style)),s.style,l,t))}s.links.map(function(ue){try{return tl(Si(e,el(Hi(ue))),ue),function BG(e,t,r,i){return".bin"===r.slice(-4)?function p7(e,t,r,i){if(!e)return e;var s=i||{},n=!1;As(e,function(l,c,d){switch(d){case 359:case 363:case 364:case 366:case 367:case 368:case 369:case 370:case 371:case 472:case 577:case 578:case 579:case 580:case 581:case 582:case 583:case 584:case 585:case 586:case 587:break;case 35:n=!0;break;case 36:n=!1;break;default:if(!c.T&&(!n||s.WTF))throw new Error("Unexpected record 0x"+d.toString(16))}},s)}(e,0,0,i):void 0}(cr(e,Hi(ue)),0,ue,t)}catch{}});var d=function kG(e,t,r){return".bin"===t.slice(-4)?function SG(e,t){var r={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},xmlns:""},i=[],s=!1;t||(t={}),t.biff=12;var n=[],o=[[]];return o.SheetNames=[],o.XTI=[],ml[16]={n:"BrtFRTArchID$",f:wG},As(e,function(l,c,d){switch(d){case 156:o.SheetNames.push(l.name),r.Sheets.push(l);break;case 153:r.WBProps=l;break;case 39:null!=l.Sheet&&(t.SID=l.Sheet),l.Ref=jr(l.Ptg,0,null,o,t),delete t.SID,delete l.Ptg,n.push(l);break;case 1036:case 361:case 2071:case 158:case 143:case 664:case 353:case 3072:case 3073:case 534:case 677:case 157:case 610:case 2050:case 155:case 548:case 676:case 128:case 665:case 2128:case 2125:case 549:case 2053:case 596:case 2076:case 2075:case 2082:case 397:case 154:case 1117:case 553:case 2091:case 16:break;case 357:case 358:case 355:case 667:o[0].length?o.push([d,l]):o[0]=[d,l],o[o.length-1].XTI=[];break;case 362:0===o.length&&(o[0]=[],o[0].XTI=[]),o[o.length-1].XTI=o[o.length-1].XTI.concat(l),o.XTI=o.XTI.concat(l);break;case 35:case 37:i.push(d),s=!0;break;case 36:case 38:i.pop(),s=!1;break;default:if(!c.T&&(!s||t.WTF&&37!=i[i.length-1]&&35!=i[i.length-1]))throw new Error("Unexpected record 0x"+d.toString(16))}},t),v1(r),r.Names=n,r.supbooks=o,r}(e,r):function gG(e,t){if(!e)throw new Error("Could not find file");var r={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},Names:[],xmlns:""},i=!1,s="xmlns",n={},o=0;if(e.replace(Gr,function(l,c){var d=ze(l);switch(ds(d[0])){case"<?xml":case"</workbook>":case"<fileVersion/>":case"</fileVersion>":case"<fileSharing":case"<fileSharing/>":case"</workbookPr>":case"<workbookProtection":case"<workbookProtection/>":case"<bookViews":case"<bookViews>":case"</bookViews>":case"</workbookView>":case"<sheets":case"<sheets>":case"</sheets>":case"</sheet>":case"<functionGroups":case"<functionGroups/>":case"<functionGroup":case"<externalReferences":case"</externalReferences>":case"<externalReferences>":case"<externalReference":case"<definedNames/>":case"<definedName/>":case"</calcPr>":case"<oleSize":case"<customWorkbookViews>":case"</customWorkbookViews>":case"<customWorkbookViews":case"<customWorkbookView":case"</customWorkbookView>":case"<pivotCaches>":case"</pivotCaches>":case"<pivotCaches":case"<pivotCache":case"<smartTagPr":case"<smartTagPr/>":case"<smartTagTypes":case"<smartTagTypes>":case"</smartTagTypes>":case"<smartTagType":case"<webPublishing":case"<webPublishing/>":case"<fileRecoveryPr":case"<fileRecoveryPr/>":case"<webPublishObjects>":case"<webPublishObjects":case"</webPublishObjects>":case"<webPublishObject":case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":case"<ArchID":case"<revisionPtr":break;case"<workbook":l.match(fG)&&(s="xmlns"+l.match(/<(\w+):/)[1]),r.xmlns=d[s];break;case"<fileVersion":delete d[0],r.AppVersion=d;break;case"<workbookPr":case"<workbookPr/>":Bf.forEach(function(u){if(null!=d[u[0]])switch(u[2]){case"bool":r.WBProps[u[0]]=_t(d[u[0]]);break;case"int":r.WBProps[u[0]]=parseInt(d[u[0]],10);break;default:r.WBProps[u[0]]=d[u[0]]}}),d.codeName&&(r.WBProps.CodeName=Tt(d.codeName));break;case"<workbookView":case"<workbookView/>":delete d[0],r.WBView.push(d);break;case"<sheet":switch(d.state){case"hidden":d.Hidden=1;break;case"veryHidden":d.Hidden=2;break;default:d.Hidden=0}delete d.state,d.name=ut(Tt(d.name)),delete d[0],r.Sheets.push(d);break;case"<definedNames>":case"<definedNames":case"<ext":case"<AlternateContent":case"<AlternateContent>":i=!0;break;case"</definedNames>":case"</ext>":case"</AlternateContent>":i=!1;break;case"<definedName":(n={}).Name=Tt(d.name),d.comment&&(n.Comment=d.comment),d.localSheetId&&(n.Sheet=+d.localSheetId),_t(d.hidden||"0")&&(n.Hidden=!0),o=c+l.length;break;case"</definedName>":n.Ref=ut(Tt(e.slice(o,c))),r.Names.push(n);break;case"<calcPr":case"<calcPr/>":delete d[0],r.CalcPr=d;break;default:if(!i&&t.WTF)throw new Error("unrecognized "+d[0]+" in workbook")}return l}),-1===hn.indexOf(r.xmlns))throw new Error("Unknown Namespace: "+r.xmlns);return v1(r),r}(e,r)}(cr(e,Hi(s.workbooks[0])),s.workbooks[0],t),u={},h="";s.coreprops.length&&((h=cr(e,Hi(s.coreprops[0]),!0))&&(u=qC(h)),0!==s.extprops.length&&(h=cr(e,Hi(s.extprops[0]),!0))&&function w8(e,t,r){var i={};t||(t={}),e=Tt(e),Jn.forEach(function(s){var n=(e.match(Xa(s[0]))||[])[1];switch(s[2]){case"string":n&&(t[s[1]]=ut(n));break;case"bool":t[s[1]]="true"===n;break;case"raw":var o=e.match(new RegExp("<"+s[0]+"[^>]*>([\\s\\S]*?)</"+s[0]+">"));o&&o.length>0&&(i[s[1]]=o[1])}}),i.HeadingPairs&&i.TitlesOfParts&&QC(i.HeadingPairs,i.TitlesOfParts,t,r)}(h,u,t));var f={};(!t.bookSheets||t.bookProps)&&0!==s.custprops.length&&(h=Si(e,Hi(s.custprops[0]),!0))&&(f=function S8(e,t){var r={},i="",s=e.match(x8);if(s)for(var n=0;n!=s.length;++n){var o=s[n],a=ze(o);switch(a[0]){case"<?xml":case"<Properties":break;case"<property":i=ut(a.name);break;case"</property>":i=null;break;default:if(0===o.indexOf("<vt:")){var l=o.split(">"),c=l[0].slice(4),d=l[1];switch(c){case"lpstr":case"bstr":case"lpwstr":case"cy":case"error":r[i]=ut(d);break;case"bool":r[i]=_t(d);break;case"i1":case"i2":case"i4":case"i8":case"int":case"uint":r[i]=parseInt(d,10);break;case"r4":case"r8":case"decimal":r[i]=parseFloat(d);break;case"filetime":case"date":r[i]=Kt(d);break;default:if("/"==c.slice(-1))break;t.WTF&&typeof console<"u"&&console.warn("Unexpected",o,c,l)}}else if("</"!==o.slice(0,2)&&t.WTF)throw new Error(o)}}return r}(h,t));var p={};if((t.bookSheets||t.bookProps)&&(d.Sheets?o=d.Sheets.map(function(oe){return oe.name}):u.Worksheets&&u.SheetNames.length>0&&(o=u.SheetNames),t.bookProps&&(p.Props=u,p.Custprops=f),t.bookSheets&&typeof o<"u"&&(p.SheetNames=o),t.bookSheets?p.SheetNames:t.bookProps))return p;o={};var g={};t.bookDeps&&s.calcchain&&(g=function OG(e,t,r){return".bin"===t.slice(-4)?function g7(e){var i=[];return As(e,function(o,a,l){if(63===l)i.push(o);else if(!a.T)throw new Error("Unexpected record 0x"+l.toString(16))}),i}(e):function h7(e){var t=[];if(!e)return t;var r=1;return(e.match(Gr)||[]).forEach(function(i){var s=ze(i);switch(s[0]){case"<?xml":case"<calcChain":case"<calcChain>":case"</calcChain>":break;case"<c":delete s[0],s.i?r=s.i:s.i=r,t.push(s)}}),t}(e)}(cr(e,Hi(s.calcchain)),s.calcchain));var w,C,m=0,v={},y=d.Sheets;u.Worksheets=y.length,u.SheetNames=[];for(var k=0;k!=y.length;++k)u.SheetNames[k]=y[k].name;var E=n?"bin":"xml",S=s.workbooks[0].lastIndexOf("/"),_=(s.workbooks[0].slice(0,S+1)+"_rels/"+s.workbooks[0].slice(S+1)+".rels").replace(/^\//,"");Ii(e,_)||(_="xl/_rels/workbook."+E+".rels");var M=tl(Si(e,_,!0),_.replace(/_rels.*/,"s5s"));(s.metadata||[]).length>=1&&(t.xlmeta=function NG(e,t,r){return".bin"===t.slice(-4)?function c7(e,t,r){var i={Types:[],Cell:[],Value:[]},s=r||{},n=[],o=!1,a=2;return As(e,function(l,c,d){switch(d){case 335:i.Types.push({name:l.name});break;case 51:l.forEach(function(u){1==a?i.Cell.push({type:i.Types[u[0]-1].name,index:u[1]}):0==a&&i.Value.push({type:i.Types[u[0]-1].name,index:u[1]})});break;case 337:a=l?1:0;break;case 338:a=2;break;case 35:n.push(d),o=!0;break;case 36:n.pop(),o=!1;break;default:if(!c.T&&(!o||s.WTF&&35!=n[n.length-1]))throw new Error("Unexpected record 0x"+d.toString(16))}}),i}(e,0,r):function u7(e,t,r){var i={Types:[],Cell:[],Value:[]};if(!e)return i;var o,s=!1,n=2;return e.replace(Gr,function(a){var l=ze(a);switch(ds(l[0])){case"<?xml":case"<metadata":case"</metadata>":case"<metadataTypes":case"</metadataTypes>":case"</metadataType>":case"</futureMetadata>":case"<bk>":case"</bk>":case"</rc>":case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<metadataType":i.Types.push({name:l.name});break;case"<futureMetadata":for(var c=0;c<i.Types.length;++c)i.Types[c].name==l.name&&(o=i.Types[c]);break;case"<rc":1==n?i.Cell.push({type:i.Types[l.t-1].name,index:+l.v}):0==n&&i.Value.push({type:i.Types[l.t-1].name,index:+l.v});break;case"<cellMetadata":n=1;break;case"</cellMetadata>":case"</valueMetadata>":n=2;break;case"<valueMetadata":n=0;break;case"<ext":s=!0;break;case"</ext>":s=!1;break;case"<rvb":if(!o)break;o.offsets||(o.offsets=[]),o.offsets.push(+l.i);break;default:if(!s&&r.WTF)throw new Error("unrecognized "+l[0]+" in metadata")}return a}),i}(e,0,r)}(cr(e,Hi(s.metadata[0])),s.metadata[0],t)),(s.people||[]).length>=1&&(t.people=function x7(e,t){var r=[],i=!1;return e.replace(Gr,function(n){var o=ze(n);switch(ds(o[0])){case"<?xml":case"<personList":case"</personList>":case"</person>":case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<person":r.push({name:o.displayname,id:o.id});break;case"<ext":i=!0;break;case"</ext>":i=!1;break;default:if(!i&&t.WTF)throw new Error("unrecognized "+o[0]+" in threaded comments")}return n}),r}(cr(e,Hi(s.people[0])),t)),M&&(M=function tV(e,t){if(!e)return 0;try{e=t.map(function(i){return i.id||(i.id=i.strRelID),[i.name,e["!id"][i.id].Target,eV(e["!id"][i.id].Type)]})}catch{return null}return e&&0!==e.length?e:null}(M,d.Sheets));var H=cr(e,"xl/worksheets/sheet.xml",!0)?1:0;e:for(m=0;m!=u.Worksheets;++m){var V="sheet";if(M&&M[m]?(w="xl/"+M[m][1].replace(/[\/]?xl\//,""),Ii(e,w)||(w=M[m][1]),Ii(e,w)||(w=_.replace(/_rels\/.*$/,"")+M[m][1]),V=M[m][2]):w=(w="xl/worksheets/sheet"+(m+1-H)+"."+E).replace(/sheet0\./,"sheet."),C=w.replace(/^(.*)(\/)([^\/]*)$/,"$1/_rels/$3.rels"),t&&null!=t.sheets)switch(typeof t.sheets){case"number":if(m!=t.sheets)continue e;break;case"string":if(u.SheetNames[m].toLowerCase()!=t.sheets.toLowerCase())continue e;break;default:if(Array.isArray&&Array.isArray(t.sheets)){for(var B=!1,re=0;re!=t.sheets.length;++re)"number"==typeof t.sheets[re]&&t.sheets[re]==m&&(B=1),"string"==typeof t.sheets[re]&&t.sheets[re].toLowerCase()==u.SheetNames[m].toLowerCase()&&(B=1);if(!B)continue e}}rV(e,w,C,u.SheetNames[m],m,v,o,V,t,d,l,c)}return p={Directory:s,Workbook:d,Props:u,Custprops:f,Deps:g,Sheets:o,SheetNames:u.SheetNames,Strings:hl,Styles:c,Themes:l,SSF:Pt(Be)},t&&t.bookFiles&&(e.files?(p.keys=i,p.files=e.files):(p.keys=[],p.files={},e.FullPaths.forEach(function(ue,oe){ue=ue.replace(/^Root Entry[\/]/,""),p.keys.push(ue),p.files[ue]=e.FileIndex[oe]}))),t&&t.bookVBA&&(s.vba.length>0?p.vbaraw=cr(e,Hi(s.vba[0]),!0):s.defaults&&"application/vnd.ms-office.vbaProject"===s.defaults.bin&&(p.vbaraw=cr(e,"xl/vbaProject.bin",!0))),p}function sV(e,t){var r=t||{},i="Workbook",s=Le.find(e,i);try{if(!(s=Le.find(e,i="/!DataSpaces/Version"))||!s.content)throw new Error("ECMA-376 Encrypted file missing "+i);if(function H5(e){var t={};t.id=e.read_shift(0,"lpp4"),t.R=Is(e,4),t.U=Is(e,4),t.W=Is(e,4)}(s.content),!(s=Le.find(e,i="/!DataSpaces/DataSpaceMap"))||!s.content)throw new Error("ECMA-376 Encrypted file missing "+i);var n=function V5(e){var t=[];e.l+=4;for(var r=e.read_shift(4);r-- >0;)t.push(G5(e));return t}(s.content);if(1!==n.length||1!==n[0].comps.length||0!==n[0].comps[0].t||"StrongEncryptionDataSpace"!==n[0].name||"EncryptedPackage"!==n[0].comps[0].v)throw new Error("ECMA-376 Encrypted file bad "+i);if(!(s=Le.find(e,i="/!DataSpaces/DataSpaceInfo/StrongEncryptionDataSpace"))||!s.content)throw new Error("ECMA-376 Encrypted file missing "+i);var o=function z5(e){var t=[];e.l+=4;for(var r=e.read_shift(4);r-- >0;)t.push(e.read_shift(0,"lpp4"));return t}(s.content);if(1!=o.length||"StrongEncryptionTransform"!=o[0])throw new Error("ECMA-376 Encrypted file bad "+i);if(!(s=Le.find(e,i="/!DataSpaces/TransformInfo/StrongEncryptionTransform/!Primary"))||!s.content)throw new Error("ECMA-376 Encrypted file missing "+i);!function U5(e){var t=function W5(e){var t={};return e.read_shift(4),e.l+=4,t.id=e.read_shift(0,"lpp4"),t.name=e.read_shift(0,"lpp4"),t.R=Is(e,4),t.U=Is(e,4),t.W=Is(e,4),t}(e);if(t.ename=e.read_shift(0,"8lpp4"),t.blksz=e.read_shift(4),t.cmode=e.read_shift(4),4!=e.read_shift(4))throw new Error("Bad !Primary record");return t}(s.content)}catch{}if(!(s=Le.find(e,i="/EncryptionInfo"))||!s.content)throw new Error("ECMA-376 Encrypted file missing "+i);var a=function $5(e){var t=Is(e);switch(t.Minor){case 2:return[t.Minor,j5(e)];case 3:return[t.Minor,K5()];case 4:return[t.Minor,q5(e)]}throw new Error("ECMA-376 Encrypted file unrecognized Version: "+t.Minor)}(s.content);if(!(s=Le.find(e,i="/EncryptedPackage"))||!s.content)throw new Error("ECMA-376 Encrypted file missing "+i);if(4==a[0]&&typeof decrypt_agile<"u")return decrypt_agile(a[1],s.content,r.password||"",r);if(2==a[0]&&typeof decrypt_std76<"u")return decrypt_std76(a[1],s.content,r.password||"",r);throw new Error("File is password-protected")}function qf(e,t){var r="";switch((t||{}).type||"base64"){case"buffer":case"array":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case"base64":r=Ci(e.slice(0,12));break;case"binary":r=e;break;default:throw new Error("Unrecognized type "+(t&&t.type||"undefined"))}return[r.charCodeAt(0),r.charCodeAt(1),r.charCodeAt(2),r.charCodeAt(3),r.charCodeAt(4),r.charCodeAt(5),r.charCodeAt(6),r.charCodeAt(7)]}function $1(e,t){var r=0;e:for(;r<e.length;)switch(e.charCodeAt(r)){case 10:case 13:case 32:++r;break;case 60:return Hf(e.slice(r),t);default:break e}return qo.to_workbook(e,t)}function Xf(e,t,r,i){return i?(r.type="string",qo.to_workbook(e,r)):qo.to_workbook(t,r)}function ld(e,t){Mc();var r=t||{};if(typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer)return ld(new Uint8Array(e),((r=Pt(r)).type="array",r));typeof Uint8Array<"u"&&e instanceof Uint8Array&&!r.type&&(r.type=typeof Deno<"u"?"buffer":"array");var s,i=e,n=!1;if(r.cellStyles&&(r.cellNF=!0,r.sheetStubs=!0),Jo={},r.dateNF&&(Jo.dateNF=r.dateNF),r.type||(r.type=tt&&Buffer.isBuffer(e)?"buffer":"base64"),"file"==r.type&&(r.type=tt?"buffer":"binary",i=function f_(e){if(typeof Deno<"u")return Deno.readFileSync(e);if(typeof $<"u"&&typeof File<"u"&&typeof Folder<"u")try{var t=File(e);t.open("r"),t.encoding="binary";var r=t.read();return t.close(),r}catch(i){if(!i.message||!i.message.match(/onstruct/))throw i}throw new Error("Cannot access file "+e)}(e),typeof Uint8Array<"u"&&!tt&&(r.type="array")),"string"==r.type&&(n=!0,r.type="binary",r.codepage=65001,i=function uV(e){return e.match(/[^\x00-\x7F]/)?us(e):e}(e)),"array"==r.type&&typeof Uint8Array<"u"&&e instanceof Uint8Array&&typeof ArrayBuffer<"u"){var o=new ArrayBuffer(3),a=new Uint8Array(o);if(a.foo="bar",!a.foo)return(r=Pt(r)).type="array",ld(Nh(i),r)}switch((s=qf(i,r))[0]){case 208:if(207===s[1]&&17===s[2]&&224===s[3]&&161===s[4]&&177===s[5]&&26===s[6]&&225===s[7])return function aV(e,t){return Le.find(e,"EncryptedPackage")?sV(e,t):E1(e,t)}(Le.read(i,r),r);break;case 9:if(s[1]<=8)return E1(i,r);break;case 60:return Hf(i,r);case 73:if(73===s[1]&&42===s[2]&&0===s[3])throw new Error("TIFF Image File is not a spreadsheet");if(68===s[1])return function b5(e,t){var r=t||{},i=!!r.WTF;r.WTF=!0;try{var s=Aw.to_workbook(e,r);return r.WTF=i,s}catch(n){if(r.WTF=i,!n.message.match(/SYLK bad record ID/)&&i)throw n;return qo.to_workbook(e,t)}}(i,r);break;case 84:if(65===s[1]&&66===s[2]&&76===s[3])return Mw.to_workbook(i,r);break;case 80:return 75===s[1]&&s[2]<9&&s[3]<9?function lV(e,t){var i=e,s=t||{};return s.type||(s.type=tt&&Buffer.isBuffer(e)?"buffer":"base64"),iV(cC(i,s),s)}(i,r):Xf(e,i,r,n);case 239:return 60===s[3]?Hf(i,r):Xf(e,i,r,n);case 255:if(254===s[1])return function dV(e,t){var r=e;return"base64"==t.type&&(r=Ci(r)),r=lt.utils.decode(1200,r.slice(2),"str"),t.type="binary",$1(r,t)}(i,r);if(0===s[1]&&2===s[2]&&0===s[3])return ro.to_workbook(i,r);break;case 0:if(0===s[1]&&(s[2]>=2&&0===s[3]||0===s[2]&&(8===s[3]||9===s[3])))return ro.to_workbook(i,r);break;case 3:case 131:case 139:case 140:return yf.to_workbook(i,r);case 123:if(92===s[1]&&114===s[2]&&116===s[3])return Hw.to_workbook(i,r);break;case 10:case 13:case 32:return function cV(e,t){var r="",i=qf(e,t);switch(t.type){case"base64":r=Ci(e);break;case"binary":r=e;break;case"buffer":r=e.toString("binary");break;case"array":r=Un(e);break;default:throw new Error("Unrecognized type "+t.type)}return 239==i[0]&&187==i[1]&&191==i[2]&&(r=Tt(r)),t.type="binary",$1(r,t)}(i,r);case 137:if(80===s[1]&&78===s[2]&&71===s[3])throw new Error("PNG Image File is not a spreadsheet")}return S5.indexOf(s[0])>-1&&s[2]<=12&&s[3]<=31?yf.to_workbook(i,r):Xf(e,i,r,n)}function X1(e,t,r,i,s,n,o,a){var l=er(r),c=a.defval,d=a.raw||!Object.prototype.hasOwnProperty.call(a,"raw"),u=!0,h=1===s?[]:{};if(1!==s)if(Object.defineProperty)try{Object.defineProperty(h,"__rowNum__",{value:r,enumerable:!1})}catch{h.__rowNum__=r}else h.__rowNum__=r;if(!o||e[r])for(var f=t.s.c;f<=t.e.c;++f){var p=o?e[r][f]:e[i[f]+l];if(void 0!==p&&void 0!==p.t){var g=p.v;switch(p.t){case"z":if(null==g)break;continue;case"e":g=0==g?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+p.t)}if(null!=n[f]){if(null==g)if("e"==p.t&&null===g)h[n[f]]=null;else if(void 0!==c)h[n[f]]=c;else{if(!d||null!==g)continue;h[n[f]]=null}else h[n[f]]=d&&("n"!==p.t||"n"===p.t&&!1!==a.rawNumbers)?g:hs(p,g,a);null!=g&&(u=!1)}}else{if(void 0===c)continue;null!=n[f]&&(h[n[f]]=c)}}return{row:h,isempty:u}}function dd(e,t){if(null==e||null==e["!ref"])return[];var r={t:"n",v:0},i=0,s=1,n=[],o=0,a="",l={s:{r:0,c:0},e:{r:0,c:0}},c=t||{},d=null!=c.range?c.range:e["!ref"];switch(1===c.header?i=1:"A"===c.header?i=2:Array.isArray(c.header)?i=3:null==c.header&&(i=0),typeof d){case"string":l=ot(d);break;case"number":(l=ot(e["!ref"])).s.r=d;break;default:l=d}i>0&&(s=0);var u=er(l.s.r),h=[],f=[],p=0,g=0,m=Array.isArray(e),v=l.s.r,w=0,C={};m&&!e[v]&&(e[v]=[]);var y=c.skipHidden&&e["!cols"]||[],k=c.skipHidden&&e["!rows"]||[];for(w=l.s.c;w<=l.e.c;++w)if(!(y[w]||{}).hidden)switch(h[w]=Lt(w),r=m?e[v][w]:e[h[w]+u],i){case 1:n[w]=w-l.s.c;break;case 2:n[w]=h[w];break;case 3:n[w]=c.header[w-l.s.c];break;default:if(null==r&&(r={w:"__EMPTY",t:"s"}),a=o=hs(r,null,c),g=C[o]||0){do{a=o+"_"+g++}while(C[a]);C[o]=g,C[a]=1}else C[o]=1;n[w]=a}for(v=l.s.r+s;v<=l.e.r;++v)if(!(k[v]||{}).hidden){var E=X1(e,l,v,h,i,n,m,c);(!1===E.isempty||(1===i?!1!==c.blankrows:c.blankrows))&&(f[p++]=E.row)}return f.length=p,f}var Y1=/"/g;function Q1(e,t,r,i,s,n,o,a){for(var l=!0,c=[],d="",u=er(r),h=t.s.c;h<=t.e.c;++h)if(i[h]){var f=a.dense?(e[r]||[])[h]:e[i[h]+u];if(null==f)d="";else if(null!=f.v){l=!1,d=""+(a.rawNumbers&&"n"==f.t?f.v:hs(f,null,a));for(var p=0,g=0;p!==d.length;++p)if((g=d.charCodeAt(p))===s||g===n||34===g||a.forceQuotes){d='"'+d.replace(Y1,'""')+'"';break}"ID"==d&&(d='"ID"')}else null==f.f||f.F?d="":(l=!1,(d="="+f.f).indexOf(",")>=0&&(d='"'+d.replace(Y1,'""')+'"'));c.push(d)}return!1===a.blankrows&&l?null:c.join(o)}function Jf(e,t){var r=[],i=t??{};if(null==e||null==e["!ref"])return"";var s=ot(e["!ref"]),n=void 0!==i.FS?i.FS:",",o=n.charCodeAt(0),a=void 0!==i.RS?i.RS:"\n",l=a.charCodeAt(0),c=new RegExp(("|"==n?"\\|":n)+"+$"),d="",u=[];i.dense=Array.isArray(e);for(var h=i.skipHidden&&e["!cols"]||[],f=i.skipHidden&&e["!rows"]||[],p=s.s.c;p<=s.e.c;++p)(h[p]||{}).hidden||(u[p]=Lt(p));for(var g=0,m=s.s.r;m<=s.e.r;++m)(f[m]||{}).hidden||null!=(d=Q1(e,s,m,u,o,l,n,i))&&(i.strip&&(d=d.replace(c,"")),(d||!1!==i.blankrows)&&r.push((g++?a:"")+d));return delete i.dense,r.join("")}function Z1(e,t,r){var i=r||{},s=+!i.skipHeader,n=e||{},o=0,a=0;if(n&&null!=i.origin)if("number"==typeof i.origin)o=i.origin;else{var l="string"==typeof i.origin?qt(i.origin):i.origin;o=l.r,a=l.c}var c,d={s:{c:0,r:0},e:{c:a,r:o+t.length-1+s}};if(n["!ref"]){var u=ot(n["!ref"]);d.e.c=Math.max(d.e.c,u.e.c),d.e.r=Math.max(d.e.r,u.e.r),-1==o&&(d.e.r=(o=u.e.r+1)+t.length-1+s)}else-1==o&&(o=0,d.e.r=t.length-1+s);var h=i.header||[],f=0;t.forEach(function(g,m){Jt(g).forEach(function(v){-1==(f=h.indexOf(v))&&(h[f=h.length]=v);var w=g[v],C="z",y="",k=We({c:a+f,r:o+m+s});c=wl(n,k),!w||"object"!=typeof w||w instanceof Date?("number"==typeof w?C="n":"boolean"==typeof w?C="b":"string"==typeof w?C="s":w instanceof Date?(C="d",i.cellDates||(C="n",w=wr(w)),y=i.dateNF||Be[14]):null===w&&i.nullError&&(C="e",w=0),c?(c.t=C,c.v=w,delete c.w,delete c.R,y&&(c.z=y)):n[k]=c={t:C,v:w},y&&(c.z=y)):n[k]=w})}),d.e.c=Math.max(d.e.c,a+h.length-1);var p=er(o);if(s)for(f=0;f<h.length;++f)n[Lt(f+a)+p]={t:"s",v:h[f]};return n["!ref"]=Ke(d),n}function wl(e,t,r){if("string"==typeof t){if(Array.isArray(e)){var i=qt(t);return e[i.r]||(e[i.r]=[]),e[i.r][i.c]||(e[i.r][i.c]={t:"z"})}return e[t]||(e[t]={t:"z"})}return wl(e,We("number"!=typeof t?t:{r:t,c:r||0}))}function eg(e,t,r,i){var s=1;if(!r)for(;s<=65535&&-1!=e.SheetNames.indexOf(r="Sheet"+s);++s,r=void 0);if(!r||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(i&&e.SheetNames.indexOf(r)>=0){var n=r.match(/(^.*?)(\d+)$/);s=n&&+n[2]||0;var o=n&&n[1]||r;for(++s;s<=65535&&-1!=e.SheetNames.indexOf(r=o+s);++s);}if(function C1(e,t){if(e.length>31){if(t)return!1;throw new Error("Sheet names cannot exceed 31 chars")}var r=!0;return uG.forEach(function(i){if(-1!=e.indexOf(i)){if(!t)throw new Error("Sheet name cannot contain : \\ / ? * [ ]");r=!1}}),r}(r),e.SheetNames.indexOf(r)>=0)throw new Error("Worksheet with name |"+r+"| already exists!");return e.SheetNames.push(r),e.Sheets[r]=t,r}function ex(e,t,r){return t?(e.l={Target:t},r&&(e.l.Tooltip=r)):delete e.l,e}var EV={encode_col:Lt,encode_row:er,encode_cell:We,encode_range:Ke,decode_col:nf,decode_row:sf,split_cell:function U_(e){return e.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")},decode_cell:qt,decode_range:yi,format_cell:hs,sheet_add_aoa:BC,sheet_add_json:Z1,sheet_add_dom:M1,aoa_to_sheet:jo,json_to_sheet:function vV(e,t){return Z1(null,e,t)},table_to_sheet:I1,table_to_book:function _9(e,t){return fn(I1(e,t),t)},sheet_to_csv:Jf,sheet_to_txt:function J1(e,t){t||(t={}),t.FS="\t",t.RS="\n";var r=Jf(e,t);return r},sheet_to_json:dd,sheet_to_html:function A1(e,t){var r=t||{},s=null!=r.footer?r.footer:"</body></html>",n=[null!=r.header?r.header:'<html><head><meta charset="utf-8"/><title>SheetJS Table Export</title></head><body>'],o=yi(e["!ref"]);r.dense=Array.isArray(e),n.push(function D1(e,t,r){return[].join("")+"<table"+(r&&r.id?' id="'+r.id+'"':"")+">"}(0,0,r));for(var a=o.s.r;a<=o.e.r;++a)n.push(k1(e,o,a,r));return n.push("</table>"+s),n.join("")},sheet_to_formulae:function mV(e){var r,t="",i="";if(null==e||null==e["!ref"])return[];var a,s=ot(e["!ref"]),n="",o=[],l=[],c=Array.isArray(e);for(a=s.s.c;a<=s.e.c;++a)o[a]=Lt(a);for(var d=s.s.r;d<=s.e.r;++d)for(n=er(d),a=s.s.c;a<=s.e.c;++a)if(t=o[a]+n,i="",void 0!==(r=c?(e[d]||[])[a]:e[t])){if(null!=r.F){if(t=r.F,!r.f)continue;i=r.f,-1==t.indexOf(":")&&(t=t+":"+t)}if(null!=r.f)i=r.f;else{if("z"==r.t)continue;if("n"==r.t&&null!=r.v)i=""+r.v;else if("b"==r.t)i=r.v?"TRUE":"FALSE";else if(void 0!==r.w)i="'"+r.w;else{if(void 0===r.v)continue;i="s"==r.t?"'"+r.v:""+r.v}}l[l.length]=t+"="+i}return l},sheet_to_row_object_array:dd,sheet_get_cell:wl,book_new:function Zf(){return{SheetNames:[],Sheets:{}}},book_append_sheet:eg,book_set_sheet_visibility:function wV(e,t,r){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var i=function CV(e,t){if("number"==typeof t){if(t>=0&&e.SheetNames.length>t)return t;throw new Error("Cannot find sheet # "+t)}if("string"==typeof t){var r=e.SheetNames.indexOf(t);if(r>-1)return r;throw new Error("Cannot find sheet name |"+t+"|")}throw new Error("Cannot find sheet |"+t+"|")}(e,t);switch(e.Workbook.Sheets[i]||(e.Workbook.Sheets[i]={}),r){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+r)}e.Workbook.Sheets[i].Hidden=r},cell_set_number_format:function xV(e,t){return e.z=t,e},cell_set_hyperlink:ex,cell_set_internal_link:function SV(e,t,r){return ex(e,"#"+t,r)},cell_add_comment:function bV(e,t,r){e.c||(e.c=[]),e.c.push({t,a:r||"SheetJS"})},sheet_set_array_formula:function yV(e,t,r,i){for(var s="string"!=typeof t?t:ot(t),n="string"==typeof t?t:Ke(t),o=s.s.r;o<=s.e.r;++o)for(var a=s.s.c;a<=s.e.c;++a){var l=wl(e,o,a);l.t="n",l.F=n,delete l.v,o==s.s.r&&a==s.s.c&&(l.f=r,i&&(l.D=!0))}return e},consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};function hd(e,t,r){const s=EV.sheet_to_json(e.Sheets[t],{header:1,defval:null}),n={colDefs:[],rows:[],sheetNames:r,sheetSelector:h=>hd(e,h,r)};if(0===s.length)return n;const o=h=>h.filter(f=>null!=f&&""!==f).length,a=Math.max(...s.map(o));if(0===a)return n;const l=s.findIndex(h=>o(h)===a),c=s[l].map(h=>null!=h?String(h):""),u=s.slice(l+1).filter(h=>o(h)>0).map(h=>{const f={};return c.forEach((p,g)=>{p&&(f[p]=h[g]??"")}),f});return{colDefs:c.filter(h=>h).map(h=>({field:h})),rows:u,sheetNames:r,sheetSelector:h=>hd(e,h,r)}}function tg(){return tg=(0,_r.A)(function*(e){const r=ld(e,{type:"string"==typeof e?"binary":"array"}),i=r.SheetNames.filter(s=>hd(r,s,[]).rows.length>0).filter(s=>"Export Summary"!==s);return 0===i.length?{colDefs:[],rows:[],sheetNames:[],sheetSelector:()=>({colDefs:[],rows:[],sheetNames:[],sheetSelector:()=>({})})}:hd(r,i[0],i)}),tg.apply(this,arguments)}var DV=Ft(7284),AV=Ft.n(DV),IV=Ft(2014),_V=Ft(5448);function LV(e,t){if(1&e){const r=I.RV6();I.j41(0,"div",1)(1,"cue-flexcontainer",4)(2,"cue-typography"),I.EFF(3),I.nI1(4,"transloco"),I.k0s(),I.j41(5,"cue-button",5),I.bIt("click",function(){G.eBV(r);const s=I.XpG();return G.Njj(s.promptFileUpload())}),I.nrm(6,"cue-button-padder"),I.j41(7,"cue-button-label"),I.EFF(8),I.nI1(9,"transloco"),I.k0s(),I.nrm(10,"cue-button-padder"),I.k0s()()()}2&e&&(I.R7$(3),I.JRh(I.bMT(4,2,"components.spreadsheet.infoDropFiles")),I.R7$(5),I.JRh(I.bMT(9,4,"components.spreadsheet.infoClickToLoad")))}function OV(e,t){if(1&e){const r=I.RV6();I.j41(0,"cue-select",6),I.bIt("valueChange",function(s){G.eBV(r);const n=I.XpG();return G.Njj(n.onSheetChange(s))}),I.k0s()}if(2&e){const r=I.XpG();I.Y8G("options",r.sheetNames())("value",r.selectedSheet())("underline",!1)}}kd.registerModules([bv]);let BV=(()=>{class e{data=(0,N.hFB)();acceptedFileTypes=(0,N.hFB)([".csv",".xlsx",".xls"]);allowUpload=(0,N.hFB)(!1);loading=(0,G.vPA)(!1);noRowsText=(0,qr.EW)(()=>this.data()?this.loading()?"components.spreadsheet.infoLoading":"components.spreadsheet.infoNoRows":"");parseResult=(0,N.CGW)();filesDropped=(0,N.CGW)();rowData=(0,G.vPA)([]);columnDefs=(0,G.vPA)([]);fileName=(0,G.vPA)("");sheetNames=(0,G.vPA)([]);selectedSheet=(0,G.vPA)("");_sheetSelector=null;constructor(){var r=this;(0,G.QZP)((0,_r.A)(function*(){const i=r.data();i&&(r.loading.set(!0),yield r._processInputData(i),r.loading.set(!1))}))}handleFileDrop(r){var i=this;return(0,_r.A)(function*(){if(0===r.length)return;const s=r[0];i.fileName.set(s.name),yield i._processDroppedFile(s),i.filesDropped.emit(r)})()}promptFileUpload(){var r=this;return(0,_r.A)(function*(){try{const i=r.acceptedFileTypes().join(","),s=yield function Dc(e){return Ah.apply(this,arguments)}(i);r.fileName.set(s.name),yield r._processDroppedFile(s)}catch(i){console.error("File upload cancelled or failed:",i)}})()}_processInputData(r){var i=this;return(0,_r.A)(function*(){if("csv"===r.format)console.log("Parsing CSV data"),r.raw?i.parseCsv(r.raw):r.url&&fetch(r.url).then(s=>s.text()).then(s=>i.parseCsv(s)).catch(s=>console.error("Error fetching CSV:",s));else if(("xlsx"===r.format||"xls"===r.format)&&(console.log("Parsing Excel data"),r.url))try{const n=yield(yield fetch(r.url)).arrayBuffer();yield i._parseExcel(n)}catch(s){console.error("Error fetching or parsing Excel file:",s)}})()}_processDroppedFile(r){var i=this;return(0,_r.A)(function*(){const s=r.name.toLowerCase();s.endsWith(".csv")?yield i._parseFile(r,"csv"):s.endsWith(".xlsx")||s.endsWith(".xls")?yield i._parseFile(r,"xlsx"):console.error("Unsupported file type:",r.name)})()}_parseFile(r,i){var s=this;return(0,_r.A)(function*(){if("csv"===i){const n=yield r.text();s.parseCsv(n)}else if("xlsx"===i){const n=yield r.arrayBuffer();yield s._parseExcel(n)}})()}_parseExcel(r){var i=this;return(0,_r.A)(function*(){try{const s=yield function PV(e){return tg.apply(this,arguments)}(r);i._sheetSelector=s.sheetSelector,i.sheetNames.set(s.sheetNames),i.selectedSheet.set(s.sheetNames[0]??""),i._applySheetResult(s)}catch(s){console.error("Error parsing Excel file:",s)}})()}onSheetChange(r){if(!this._sheetSelector)return;this.selectedSheet.set(r);const i=this._sheetSelector(r);this._applySheetResult(i)}_applySheetResult(r){this.columnDefs.set(r.colDefs),this.rowData.set(r.rows),this.parseResult.emit({rows:r.rows,columns:r.colDefs,fileName:this.fileName()})}parseCsv(r){const{colDefs:i,rows:s}=function MV(e,t){const r=AV().parse(e,{header:t});let i=[],s=[];return r.meta.fields&&(s=r.meta.fields.map(n=>({field:n}))),i=r.data.filter(n=>"object"==typeof n&&null!==n&&Object.values(n).some(o=>""!==o&&null!=o)),{colDefs:s,rows:i}}(r,!0);this.columnDefs.set(i),this.rowData.set(s),this.parseResult.emit({rows:this.rowData(),columns:this.columnDefs(),fileName:this.fileName()})}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=I.VBU({type:e,selectors:[["cue-spreadsheet"]],inputs:{data:[1,"data"],acceptedFileTypes:[1,"acceptedFileTypes"],allowUpload:[1,"allowUpload"]},outputs:{parseResult:"parseResult",filesDropped:"filesDropped"},decls:4,vars:5,consts:[["cueFileDrop","",1,"spreadsheet-grid-wrapper",3,"filesDropped"],[1,"drop-zone"],["size","s",1,"sheet-selector",3,"options","value","underline"],[2,"width","100%","height","100%","background-color","var(--cue-color-bg-primary)",3,"rowData","columnDefs","noRowsText"],["direction","column","gap","l","align","center",1,"drop-zone-content"],[3,"click"],["size","s",1,"sheet-selector",3,"valueChange","options","value","underline"]],template:function(i,s){1&i&&(I.j41(0,"div",0),I.bIt("filesDropped",function(o){return s.handleFileDrop(o)}),I.nVh(1,LV,11,6,"div",1),I.nVh(2,OV,1,3,"cue-select",2),I.nrm(3,"cue-ag-grid",3),I.k0s()),2&i&&(I.R7$(),I.vxM(0===s.rowData().length&&s.allowUpload()?1:-1),I.R7$(),I.vxM(s.sheetNames().length>1?2:-1),I.R7$(),I.Y8G("rowData",s.rowData())("columnDefs",s.columnDefs())("noRowsText",s.noRowsText()))},dependencies:[AI,II,Iv.l,Av.n,Mv.o,Dh.$,IV.z,_V.L,kh.Kj],styles:["[_nghost-%COMP%]{--ag-font-family: var(--cue-font-family);--ag-header-font-family: var(--cue-font-family);--ag-cell-font-family: var(--cue-font-family);display:contents}.spreadsheet-grid-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;min-height:200px;display:flex;flex-direction:column;position:relative}.sheet-selector[_ngcontent-%COMP%]{align-self:flex-start;margin-bottom:4px;min-width:160px}.drop-zone[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;border:2px dashed var(--cue-color-border-secondary, #ccc);border-radius:8px;background-color:var(--cue-color-bg-secondary, #f9f9f9);transition:all .2s ease}.drop-zone[_ngcontent-%COMP%]:hover{border-color:var(--cue-color-border-primary, #007acc);background-color:var(--cue-color-bg-hover, #f0f8ff)}.drop-zone-content[_ngcontent-%COMP%]{color:var(--cue-color-text-secondary, #666);padding:50px}.ag-theme-alpine[_ngcontent-%COMP%]{width:100%;height:100%}"],changeDetection:0})}return e})()},7284(sg,gd,Ft){var _r,G;_r=function qr(){"use strict";var St=function(){return typeof self<"u"?self:typeof window<"u"?window:typeof St<"u"?St:{}}();var le=!St.document&&!!St.postMessage,pt=St.IS_PAPA_WORKER||!1,Ns={},xn=0,Ue={parse:function pd(z,W){var fe=(W=W||{}).dynamicTyping||!1;if(bt(fe)&&(W.dynamicTypingFunction=fe,fe={}),W.dynamicTyping=fe,W.transform=!!bt(W.transform)&&W.transform,W.worker&&Ue.WORKERS_SUPPORTED){var Te=function Tr(){if(!Ue.WORKERS_SUPPORTED)return!1;var z=function zi(){var z=St.URL||St.webkitURL||null,W=qr.toString();return Ue.BLOB_URL||(Ue.BLOB_URL=z.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",W,")();"],{type:"text/javascript"})))}(),W=new St.Worker(z);return W.onmessage=Xr,W.id=xn++,Ns[W.id]=W,W}();return Te.userStep=W.step,Te.userChunk=W.chunk,Te.userComplete=W.complete,Te.userError=W.error,W.step=bt(W.step),W.chunk=bt(W.chunk),W.complete=bt(W.complete),W.error=bt(W.error),delete W.worker,void Te.postMessage({input:z,config:W,workerId:Te.id})}var Ie=null;return z===Ue.NODE_STREAM_INPUT&&typeof PAPA_BROWSER_CONTEXT>"u"?(Ie=new Vs(W)).getStream():("string"==typeof z?(z=function Ye(Oe){return 65279===Oe.charCodeAt(0)?Oe.slice(1):Oe}(z),Ie=W.download?new kr(W):new It(W)):!0===z.readable&&bt(z.read)&&bt(z.on)?Ie=new Gs(W):(St.File&&z instanceof File||z instanceof Object)&&(Ie=new mt(W)),Ie.stream(z))},unparse:function Hs(z,W){var fe=!1,Te=!0,Ie=",",Ye="\r\n",Oe='"',De=Oe+Oe,nt=!1,Dt=null,Xt=!1;!function Qr(){if("object"==typeof W){if("string"==typeof W.delimiter&&!Ue.BAD_DELIMITERS.filter(function(ct){return-1!==W.delimiter.indexOf(ct)}).length&&(Ie=W.delimiter),("boolean"==typeof W.quotes||"function"==typeof W.quotes||Array.isArray(W.quotes))&&(fe=W.quotes),("boolean"==typeof W.skipEmptyLines||"string"==typeof W.skipEmptyLines)&&(nt=W.skipEmptyLines),"string"==typeof W.newline&&(Ye=W.newline),"string"==typeof W.quoteChar&&(Oe=W.quoteChar),"boolean"==typeof W.header&&(Te=W.header),Array.isArray(W.columns)){if(0===W.columns.length)throw new Error("Option columns is empty");Dt=W.columns}void 0!==W.escapeChar&&(De=W.escapeChar+Oe),W.escapeFormulae instanceof RegExp?Xt=W.escapeFormulae:"boolean"==typeof W.escapeFormulae&&W.escapeFormulae&&(Xt=/^[=+\-@\t\r].*$/)}}();var $e=new RegExp(bn(Oe),"g");if("string"==typeof z&&(z=JSON.parse(z)),Array.isArray(z)){if(!z.length||Array.isArray(z[0]))return He(null,z,nt);if("object"==typeof z[0])return He(Dt||Object.keys(z[0]),z,nt)}else if("object"==typeof z)return"string"==typeof z.data&&(z.data=JSON.parse(z.data)),Array.isArray(z.data)&&(z.fields||(z.fields=z.meta&&z.meta.fields||Dt),z.fields||(z.fields=Array.isArray(z.data[0])?z.fields:"object"==typeof z.data[0]?Object.keys(z.data[0]):[]),!Array.isArray(z.data[0])&&"object"!=typeof z.data[0]&&(z.data=[z.data])),He(z.fields||[],z.data||[],nt);throw new Error("Unable to serialize unrecognized input");function He(ct,dt,Bt){var Nt="";"string"==typeof ct&&(ct=JSON.parse(ct)),"string"==typeof dt&&(dt=JSON.parse(dt));var Lr=Array.isArray(ct)&&ct.length>0,pr=!Array.isArray(dt[0]);if(Lr&&Te){for(var ii=0;ii<ct.length;ii++)ii>0&&(Nt+=Ie),Nt+=Qe(ct[ii],ii);dt.length>0&&(Nt+=Ye)}for(var vt=0;vt<dt.length;vt++){var Wi=Lr?ct.length:dt[vt].length,Ri=!1,Ne=Lr?0===Object.keys(dt[vt]).length:0===dt[vt].length;if(Bt&&!Lr&&(Ri="greedy"===Bt?""===dt[vt].join("").trim():1===dt[vt].length&&0===dt[vt][0].length),"greedy"===Bt&&Lr){for(var Ve=[],et=0;et<Wi;et++)Ve.push(dt[vt][pr?ct[et]:et]);Ri=""===Ve.join("").trim()}if(!Ri){for(var Me=0;Me<Wi;Me++)Me>0&&!Ne&&(Nt+=Ie),Nt+=Qe(dt[vt][Lr&&pr?ct[Me]:Me],Me);vt<dt.length-1&&(!Bt||Wi>0&&!Ne)&&(Nt+=Ye)}}return Nt}function Qe(ct,dt){if(typeof ct>"u"||null===ct)return"";if(ct.constructor===Date)return JSON.stringify(ct).slice(1,25);var Bt=!1;Xt&&"string"==typeof ct&&Xt.test(ct)&&(ct="'"+ct,Bt=!0);var Nt=ct.toString().replace($e,De);return(Bt=Bt||!0===fe||"function"==typeof fe&&fe(ct,dt)||Array.isArray(fe)&&fe[dt]||function Cs(ct,dt){for(var Bt=0;Bt<dt.length;Bt++)if(ct.indexOf(dt[Bt])>-1)return!0;return!1}(Nt,Ue.BAD_DELIMITERS)||Nt.indexOf(Ie)>-1||" "===Nt.charAt(0)||" "===Nt.charAt(Nt.length-1))?Oe+Nt+Oe:Nt}},RECORD_SEP:"\x1e",UNIT_SEP:"\x1f",BYTE_ORDER_MARK:"\ufeff"};if(Ue.BAD_DELIMITERS=["\r","\n",'"',Ue.BYTE_ORDER_MARK],Ue.WORKERS_SUPPORTED=!le&&!!St.Worker,Ue.NODE_STREAM_INPUT=1,Ue.LocalChunkSize=10485760,Ue.RemoteChunkSize=5242880,Ue.DefaultDelimiter=",",Ue.Parser=ta,Ue.ParserHandle=lo,Ue.NetworkStreamer=kr,Ue.FileStreamer=mt,Ue.StringStreamer=It,Ue.ReadableStreamStreamer=Gs,typeof PAPA_BROWSER_CONTEXT>"u"&&(Ue.DuplexStreamStreamer=Vs),St.jQuery){var Sn=St.jQuery;Sn.fn.parse=function(z){var W=z.config||{},fe=[];return this.each(function(Oe){if("INPUT"!==Sn(this).prop("tagName").toUpperCase()||"file"!==Sn(this).attr("type").toLowerCase()||!St.FileReader||!this.files||0===this.files.length)return!0;for(var nt=0;nt<this.files.length;nt++)fe.push({file:this.files[nt],inputElem:this,instanceConfig:Sn.extend({},W)})}),Te(),this;function Te(){if(0!==fe.length){var Oe=fe[0];if(bt(z.before)){var De=z.before(Oe.file,Oe.inputElem);if("object"==typeof De){if("abort"===De.action)return void function Ie(Oe,De,nt,Dt){bt(z.error)&&z.error({name:Oe},De,nt,Dt)}("AbortError",Oe.file,Oe.inputElem,De.reason);if("skip"===De.action)return void Ye();"object"==typeof De.config&&(Oe.instanceConfig=Sn.extend(Oe.instanceConfig,De.config))}else if("skip"===De)return void Ye()}var nt=Oe.instanceConfig.complete;Oe.instanceConfig.complete=function(Dt){bt(nt)&&nt(Dt,Oe.file,Oe.inputElem),Ye()},Ue.parse(Oe.file,Oe.instanceConfig)}else bt(z.complete)&&z.complete()}function Ye(){fe.splice(0,1),Te()}}}function Rr(z){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function W(fe){var Te=uo(fe);Te.chunkSize=parseInt(Te.chunkSize),!fe.step&&!fe.chunk&&(Te.chunkSize=null),this._handle=new lo(Te),this._handle.streamer=this,this._config=Te}.call(this,z),this.parseChunk=function(fe,Te){const Ie=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&Ie>0){let Xt=this._config.newline;Xt||(Xt=this._handle.guessLineEndings(fe,this._config.quoteChar||'"')),fe=[...fe.split(Xt).slice(Ie)].join(Xt)}if(this.isFirstChunk&&bt(this._config.beforeFirstChunk)){var Ye=this._config.beforeFirstChunk(fe);void 0!==Ye&&(fe=Ye)}this.isFirstChunk=!1,this._halted=!1;var Oe=this._partialLine+fe;this._partialLine="";var De=this._handle.parse(Oe,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var nt=De.meta.cursor;this._finished||(this._partialLine=Oe.substring(nt-this._baseIndex),this._baseIndex=nt),De&&De.data&&(this._rowCount+=De.data.length);var Dt=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(pt)St.postMessage({results:De,workerId:Ue.WORKER_ID,finished:Dt});else if(bt(this._config.chunk)&&!Te){if(this._config.chunk(De,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);De=void 0,this._completeResults=void 0}return!this._config.step&&!this._config.chunk&&(this._completeResults.data=this._completeResults.data.concat(De.data),this._completeResults.errors=this._completeResults.errors.concat(De.errors),this._completeResults.meta=De.meta),!this._completed&&Dt&&bt(this._config.complete)&&(!De||!De.meta.aborted)&&(this._config.complete(this._completeResults,this._input),this._completed=!0),!Dt&&(!De||!De.meta.paused)&&this._nextChunk(),De}this._halted=!0},this._sendError=function(fe){bt(this._config.error)?this._config.error(fe):pt&&this._config.error&&St.postMessage({workerId:Ue.WORKER_ID,error:fe,finished:!1})}}function kr(z){var W;(z=z||{}).chunkSize||(z.chunkSize=Ue.RemoteChunkSize),Rr.call(this,z),this._nextChunk=le?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(Te){this._input=Te,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(W=new XMLHttpRequest,this._config.withCredentials&&(W.withCredentials=this._config.withCredentials),le||(W.onload=Yr(this._chunkLoaded,this),W.onerror=Yr(this._chunkError,this)),W.open(this._config.downloadRequestBody?"POST":"GET",this._input,!le),this._config.downloadRequestHeaders){var Te=this._config.downloadRequestHeaders;for(var Ie in Te)W.setRequestHeader(Ie,Te[Ie])}this._config.chunkSize&&W.setRequestHeader("Range","bytes="+this._start+"-"+(this._start+this._config.chunkSize-1));try{W.send(this._config.downloadRequestBody)}catch(Oe){this._chunkError(Oe.message)}le&&0===W.status&&this._chunkError()}},this._chunkLoaded=function(){if(4===W.readyState){if(W.status<200||W.status>=400)return void this._chunkError();this._start+=this._config.chunkSize?this._config.chunkSize:W.responseText.length,this._finished=!this._config.chunkSize||this._start>=function fe(Te){var Ie=Te.getResponseHeader("Content-Range");return null===Ie?-1:parseInt(Ie.substring(Ie.lastIndexOf("/")+1))}(W),this.parseChunk(W.responseText)}},this._chunkError=function(Te){this._sendError(new Error(W.statusText||Te))}}function mt(z){(z=z||{}).chunkSize||(z.chunkSize=Ue.LocalChunkSize),Rr.call(this,z);var W,fe,Te=typeof FileReader<"u";this.stream=function(Ie){this._input=Ie,fe=Ie.slice||Ie.webkitSlice||Ie.mozSlice,Te?((W=new FileReader).onload=Yr(this._chunkLoaded,this),W.onerror=Yr(this._chunkError,this)):W=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){!this._finished&&(!this._config.preview||this._rowCount<this._config.preview)&&this._readChunk()},this._readChunk=function(){var Ie=this._input;if(this._config.chunkSize){var Ye=Math.min(this._start+this._config.chunkSize,this._input.size);Ie=fe.call(Ie,this._start,Ye)}var Oe=W.readAsText(Ie,this._config.encoding);Te||this._chunkLoaded({target:{result:Oe}})},this._chunkLoaded=function(Ie){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(Ie.target.result)},this._chunkError=function(){this._sendError(W.error)}}function It(z){var W;Rr.call(this,z=z||{}),this.stream=function(fe){return W=fe,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var Te,fe=this._config.chunkSize;return fe?(Te=W.substring(0,fe),W=W.substring(fe)):(Te=W,W=""),this._finished=!W,this.parseChunk(Te)}}}function Gs(z){Rr.call(this,z=z||{});var W=[],fe=!0,Te=!1;this.pause=function(){Rr.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){Rr.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(Ie){this._input=Ie,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){Te&&1===W.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),W.length?this.parseChunk(W.shift()):fe=!0},this._streamData=Yr(function(Ie){try{W.push("string"==typeof Ie?Ie:Ie.toString(this._config.encoding)),fe&&(fe=!1,this._checkIsFinished(),this.parseChunk(W.shift()))}catch(Ye){this._streamError(Ye)}},this),this._streamError=Yr(function(Ie){this._streamCleanUp(),this._sendError(Ie)},this),this._streamEnd=Yr(function(){this._streamCleanUp(),Te=!0,this._streamData("")},this),this._streamCleanUp=Yr(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function Vs(z){var W=Ft(6266).Duplex,fe=uo(z),Te=!0,Ie=!1,Ye=[],Oe=null;this._onCsvData=function(De){!Oe.push(De.data)&&!this._handle.paused()&&this._handle.pause()},this._onCsvComplete=function(){Oe.push(null)},fe.step=Yr(this._onCsvData,this),fe.complete=Yr(this._onCsvComplete,this),Rr.call(this,fe),this._nextChunk=function(){Ie&&1===Ye.length&&(this._finished=!0),Ye.length?Ye.shift()():Te=!0},this._addToParseQueue=function(De,nt){Ye.push(Yr(function(){if(this.parseChunk("string"==typeof De?De:De.toString(fe.encoding)),bt(nt))return nt()},this)),Te&&(Te=!1,this._nextChunk())},this._onRead=function(){this._handle.paused()&&this._handle.resume()},this._onWrite=function(De,nt,Dt){this._addToParseQueue(De,Dt)},this._onWriteComplete=function(){Ie=!0,this._addToParseQueue("")},this.getStream=function(){return Oe},(Oe=new W({readableObjectMode:!0,decodeStrings:!1,read:Yr(this._onRead,this),write:Yr(this._onWrite,this)})).once("finish",Yr(this._onWriteComplete,this))}function lo(z){var nt,Dt,Qr,W=Math.pow(2,53),fe=-W,Te=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,Ie=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,Ye=this,Oe=0,De=0,Xt=!1,$e=!1,He=[],Qe={data:[],errors:[],meta:{}};if(bt(z.step)){var Cs=z.step;z.step=function(Ne){if(Qe=Ne,Nt())Bt();else{if(Bt(),0===Qe.data.length)return;Oe+=Ne.data.length,z.preview&&Oe>z.preview?Dt.abort():(Qe.data=Qe.data[0],Cs(Qe,Ye))}}}function ct(Ne){return"greedy"===z.skipEmptyLines?""===Ne.join("").trim():1===Ne.length&&0===Ne[0].length}function Bt(){return Qe&&Qr&&(Ri("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+Ue.DefaultDelimiter+"'"),Qr=!1),z.skipEmptyLines&&(Qe.data=Qe.data.filter(function(Ne){return!ct(Ne)})),Nt()&&function Lr(){if(Qe)if(Array.isArray(Qe.data[0])){for(var Ve=0;Nt()&&Ve<Qe.data.length;Ve++)Qe.data[Ve].forEach(Ne);Qe.data.splice(0,1)}else Qe.data.forEach(Ne);function Ne(et,Ht){bt(z.transformHeader)&&(et=z.transformHeader(et,Ht)),He.push(et)}}(),function vt(){if(!Qe||!z.header&&!z.dynamicTyping&&!z.transform)return Qe;function Ne(et,Ht){var At,Me=z.header?{}:[];for(At=0;At<et.length;At++){var mr=At,Wt=et[At];z.header&&(mr=At>=He.length?"__parsed_extra":He[At]),z.transform&&(Wt=z.transform(Wt,mr)),Wt=ii(mr,Wt),"__parsed_extra"===mr?(Me[mr]=Me[mr]||[],Me[mr].push(Wt)):Me[mr]=Wt}return z.header&&(At>He.length?Ri("FieldMismatch","TooManyFields","Too many fields: expected "+He.length+" fields but parsed "+At,De+Ht):At<He.length&&Ri("FieldMismatch","TooFewFields","Too few fields: expected "+He.length+" fields but parsed "+At,De+Ht)),Me}var Ve=1;return!Qe.data.length||Array.isArray(Qe.data[0])?(Qe.data=Qe.data.map(Ne),Ve=Qe.data.length):Qe.data=Ne(Qe.data,0),z.header&&Qe.meta&&(Qe.meta.fields=He),De+=Ve,Qe}()}function Nt(){return z.header&&0===He.length}function ii(Ne,Ve){return function pr(Ne){return z.dynamicTypingFunction&&void 0===z.dynamicTyping[Ne]&&(z.dynamicTyping[Ne]=z.dynamicTypingFunction(Ne)),!0===(z.dynamicTyping[Ne]||z.dynamicTyping)}(Ne)?"true"===Ve||"TRUE"===Ve||"false"!==Ve&&"FALSE"!==Ve&&(function dt(Ne){if(Te.test(Ne)){var Ve=parseFloat(Ne);if(Ve>fe&&Ve<W)return!0}return!1}(Ve)?parseFloat(Ve):Ie.test(Ve)?new Date(Ve):""===Ve?null:Ve):Ve}function Ri(Ne,Ve,et,Ht){var Me={type:Ne,code:Ve,message:et};void 0!==Ht&&(Me.row=Ht),Qe.errors.push(Me)}this.parse=function(Ne,Ve,et){if(z.newline||(z.newline=this.guessLineEndings(Ne,z.quoteChar||'"')),Qr=!1,z.delimiter)bt(z.delimiter)&&(z.delimiter=z.delimiter(Ne),Qe.meta.delimiter=z.delimiter);else{var Me=function Wi(Ne,Ve,et,Ht,Me){var At,mr,Wt,ci;Me=Me||[",","\t","|",";",Ue.RECORD_SEP,Ue.UNIT_SEP];for(var at=0;at<Me.length;at++){var yn=Me[at],di=0,Or=0,Gt=0;Wt=void 0;for(var si=new ta({comments:Ht,delimiter:yn,newline:Ve,preview:10}).parse(Ne),Ut=0;Ut<si.data.length;Ut++)if(et&&ct(si.data[Ut]))Gt++;else{var Pr=si.data[Ut].length;Or+=Pr,typeof Wt>"u"?Wt=Pr:Pr>0&&(di+=Math.abs(Pr-Wt),Wt=Pr)}si.data.length>0&&(Or/=si.data.length-Gt),(typeof mr>"u"||di<=mr)&&(typeof ci>"u"||Or>ci)&&Or>1.99&&(mr=di,At=yn,ci=Or)}return z.delimiter=At,{successful:!!At,bestDelimiter:At}}(Ne,z.newline,z.skipEmptyLines,z.comments,z.delimitersToGuess);Me.successful?z.delimiter=Me.bestDelimiter:(Qr=!0,z.delimiter=Ue.DefaultDelimiter),Qe.meta.delimiter=z.delimiter}var At=uo(z);return z.preview&&z.header&&At.preview++,nt=Ne,Dt=new ta(At),Qe=Dt.parse(nt,Ve,et),Bt(),Xt?{meta:{paused:!0}}:Qe||{meta:{paused:!1}}},this.paused=function(){return Xt},this.pause=function(){Xt=!0,Dt.abort(),nt=bt(z.chunk)?"":nt.substring(Dt.getCharIndex())},this.resume=function(){Ye.streamer._halted?(Xt=!1,Ye.streamer.parseChunk(nt,!0)):setTimeout(Ye.resume,3)},this.aborted=function(){return $e},this.abort=function(){$e=!0,Dt.abort(),Qe.meta.aborted=!0,bt(z.complete)&&z.complete(Qe),nt=""},this.guessLineEndings=function(Ne,Ve){Ne=Ne.substring(0,1048576);var et=new RegExp(bn(Ve)+"([^]*?)"+bn(Ve),"gm"),Ht=(Ne=Ne.replace(et,"")).split("\r"),Me=Ne.split("\n");if(1===Ht.length||Me.length>1&&Me[0].length<Ht[0].length)return"\n";for(var mr=0,Wt=0;Wt<Ht.length;Wt++)"\n"===Ht[Wt][0]&&mr++;return mr>=Ht.length/2?"\r\n":"\r"}}function bn(z){return z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ta(z){var De,W=(z=z||{}).delimiter,fe=z.newline,Te=z.comments,Ie=z.step,Ye=z.preview,Oe=z.fastMode,nt=null,Dt=!1,Xt=De=null==z.quoteChar?'"':z.quoteChar;if(void 0!==z.escapeChar&&(Xt=z.escapeChar),("string"!=typeof W||Ue.BAD_DELIMITERS.indexOf(W)>-1)&&(W=","),Te===W)throw new Error("Comment character same as delimiter");!0===Te?Te="#":("string"!=typeof Te||Ue.BAD_DELIMITERS.indexOf(Te)>-1)&&(Te=!1),"\n"!==fe&&"\r"!==fe&&"\r\n"!==fe&&(fe="\n");var $e=0,Qr=!1;this.parse=function(He,Qe,Cs){if("string"!=typeof He)throw new Error("Input must be a string");var ct=He.length,dt=W.length,Bt=fe.length,Nt=Te.length,Lr=bt(Ie);$e=0;var pr=[],ii=[],vt=[],Wi=0;if(!He)return Gt();if(Oe||!1!==Oe&&-1===He.indexOf(De)){for(var Ri=He.split(fe),Ne=0;Ne<Ri.length;Ne++){if($e+=(vt=Ri[Ne]).length,Ne!==Ri.length-1)$e+=fe.length;else if(Cs)return Gt();if(!Te||vt.substring(0,Nt)!==Te){if(Lr){if(pr=[],at(vt.split(W)),si(),Qr)return Gt()}else at(vt.split(W));if(Ye&&Ne>=Ye)return pr=pr.slice(0,Ye),Gt(!0)}}return Gt()}for(var Ve=He.indexOf(W,$e),et=He.indexOf(fe,$e),Ht=new RegExp(bn(Xt)+bn(De),"g"),Me=He.indexOf(De,$e);;)if(He[$e]!==De)if(Te&&0===vt.length&&He.substring($e,$e+Nt)===Te){if(-1===et)return Gt();et=He.indexOf(fe,$e=et+Bt),Ve=He.indexOf(W,$e)}else if(-1!==Ve&&(Ve<et||-1===et))vt.push(He.substring($e,Ve)),Ve=He.indexOf(W,$e=Ve+dt);else{if(-1===et)break;if(vt.push(He.substring($e,et)),Or(et+Bt),Lr&&(si(),Qr))return Gt();if(Ye&&pr.length>=Ye)return Gt(!0)}else for(Me=$e,$e++;;){if(-1===(Me=He.indexOf(De,Me+1)))return Cs||ii.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:pr.length,index:$e}),di();if(Me===ct-1)return di(He.substring($e,Me).replace(Ht,De));if(De!==Xt||He[Me+1]!==Xt){if(De===Xt||0===Me||He[Me-1]!==Xt){-1!==Ve&&Ve<Me+1&&(Ve=He.indexOf(W,Me+1)),-1!==et&&et<Me+1&&(et=He.indexOf(fe,Me+1));var Wt=yn(-1===et?Ve:Math.min(Ve,et));if(He.substr(Me+1+Wt,dt)===W){vt.push(He.substring($e,Me).replace(Ht,De)),$e=Me+1+Wt+dt,He[Me+1+Wt+dt]!==De&&(Me=He.indexOf(De,$e)),Ve=He.indexOf(W,$e),et=He.indexOf(fe,$e);break}var ci=yn(et);if(He.substring(Me+1+ci,Me+1+ci+Bt)===fe){if(vt.push(He.substring($e,Me).replace(Ht,De)),Or(Me+1+ci+Bt),Ve=He.indexOf(W,$e),Me=He.indexOf(De,$e),Lr&&(si(),Qr))return Gt();if(Ye&&pr.length>=Ye)return Gt(!0);break}ii.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:pr.length,index:$e}),Me++}}else Me++}return di();function at(Ut){pr.push(Ut),Wi=$e}function yn(Ut){var Pr=0;if(-1!==Ut){var ui=He.substring(Me+1,Ut);ui&&""===ui.trim()&&(Pr=ui.length)}return Pr}function di(Ut){return Cs||(typeof Ut>"u"&&(Ut=He.substring($e)),vt.push(Ut),$e=ct,at(vt),Lr&&si()),Gt()}function Or(Ut){$e=Ut,at(vt),vt=[],et=He.indexOf(fe,$e)}function Gt(Ut){if(z.header&&!Qe&&pr.length&&!Dt){const Pr=pr[0],ui=Object.create(null),ho=new Set(Pr);let En=!1;for(let Ui=0;Ui<Pr.length;Ui++){let Rt=Pr[Ui];if(bt(z.transformHeader)&&(Rt=z.transformHeader(Rt,Ui)),ui[Rt]){let vr,ia=ui[Rt];do{vr=`${Rt}_${ia}`,ia++}while(ho.has(vr));ho.add(vr),Pr[Ui]=vr,ui[Rt]++,En=!0,null===nt&&(nt={}),nt[vr]=Rt}else ui[Rt]=1,Pr[Ui]=Rt;ho.add(Rt)}En&&console.warn("Duplicate headers found and renamed."),Dt=!0}return{data:pr,errors:ii,meta:{delimiter:W,linebreak:fe,aborted:Qr,truncated:!!Ut,cursor:Wi+(Qe||0),renamedHeaders:nt}}}function si(){Ie(Gt()),pr=[],ii=[]}},this.abort=function(){Qr=!0},this.getCharIndex=function(){return $e}}function Xr(z){var W=z.data,fe=Ns[W.workerId],Te=!1;if(W.error)fe.userError(W.error,W.file);else if(W.results&&W.results.data){var Ye={abort:function(){Te=!0,co(W.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:ra,resume:ra};if(bt(fe.userStep)){for(var Oe=0;Oe<W.results.data.length&&(fe.userStep({data:W.results.data[Oe],errors:W.results.errors,meta:W.results.meta},Ye),!Te);Oe++);delete W.results}else bt(fe.userChunk)&&(fe.userChunk(W.results,Ye,W.file),delete W.results)}W.finished&&!Te&&co(W.workerId,W.results)}function co(z,W){var fe=Ns[z];bt(fe.userComplete)&&fe.userComplete(W),fe.terminate(),delete Ns[z]}function ra(){throw new Error("Not implemented.")}function uo(z){if("object"!=typeof z||null===z)return z;var W=Array.isArray(z)?[]:{};for(var fe in z)W[fe]=uo(z[fe]);return W}function Yr(z,W){return function(){z.apply(W,arguments)}}function bt(z){return"function"==typeof z}return pt&&(St.onmessage=function Qi(z){var W=z.data;if(typeof Ue.WORKER_ID>"u"&&W&&(Ue.WORKER_ID=W.workerId),"string"==typeof W.input)St.postMessage({workerId:Ue.WORKER_ID,results:Ue.parse(W.input,W.config),finished:!0});else if(St.File&&W.input instanceof File||W.input instanceof Object){var fe=Ue.parse(W.input,W.config);fe&&St.postMessage({workerId:Ue.WORKER_ID,results:fe,finished:!0})}}),(kr.prototype=Object.create(Rr.prototype)).constructor=kr,(mt.prototype=Object.create(Rr.prototype)).constructor=mt,(It.prototype=Object.create(It.prototype)).constructor=It,(Gs.prototype=Object.create(Rr.prototype)).constructor=Gs,typeof PAPA_BROWSER_CONTEXT>"u"&&((Vs.prototype=Object.create(Rr.prototype)).constructor=Vs),Ue},void 0!==(G=_r.apply(gd,[]))&&(sg.exports=G)},6266(){}}]);
|