From 669ebcc7fc3280e953af5bb6566f42239204479f Mon Sep 17 00:00:00 2001 From: Tung Nguyen Date: Mon, 23 Oct 2023 20:48:24 +0700 Subject: [PATCH] add save & save zip buttons --- .prettierrc | 4 +- javascript/agent-scheduler.iife.js | 60 +++++----- scripts/task_scheduler.py | 186 ++++++++++++++++++++++------- style.css | 2 +- ui/.eslintrc.cjs | 1 + ui/src/extension/index.scss | 34 ++++++ ui/src/extension/index.ts | 123 ++++++++++++------- 7 files changed, 291 insertions(+), 119 deletions(-) diff --git a/.prettierrc b/.prettierrc index e747179..aa9c162 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,8 +1,8 @@ { "singleQuote": true, "jsxSingleQuote": false, - "arrowParens": "always", - "trailingComma": "all", + "arrowParens": "avoid", + "trailingComma": "es5", "semi": true, "tabWidth": 2, "printWidth": 100 diff --git a/javascript/agent-scheduler.iife.js b/javascript/agent-scheduler.iife.js index 4ecada3..8637f4b 100644 --- a/javascript/agent-scheduler.iife.js +++ b/javascript/agent-scheduler.iife.js @@ -2,10 +2,10 @@ * @ag-grid-community/all-modules - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v30.0.6 * @link https://www.ag-grid.com/ * @license MIT - */function St(n){return n==null||n===""?null:n}function O(n,t){return t===void 0&&(t=!1),n!=null&&(n!==""||t)}function N(n){return!O(n)}function Pe(n){return n==null||n.length===0}function Ir(n){return n!=null&&typeof n.toString=="function"?n.toString():null}function Me(n){if(n!==void 0){if(n===null||n==="")return null;if(typeof n=="number")return isNaN(n)?void 0:n;var t=parseInt(n,10);return isNaN(t)?void 0:t}}function et(n){if(n!==void 0)return n===null||n===""?!1:typeof n=="boolean"?n:/true/i.test(n)}function Gu(n){if(!(n==null||n===""))return n}function Hu(n,t){return n==null&&t==null?!0:n==null&&t!=null||n!=null&&t==null?!1:n===t}function Vu(n,t){var e=n?JSON.stringify(n):null,r=t?JSON.stringify(t):null;return e===r}function Bu(n,t,e){e===void 0&&(e=!1);var r=n==null,o=t==null;if(n&&n.toNumber&&(n=n.toNumber()),t&&t.toNumber&&(t=t.toNumber()),r&&o)return 0;if(r)return-1;if(o)return 1;function i(s,a){return s>a?1:s=0)){var i=e[o],s=wo(i)&&i.constructor===Object;s?r[o]=mo(i):r[o]=i}}),r}}function Vs(n,t){return n[t]}function Bs(n,t,e){n[t]=e}function Uu(n,t){for(var e=[],r=2;r1;)if(o=o[r.shift()],o==null)return e;var i=o[r[0]];return i??e}function Ku(n,t,e){if(n!=null){var r=t.split("."),o=n;r.forEach(function(i,s){o[i]||(o[i]={}),sa?1:s=0)){var i=e[o],s=wo(i)&&i.constructor===Object;s?r[o]=mo(i):r[o]=i}}),r}}function Vs(n,t){return n[t]}function Bs(n,t,e){n[t]=e}function Uu(n,t){for(var e=[],r=2;r1;)if(o=o[r.shift()],o==null)return e;var i=o[r[0]];return i??e}function Ku(n,t,e){if(n!=null){var r=t.split("."),o=n;r.forEach(function(i,s){o[i]||(o[i]={}),s0&&window.setTimeout(function(){return n.forEach(function(e){return e()})},t)}function rt(n,t){var e;return function(){for(var r=[],o=0;oe;(n()||l)&&(t(),s=!0,i!=null&&(window.clearInterval(i),i=null),l&&r&&console.warn(r))};a(),s||(i=window.setInterval(a,10))}function qu(){for(var n=[],t=0;t0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Ys=function(n,t){for(var e=0,r=t.length,o=n.length;e0&&window.setTimeout(function(){return n.forEach(function(e){return e()})},t)}function rt(n,t){var e;return function(){for(var r=[],o=0;oe;(n()||l)&&(t(),s=!0,i!=null&&(window.clearInterval(i),i=null),l&&r&&console.warn(r))};a(),s||(i=window.setInterval(a,10))}function qu(){for(var n=[],t=0;t0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Ys=function(n,t){for(var e=0,r=t.length,o=n.length;e<\/script> @@ -20,13 +20,13 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`}else s="AG import 'ag-grid-enterprise'; -For more info see: https://www.ag-grid.com/javascript-grid/packages/`;return z(function(){console.warn(s)},i),!1},n.__isRegistered=function(t,e){var r;return!!n.globalModulesMap[t]||!!(!((r=n.gridModulesMap[e])===null||r===void 0)&&r[t])},n.__getRegisteredModules=function(t){return Ys(Ys([],Nr($t(n.globalModulesMap))),Nr($t(n.gridModulesMap[t]||{})))},n.__getGridRegisteredModules=function(t){var e;return $t((e=n.gridModulesMap[t])!==null&&e!==void 0?e:{})||[]},n.__isPackageBased=function(){return!n.moduleBased},n.globalModulesMap={},n.gridModulesMap={},n.areGridScopedModules=!1,n}(),Ju=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Zu=function(n,t){for(var e=0,r=t.length,o=n.length;e> creating ag-Application Context"),this.createBeans();var r=this.getBeanInstances();this.wireBeans(r),this.logger.log(">> ag-Application Context ready - component is alive")}}return n.prototype.getBeanInstances=function(){return $t(this.beanWrappers).map(function(t){return t.beanInstance})},n.prototype.createBean=function(t,e){if(!t)throw Error("Can't wire to bean since it is null");return this.wireBeans([t],e),t},n.prototype.wireBeans=function(t,e){this.autoWireBeans(t),this.methodWireBeans(t),this.callLifeCycleMethods(t,"preConstructMethods"),O(e)&&t.forEach(e),this.callLifeCycleMethods(t,"postConstructMethods")},n.prototype.createBeans=function(){var t=this;this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),J(this.beanWrappers,function(r,o){var i;o.bean.__agBeanMetaData&&o.bean.__agBeanMetaData.autowireMethods&&o.bean.__agBeanMetaData.autowireMethods.agConstructor&&(i=o.bean.__agBeanMetaData.autowireMethods.agConstructor);var s=t.getBeansForParameters(i,o.bean.name),a=new(o.bean.bind.apply(o.bean,Zu([null],Ju(s))));o.beanInstance=a});var e=Object.keys(this.beanWrappers).join(", ");this.logger.log("created beans: "+e)},n.prototype.createBeanWrapper=function(t){var e=t.__agBeanMetaData;if(!e){var r=void 0;t.prototype.constructor?r=So(t.prototype.constructor):r=""+t,console.error("Context item "+r+" is not a bean");return}var o={bean:t,beanInstance:null,beanName:e.beanName};this.beanWrappers[e.beanName]=o},n.prototype.autoWireBeans=function(t){var e=this;t.forEach(function(r){e.forEachMetaDataInHierarchy(r,function(o,i){var s=o.agClassAttributes;s&&s.forEach(function(a){var l=e.lookupBeanInstance(i,a.beanName,a.optional);r[a.attributeName]=l})})})},n.prototype.methodWireBeans=function(t){var e=this;t.forEach(function(r){e.forEachMetaDataInHierarchy(r,function(o,i){J(o.autowireMethods,function(s,a){if(s!=="agConstructor"){var l=e.getBeansForParameters(a,i);r[s].apply(r,l)}})})})},n.prototype.forEachMetaDataInHierarchy=function(t,e){for(var r=Object.getPrototypeOf(t);r!=null;){var o=r.constructor;if(o.hasOwnProperty("__agBeanMetaData")){var i=o.__agBeanMetaData,s=this.getBeanName(o);e(i,s)}r=Object.getPrototypeOf(r)}},n.prototype.getBeanName=function(t){if(t.__agBeanMetaData&&t.__agBeanMetaData.beanName)return t.__agBeanMetaData.beanName;var e=t.toString(),r=e.substring(9,e.indexOf("("));return r},n.prototype.getBeansForParameters=function(t,e){var r=this,o=[];return t&&J(t,function(i,s){var a=r.lookupBeanInstance(e,s);o[Number(i)]=a}),o},n.prototype.lookupBeanInstance=function(t,e,r){if(r===void 0&&(r=!1),this.destroyed)return this.logger.log("AG Grid: bean reference "+e+" is used after the grid is destroyed!"),null;if(e==="context")return this;if(this.contextParams.providedBeanInstances&&this.contextParams.providedBeanInstances.hasOwnProperty(e))return this.contextParams.providedBeanInstances[e];var o=this.beanWrappers[e];return o?o.beanInstance:(r||console.error("AG Grid: unable to find bean reference "+e+" while initialising "+t),null)},n.prototype.callLifeCycleMethods=function(t,e){var r=this;t.forEach(function(o){return r.callLifeCycleMethodsOnBean(o,e)})},n.prototype.callLifeCycleMethodsOnBean=function(t,e,r){var o={};this.forEachMetaDataInHierarchy(t,function(s){var a=s[e];a&&a.forEach(function(l){l!=r&&(o[l]=!0)})});var i=Object.keys(o);i.forEach(function(s){return t[s]()})},n.prototype.getBean=function(t){return this.lookupBeanInstance("getBean",t,!0)},n.prototype.destroy=function(){if(!this.destroyed){this.logger.log(">> Shutting down ag-Application Context");var t=this.getBeanInstances();this.destroyBeans(t),this.contextParams.providedBeanInstances=null,G.__unRegisterGridModules(this.contextParams.gridId),this.destroyed=!0,this.logger.log(">> ag-Application Context shut down - component is dead")}},n.prototype.destroyBean=function(t){t&&this.destroyBeans([t])},n.prototype.destroyBeans=function(t){var e=this;return t?(t.forEach(function(r){e.callLifeCycleMethodsOnBean(r,"preDestroyMethods","destroy");var o=r;typeof o.destroy=="function"&&o.destroy()}),[]):[]},n.prototype.isDestroyed=function(){return this.destroyed},n.prototype.getGridId=function(){return this.contextParams.gridId},n}();function qs(n,t,e){var r=Kt(n.constructor);r.preConstructMethods||(r.preConstructMethods=[]),r.preConstructMethods.push(t)}function P(n,t,e){var r=Kt(n.constructor);r.postConstructMethods||(r.postConstructMethods=[]),r.postConstructMethods.push(t)}function ae(n,t,e){var r=Kt(n.constructor);r.preDestroyMethods||(r.preDestroyMethods=[]),r.preDestroyMethods.push(t)}function x(n){return function(t){var e=Kt(t);e.beanName=n}}function h(n){return function(t,e,r){Qs(t,n,!1,t,e,null)}}function Y(n){return function(t,e,r){Qs(t,n,!0,t,e,null)}}function Qs(n,t,e,r,o,i){if(t===null){console.error("AG Grid: Autowired name should not be null");return}if(typeof i=="number"){console.error("AG Grid: Autowired should be on an attribute");return}var s=Kt(n.constructor);s.agClassAttributes||(s.agClassAttributes=[]),s.agClassAttributes.push({attributeName:o,beanName:t,optional:e})}function ye(n){return function(t,e,r){var o=typeof t=="function"?t:t.constructor,i;if(typeof r=="number"){var s=void 0;e?(i=Kt(o),s=e):(i=Kt(o),s="agConstructor"),i.autowireMethods||(i.autowireMethods={}),i.autowireMethods[s]||(i.autowireMethods[s]={}),i.autowireMethods[s][r]=n}}}function Kt(n){return n.hasOwnProperty("__agBeanMetaData")||(n.__agBeanMetaData={}),n.__agBeanMetaData}var Xs=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},_o=function(n,t){return function(e,r){t(e,r,n)}},Et=function(){function n(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}return n.prototype.setBeans=function(t,e,r,o){if(o===void 0&&(o=null),this.frameworkOverrides=r,this.gridOptionsService=e,o){var i=e.useAsyncEvents();this.addGlobalListener(o,i)}},n.prototype.getListeners=function(t,e,r){var o=e?this.allAsyncListeners:this.allSyncListeners,i=o.get(t);return!i&&r&&(i=new Set,o.set(t,i)),i},n.prototype.noRegisteredListenersExist=function(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0},n.prototype.addEventListener=function(t,e,r){r===void 0&&(r=!1),this.getListeners(t,r,!0).add(e)},n.prototype.removeEventListener=function(t,e,r){r===void 0&&(r=!1);var o=this.getListeners(t,r,!1);if(o&&(o.delete(e),o.size===0)){var i=r?this.allAsyncListeners:this.allSyncListeners;i.delete(t)}},n.prototype.addGlobalListener=function(t,e){e===void 0&&(e=!1),(e?this.globalAsyncListeners:this.globalSyncListeners).add(t)},n.prototype.removeGlobalListener=function(t,e){e===void 0&&(e=!1),(e?this.globalAsyncListeners:this.globalSyncListeners).delete(t)},n.prototype.dispatchEvent=function(t){var e=t;if(this.gridOptionsService){var r=this.gridOptionsService,o=r.api,i=r.columnApi,s=r.context;e.api=o,e.columnApi=i,e.context=s}this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0},n.prototype.dispatchEventOnce=function(t){this.firedEvents[t.type]||this.dispatchEvent(t)},n.prototype.dispatchToListeners=function(t,e){var r=this,o=t.type;if(e&&"event"in t){var i=t.event;i instanceof Event&&(t.eventPath=i.composedPath())}var s=function(u){return u.forEach(function(c){e?r.dispatchAsync(function(){return c(t)}):c(t)})},a=new Set(this.getListeners(o,e,!1));a&&s(a);var l=new Set(e?this.globalAsyncListeners:this.globalSyncListeners);l.forEach(function(u){e?r.dispatchAsync(function(){return r.frameworkOverrides.dispatchEvent(o,function(){return u(o,t)},!0)}):r.frameworkOverrides.dispatchEvent(o,function(){return u(o,t)},!0)})},n.prototype.dispatchAsync=function(t){this.asyncFunctionsQueue.push(t),this.scheduled||(window.setTimeout(this.flushAsyncQueue.bind(this),0),this.scheduled=!0)},n.prototype.flushAsyncQueue=function(){this.scheduled=!1;var t=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],t.forEach(function(e){return e()})},Xs([_o(0,ye("loggerFactory")),_o(1,ye("gridOptionsService")),_o(2,ye("frameworkOverrides")),_o(3,ye("globalEventListener"))],n.prototype,"setBeans",null),n=Xs([x("eventService")],n),n}(),Ro=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Js=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Zs=function(n,t){for(var e=0,r=t.length,o=n.length;e=0&&!t,this.tooltipFieldContainsDots=O(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!t},n.prototype.initMinAndMaxWidths=function(){var t=this.colDef;this.minWidth=this.columnUtils.calculateColMinWidth(t),this.maxWidth=this.columnUtils.calculateColMaxWidth(t)},n.prototype.initTooltip=function(){this.tooltipEnabled=O(this.colDef.tooltipField)||O(this.colDef.tooltipValueGetter)||O(this.colDef.tooltipComponent)},n.prototype.resetActualWidth=function(t){t===void 0&&(t="api");var e=this.columnUtils.calculateColInitialWidth(this.colDef);this.setActualWidth(e,t,!0)},n.prototype.isEmptyGroup=function(){return!1},n.prototype.isRowGroupDisplayed=function(t){if(N(this.colDef)||N(this.colDef.showRowGroup))return!1;var e=this.colDef.showRowGroup===!0,r=this.colDef.showRowGroup===t;return e||r},n.prototype.isPrimary=function(){return this.primary},n.prototype.isFilterAllowed=function(){var t=!!this.colDef.filter;return t},n.prototype.isFieldContainsDots=function(){return this.fieldContainsDots},n.prototype.isTooltipEnabled=function(){return this.tooltipEnabled},n.prototype.isTooltipFieldContainsDots=function(){return this.tooltipFieldContainsDots},n.prototype.validate=function(){var t=this.colDef;function e(u,c,p){z(function(){p?console.warn(u,p):z(function(){return console.warn(u)},c)},c)}var r=this.gridOptionsService.isRowModelType("clientSide");if(r&&!G.__isRegistered(L.RowGroupingModule,this.gridOptionsService.getGridId())){var o=["enableRowGroup","rowGroup","rowGroupIndex","enablePivot","enableValue","pivot","pivotIndex","aggFunc"],i=o.filter(function(u){return O(t[u])});i.length>0&&G.__assertRegistered(L.RowGroupingModule,i.map(function(u){return"colDef."+u}).join(", "),this.gridOptionsService.getGridId())}if((this.colDef.cellEditor==="agRichSelect"||this.colDef.cellEditor==="agRichSelectCellEditor")&&G.__assertRegistered(L.RichSelectModule,this.colDef.cellEditor,this.gridOptionsService.getGridId()),this.gridOptionsService.isTreeData()){var s=["rowGroup","rowGroupIndex","pivot","pivotIndex"],i=s.filter(function(c){return O(t[c])});i.length>0&&e("AG Grid: "+i.join()+" is not possible when doing tree data, your column definition should not have "+i.join(),"TreeDataCannotRowGroup")}if(O(t.menuTabs))if(Array.isArray(t.menuTabs)){var a=["filterMenuTab"],l=["columnsMenuTab","generalMenuTab"],i=l.filter(function(c){return t.menuTabs.includes(c)});i.length>0&&G.__assertRegistered(L.MenuModule,"menuTab(s): "+i.map(function(c){return"'"+c+"'"}).join(),this.gridOptionsService.getGridId()),t.menuTabs.forEach(function(c){!l.includes(c)&&!a.includes(c)&&e("AG Grid: '"+c+"' is not valid for 'colDef.menuTabs'. Valid values are: "+Zs(Zs([],Js(a)),Js(l)).map(function(p){return"'"+p+"'"}).join()+".","wrongValue_menuTabs_"+c)})}else e("AG Grid: The typeof 'colDef.menuTabs' should be an array not:"+typeof t.menuTabs,"wrongType_menuTabs");O(t.columnsMenuParams)&&G.__assertRegistered(L.MenuModule,"columnsMenuParams",this.gridOptionsService.getGridId()),O(t.columnsMenuParams)&&G.__assertRegistered(L.ColumnsToolPanelModule,"columnsMenuParams",this.gridOptionsService.getGridId()),O(this.colDef.width)&&typeof this.colDef.width!="number"&&e("AG Grid: colDef.width should be a number, not "+typeof this.colDef.width,"ColumnCheck"),O(t.columnGroupShow)&&t.columnGroupShow!=="closed"&&t.columnGroupShow!=="open"&&e("AG Grid: '"+t.columnGroupShow+"' is not valid for columnGroupShow. Valid values are 'open', 'closed', undefined, null","columnGroupShow_invalid")},n.prototype.addEventListener=function(t,e){this.eventService.addEventListener(t,e)},n.prototype.removeEventListener=function(t,e){this.eventService.removeEventListener(t,e)},n.prototype.createColumnFunctionCallbackParams=function(t){return{node:t,data:t.data,column:this,colDef:this.colDef,context:this.gridOptionsService.context,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi}},n.prototype.isSuppressNavigable=function(t){if(typeof this.colDef.suppressNavigable=="boolean")return this.colDef.suppressNavigable;if(typeof this.colDef.suppressNavigable=="function"){var e=this.createColumnFunctionCallbackParams(t),r=this.colDef.suppressNavigable;return r(e)}return!1},n.prototype.isCellEditable=function(t){return t.group&&!this.gridOptionsService.is("enableGroupEdit")?!1:this.isColumnFunc(t,this.colDef.editable)},n.prototype.isSuppressFillHandle=function(){return!!et(this.colDef.suppressFillHandle)},n.prototype.isAutoHeight=function(){return!!et(this.colDef.autoHeight)},n.prototype.isAutoHeaderHeight=function(){return!!et(this.colDef.autoHeaderHeight)},n.prototype.isRowDrag=function(t){return this.isColumnFunc(t,this.colDef.rowDrag)},n.prototype.isDndSource=function(t){return this.isColumnFunc(t,this.colDef.dndSource)},n.prototype.isCellCheckboxSelection=function(t){return this.isColumnFunc(t,this.colDef.checkboxSelection)},n.prototype.isSuppressPaste=function(t){return this.isColumnFunc(t,this.colDef?this.colDef.suppressPaste:null)},n.prototype.isResizable=function(){return!!et(this.colDef.resizable)},n.prototype.isColumnFunc=function(t,e){if(typeof e=="boolean")return e;if(typeof e=="function"){var r=this.createColumnFunctionCallbackParams(t),o=e;return o(r)}return!1},n.prototype.setMoving=function(t,e){e===void 0&&(e="api"),this.moving=t,this.eventService.dispatchEvent(this.createColumnEvent("movingChanged",e))},n.prototype.createColumnEvent=function(t,e){return{type:t,column:this,columns:[this],source:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context}},n.prototype.isMoving=function(){return this.moving},n.prototype.getSort=function(){return this.sort},n.prototype.setSort=function(t,e){e===void 0&&(e="api"),this.sort!==t&&(this.sort=t,this.eventService.dispatchEvent(this.createColumnEvent("sortChanged",e))),this.dispatchStateUpdatedEvent("sort")},n.prototype.setMenuVisible=function(t,e){e===void 0&&(e="api"),this.menuVisible!==t&&(this.menuVisible=t,this.eventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",e)))},n.prototype.isMenuVisible=function(){return this.menuVisible},n.prototype.isSortAscending=function(){return this.sort==="asc"},n.prototype.isSortDescending=function(){return this.sort==="desc"},n.prototype.isSortNone=function(){return N(this.sort)},n.prototype.isSorting=function(){return O(this.sort)},n.prototype.getSortIndex=function(){return this.sortIndex},n.prototype.setSortIndex=function(t){this.sortIndex=t,this.dispatchStateUpdatedEvent("sortIndex")},n.prototype.setAggFunc=function(t){this.aggFunc=t,this.dispatchStateUpdatedEvent("aggFunc")},n.prototype.getAggFunc=function(){return this.aggFunc},n.prototype.getLeft=function(){return this.left},n.prototype.getOldLeft=function(){return this.oldLeft},n.prototype.getRight=function(){return this.left+this.actualWidth},n.prototype.setLeft=function(t,e){e===void 0&&(e="api"),this.oldLeft=this.left,this.left!==t&&(this.left=t,this.eventService.dispatchEvent(this.createColumnEvent("leftChanged",e)))},n.prototype.isFilterActive=function(){return this.filterActive},n.prototype.setFilterActive=function(t,e,r){e===void 0&&(e="api"),this.filterActive!==t&&(this.filterActive=t,this.eventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",e)));var o=this.createColumnEvent("filterChanged",e);r&&De(o,r),this.eventService.dispatchEvent(o)},n.prototype.isHovered=function(){return this.columnHoverService.isHovered(this)},n.prototype.setPinned=function(t){t===!0||t==="left"?this.pinned="left":t==="right"?this.pinned="right":this.pinned=null,this.dispatchStateUpdatedEvent("pinned")},n.prototype.setFirstRightPinned=function(t,e){e===void 0&&(e="api"),this.firstRightPinned!==t&&(this.firstRightPinned=t,this.eventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",e)))},n.prototype.setLastLeftPinned=function(t,e){e===void 0&&(e="api"),this.lastLeftPinned!==t&&(this.lastLeftPinned=t,this.eventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",e)))},n.prototype.isFirstRightPinned=function(){return this.firstRightPinned},n.prototype.isLastLeftPinned=function(){return this.lastLeftPinned},n.prototype.isPinned=function(){return this.pinned==="left"||this.pinned==="right"},n.prototype.isPinnedLeft=function(){return this.pinned==="left"},n.prototype.isPinnedRight=function(){return this.pinned==="right"},n.prototype.getPinned=function(){return this.pinned},n.prototype.setVisible=function(t,e){e===void 0&&(e="api");var r=t===!0;this.visible!==r&&(this.visible=r,this.eventService.dispatchEvent(this.createColumnEvent("visibleChanged",e))),this.dispatchStateUpdatedEvent("hide")},n.prototype.isVisible=function(){return this.visible},n.prototype.isSpanHeaderHeight=function(){var t=this.getColDef();return!t.suppressSpanHeaderHeight&&!t.autoHeaderHeight},n.prototype.getColDef=function(){return this.colDef},n.prototype.getColumnGroupShow=function(){return this.colDef.columnGroupShow},n.prototype.getColId=function(){return this.colId},n.prototype.getId=function(){return this.colId},n.prototype.getUniqueId=function(){return this.colId},n.prototype.getDefinition=function(){return this.colDef},n.prototype.getActualWidth=function(){return this.actualWidth},n.prototype.getAutoHeaderHeight=function(){return this.autoHeaderHeight},n.prototype.setAutoHeaderHeight=function(t){var e=t!==this.autoHeaderHeight;return this.autoHeaderHeight=t,e},n.prototype.createBaseColDefParams=function(t){var e={node:t,data:t.data,colDef:this.colDef,column:this,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};return e},n.prototype.getColSpan=function(t){if(N(this.colDef.colSpan))return 1;var e=this.createBaseColDefParams(t),r=this.colDef.colSpan(e);return Math.max(r,1)},n.prototype.getRowSpan=function(t){if(N(this.colDef.rowSpan))return 1;var e=this.createBaseColDefParams(t),r=this.colDef.rowSpan(e);return Math.max(r,1)},n.prototype.setActualWidth=function(t,e,r){e===void 0&&(e="api"),r===void 0&&(r=!1),this.minWidth!=null&&(t=Math.max(t,this.minWidth)),this.maxWidth!=null&&(t=Math.min(t,this.maxWidth)),this.actualWidth!==t&&(this.actualWidth=t,this.flex&&e!=="flex"&&e!=="gridInitializing"&&(this.flex=null),r||this.fireColumnWidthChangedEvent(e)),this.dispatchStateUpdatedEvent("width")},n.prototype.fireColumnWidthChangedEvent=function(t){this.eventService.dispatchEvent(this.createColumnEvent("widthChanged",t))},n.prototype.isGreaterThanMax=function(t){return this.maxWidth!=null?t>this.maxWidth:!1},n.prototype.getMinWidth=function(){return this.minWidth},n.prototype.getMaxWidth=function(){return this.maxWidth},n.prototype.getFlex=function(){return this.flex||0},n.prototype.setFlex=function(t){this.flex!==t&&(this.flex=t),this.dispatchStateUpdatedEvent("flex")},n.prototype.setMinimum=function(t){t===void 0&&(t="api"),O(this.minWidth)&&this.setActualWidth(this.minWidth,t)},n.prototype.setRowGroupActive=function(t,e){e===void 0&&(e="api"),this.rowGroupActive!==t&&(this.rowGroupActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",e))),this.dispatchStateUpdatedEvent("rowGroup")},n.prototype.isRowGroupActive=function(){return this.rowGroupActive},n.prototype.setPivotActive=function(t,e){e===void 0&&(e="api"),this.pivotActive!==t&&(this.pivotActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",e))),this.dispatchStateUpdatedEvent("pivot")},n.prototype.isPivotActive=function(){return this.pivotActive},n.prototype.isAnyFunctionActive=function(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()},n.prototype.isAnyFunctionAllowed=function(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()},n.prototype.setValueActive=function(t,e){e===void 0&&(e="api"),this.aggregationActive!==t&&(this.aggregationActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnValueChanged",e)))},n.prototype.isValueActive=function(){return this.aggregationActive},n.prototype.isAllowPivot=function(){return this.colDef.enablePivot===!0},n.prototype.isAllowValue=function(){return this.colDef.enableValue===!0},n.prototype.isAllowRowGroup=function(){return this.colDef.enableRowGroup===!0},n.prototype.getMenuTabs=function(t){var e=this.getColDef().menuTabs;return e==null&&(e=t),e},n.prototype.dispatchStateUpdatedEvent=function(t){this.eventService.dispatchEvent({type:n.EVENT_STATE_UPDATED,key:t})},n.EVENT_MOVING_CHANGED="movingChanged",n.EVENT_LEFT_CHANGED="leftChanged",n.EVENT_WIDTH_CHANGED="widthChanged",n.EVENT_LAST_LEFT_PINNED_CHANGED="lastLeftPinnedChanged",n.EVENT_FIRST_RIGHT_PINNED_CHANGED="firstRightPinnedChanged",n.EVENT_VISIBLE_CHANGED="visibleChanged",n.EVENT_FILTER_CHANGED="filterChanged",n.EVENT_FILTER_ACTIVE_CHANGED="filterActiveChanged",n.EVENT_SORT_CHANGED="sortChanged",n.EVENT_COL_DEF_CHANGED="colDefChanged",n.EVENT_MENU_VISIBLE_CHANGED="menuVisibleChanged",n.EVENT_ROW_GROUP_CHANGED="columnRowGroupChanged",n.EVENT_PIVOT_CHANGED="columnPivotChanged",n.EVENT_VALUE_CHANGED="columnValueChanged",n.EVENT_STATE_UPDATED="columnStateUpdated",Ro([h("gridOptionsService")],n.prototype,"gridOptionsService",void 0),Ro([h("columnUtils")],n.prototype,"columnUtils",void 0),Ro([h("columnHoverService")],n.prototype,"columnHoverService",void 0),Ro([P],n.prototype,"initialise",null),n}(),rc=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},re=function(){function n(t,e,r,o){this.localEventService=new Et,this.expandable=!1,this.instanceId=ea(),this.expandableListenerRemoveCallback=null,this.colGroupDef=t,this.groupId=e,this.expanded=!!t&&!!t.openByDefault,this.padding=r,this.level=o}return n.prototype.destroy=function(){this.expandableListenerRemoveCallback&&this.reset(null,void 0)},n.prototype.reset=function(t,e){this.colGroupDef=t,this.level=e,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0},n.prototype.getInstanceId=function(){return this.instanceId},n.prototype.setOriginalParent=function(t){this.originalParent=t},n.prototype.getOriginalParent=function(){return this.originalParent},n.prototype.getLevel=function(){return this.level},n.prototype.isVisible=function(){return this.children?this.children.some(function(t){return t.isVisible()}):!1},n.prototype.isPadding=function(){return this.padding},n.prototype.setExpanded=function(t){this.expanded=t===void 0?!1:t;var e={type:n.EVENT_EXPANDED_CHANGED};this.localEventService.dispatchEvent(e)},n.prototype.isExpandable=function(){return this.expandable},n.prototype.isExpanded=function(){return this.expanded},n.prototype.getGroupId=function(){return this.groupId},n.prototype.getId=function(){return this.getGroupId()},n.prototype.setChildren=function(t){this.children=t},n.prototype.getChildren=function(){return this.children},n.prototype.getColGroupDef=function(){return this.colGroupDef},n.prototype.getLeafColumns=function(){var t=[];return this.addLeafColumns(t),t},n.prototype.addLeafColumns=function(t){this.children&&this.children.forEach(function(e){e instanceof X?t.push(e):e instanceof n&&e.addLeafColumns(t)})},n.prototype.getColumnGroupShow=function(){var t=this.colGroupDef;if(t)return t.columnGroupShow},n.prototype.setupExpandable=function(){var t=this;this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();var e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(function(r){return r.addEventListener("visibleChanged",e)}),this.expandableListenerRemoveCallback=function(){t.getLeafColumns().forEach(function(r){return r.removeEventListener("visibleChanged",e)}),t.expandableListenerRemoveCallback=null}},n.prototype.setExpandable=function(){if(!this.isPadding()){for(var t=!1,e=!1,r=!1,o=this.findChildrenRemovingPadding(),i=0,s=o.length;i0}function Q(n){if(!(!n||!n.length))return n[n.length-1]}function _t(n,t,e){return n==null&&t==null?!0:n!=null&&t!=null&&n.length===t.length&&n.every(function(r,o){return e?e(r,t[o]):t[o]===r})}function nc(n,t){return _t(n,t)}function ra(n){return n.sort(function(t,e){return t-e})}function sc(n,t){if(n)for(var e=n.length-2;e>=0;e--){var r=n[e]===t,o=n[e+1]===t;r&&o&&n.splice(e+1,1)}}function fe(n,t){var e=n.indexOf(t);e>=0&&n.splice(e,1)}function Vi(n,t){t.forEach(function(e){return fe(n,e)})}function Gr(n,t,e){n.splice(e,0,t)}function ac(n,t,e){if(!(n==null||t==null))for(var r=t.length-1;r>=0;r--){var o=t[r];Gr(n,o,e)}}function Bi(n,t,e){Vi(n,t),t.slice().reverse().forEach(function(r){return Gr(n,r,e)})}function Ie(n,t){return n.indexOf(t)>-1}function oa(n){return[].concat.apply([],n)}function Wi(n,t){t==null||n==null||t.forEach(function(e){return n.push(e)})}function lc(n){return n.map(Ir)}function uc(n,t){if(n!=null)for(var e=n.length-1;e>=0;e--)t(n[e],e)}var cc=Object.freeze({__proto__:null,firstExistingValue:ta,existsAndNotEmpty:ic,last:Q,areEqual:_t,shallowCompare:nc,sortNumerically:ra,removeRepeatsFromArray:sc,removeFromArray:fe,removeAllFromArray:Vi,insertIntoArray:Gr,insertArrayIntoArray:ac,moveInArray:Bi,includes:Ie,flatten:oa,pushAll:Wi,toStrings:lc,forEachReverse:uc}),ia="__ag_Grid_Stop_Propagation",pc=["touchstart","touchend","touchmove","touchcancel","scroll"],ji={};function ft(n){n[ia]=!0}function ot(n){return n[ia]===!0}var ki=function(){var n={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},t=function(e){if(typeof ji[e]=="boolean")return ji[e];var r=document.createElement(n[e]||"div");return e="on"+e,ji[e]=e in r};return t}();function Oo(n,t,e){for(var r=t;r;){var o=n.getDomData(r,e);if(o)return o;r=r.parentElement}return null}function To(n,t){return!t||!n?!1:sa(t).indexOf(n)>=0}function na(n){for(var t=[],e=n.target;e;)t.push(e),e=e.parentElement;return t}function sa(n){var t=n;return t.path?t.path:t.composedPath?t.composedPath():na(t)}function aa(n,t,e,r){var o=Ie(pc,e),i=o?{passive:!0}:void 0;n&&n.addEventListener&&n.addEventListener(t,e,r,i)}var dc=Object.freeze({__proto__:null,stopPropagationForAgGrid:ft,isStopPropagationForAgGrid:ot,isEventSupported:ki,getCtrlForEventTarget:Oo,isElementInEventPath:To,createEventPath:na,getEventPath:sa,addSafePassiveEventListener:aa}),Yt=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},T=function(){function n(){var t=this;this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.isAlive=function(){return!t.destroyed}}return n.prototype.getFrameworkOverrides=function(){return this.frameworkOverrides},n.prototype.getContext=function(){return this.context},n.prototype.destroy=function(){this.destroyFunctions.forEach(function(t){return t()}),this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchEvent({type:n.EVENT_DESTROYED})},n.prototype.addEventListener=function(t,e){this.localEventService||(this.localEventService=new Et),this.localEventService.addEventListener(t,e)},n.prototype.removeEventListener=function(t,e){this.localEventService&&this.localEventService.removeEventListener(t,e)},n.prototype.dispatchEventAsync=function(t){var e=this;window.setTimeout(function(){return e.dispatchEvent(t)},0)},n.prototype.dispatchEvent=function(t){this.localEventService&&this.localEventService.dispatchEvent(t)},n.prototype.addManagedListener=function(t,e,r){var o=this;if(!this.destroyed){t instanceof HTMLElement?aa(this.getFrameworkOverrides(),t,e,r):t.addEventListener(e,r);var i=function(){return t.removeEventListener(e,r),o.destroyFunctions=o.destroyFunctions.filter(function(s){return s!==i}),null};return this.destroyFunctions.push(i),i}},n.prototype.addManagedPropertyListener=function(t,e){var r=this;if(!this.destroyed){this.gridOptionsService.addEventListener(t,e);var o=function(){return r.gridOptionsService.removeEventListener(t,e),r.destroyFunctions=r.destroyFunctions.filter(function(i){return i!==o}),null};return this.destroyFunctions.push(o),o}},n.prototype.addDestroyFunc=function(t){this.isAlive()?this.destroyFunctions.push(t):t()},n.prototype.createManagedBean=function(t,e){var r=this.createBean(t,e);return this.addDestroyFunc(this.destroyBean.bind(this,t,e)),r},n.prototype.createBean=function(t,e,r){return(e||this.getContext()).createBean(t,r)},n.prototype.destroyBean=function(t,e){return(e||this.getContext()).destroyBean(t)},n.prototype.destroyBeans=function(t,e){var r=this;return t&&t.forEach(function(o){return r.destroyBean(o,e)}),[]},n.EVENT_DESTROYED="destroyed",Yt([h("frameworkOverrides")],n.prototype,"frameworkOverrides",void 0),Yt([h("context")],n.prototype,"context",void 0),Yt([h("eventService")],n.prototype,"eventService",void 0),Yt([h("gridOptionsService")],n.prototype,"gridOptionsService",void 0),Yt([h("localeService")],n.prototype,"localeService",void 0),Yt([h("environment")],n.prototype,"environment",void 0),Yt([ae],n.prototype,"destroy",null),n}(),hc=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Po=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},fc=function(n,t){return function(e,r){t(e,r,n)}},vc=function(n){hc(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.setBeans=function(e){this.logger=e.create("ColumnFactory")},t.prototype.createColumnTree=function(e,r,o){var i=new ju,s=this.extractExistingTreeData(o),a=s.existingCols,l=s.existingGroups,u=s.existingColKeys;i.addExistingKeys(u);var c=this.recursivelyCreateColumns(e,0,r,a,i,l),p=this.findMaxDept(c,0);this.logger.log("Number of levels for grouped columns is "+p);var d=this.balanceColumnTree(c,0,p,i),f=function(g,y){g instanceof re&&g.setupExpandable(),g.setOriginalParent(y)};return this.columnUtils.depthFirstOriginalTreeSearch(null,d,f),{columnTree:d,treeDept:p}},t.prototype.extractExistingTreeData=function(e){var r=[],o=[],i=[];return e&&this.columnUtils.depthFirstOriginalTreeSearch(null,e,function(s){if(s instanceof re){var a=s;o.push(a)}else{var l=s;i.push(l.getId()),r.push(l)}}),{existingCols:r,existingGroups:o,existingColKeys:i}},t.prototype.createForAutoGroups=function(e,r){var o=this;return e.map(function(i){return o.createAutoGroupTreeItem(r,i)})},t.prototype.createAutoGroupTreeItem=function(e,r){for(var o=this.findDepth(e),i=r,s=o-1;s>=0;s--){var a=new re(null,"FAKE_PATH_"+r.getId()+"}_"+s,!0,s);this.createBean(a),a.setChildren([i]),i.setOriginalParent(a),i=a}return i},t.prototype.findDepth=function(e){for(var r=0,o=e;o&&o[0]&&o[0]instanceof re;)r++,o=o[0].getChildren();return r},t.prototype.balanceColumnTree=function(e,r,o,i){for(var s=[],a=0;a=r;f--){var g=i.getUniqueKey(null,null),y=this.createMergedColGroupDef(null),m=new re(y,g,!0,r);this.createBean(m),d&&d.setChildren([m]),d=m,p||(p=d)}if(p&&d){s.push(p);var C=e.some(function(w){return w instanceof re});if(C){d.setChildren([l]);continue}else{d.setChildren(e);break}}s.push(l)}}return s},t.prototype.findMaxDept=function(e,r){for(var o=r,i=0;i=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},we=function(){function n(t,e,r,o){this.displayedChildren=[],this.localEventService=new Et,this.groupId=e,this.partId=r,this.providedColumnGroup=t,this.pinned=o}return n.createUniqueId=function(t,e){return t+"_"+e},n.prototype.reset=function(){this.parent=null,this.children=null,this.displayedChildren=null},n.prototype.getParent=function(){return this.parent},n.prototype.setParent=function(t){this.parent=t},n.prototype.getUniqueId=function(){return n.createUniqueId(this.groupId,this.partId)},n.prototype.isEmptyGroup=function(){return this.displayedChildren.length===0},n.prototype.isMoving=function(){var t=this.getProvidedColumnGroup().getLeafColumns();return!t||t.length===0?!1:t.every(function(e){return e.isMoving()})},n.prototype.checkLeft=function(){if(this.displayedChildren.forEach(function(o){o instanceof n&&o.checkLeft()}),this.displayedChildren.length>0)if(this.gridOptionsService.is("enableRtl")){var t=Q(this.displayedChildren),e=t.getLeft();this.setLeft(e)}else{var r=this.displayedChildren[0].getLeft();this.setLeft(r)}else this.setLeft(null)},n.prototype.getLeft=function(){return this.left},n.prototype.getOldLeft=function(){return this.oldLeft},n.prototype.setLeft=function(t){this.oldLeft=t,this.left!==t&&(this.left=t,this.localEventService.dispatchEvent(this.createAgEvent(n.EVENT_LEFT_CHANGED)))},n.prototype.getPinned=function(){return this.pinned},n.prototype.createAgEvent=function(t){return{type:t}},n.prototype.addEventListener=function(t,e){this.localEventService.addEventListener(t,e)},n.prototype.removeEventListener=function(t,e){this.localEventService.removeEventListener(t,e)},n.prototype.getGroupId=function(){return this.groupId},n.prototype.getPartId=function(){return this.partId},n.prototype.isChildInThisGroupDeepSearch=function(t){var e=!1;return this.children.forEach(function(r){t===r&&(e=!0),r instanceof n&&r.isChildInThisGroupDeepSearch(t)&&(e=!0)}),e},n.prototype.getActualWidth=function(){var t=0;return this.displayedChildren&&this.displayedChildren.forEach(function(e){t+=e.getActualWidth()}),t},n.prototype.isResizable=function(){if(!this.displayedChildren)return!1;var t=!1;return this.displayedChildren.forEach(function(e){e.isResizable()&&(t=!0)}),t},n.prototype.getMinWidth=function(){var t=0;return this.displayedChildren.forEach(function(e){t+=e.getMinWidth()||0}),t},n.prototype.addChild=function(t){this.children||(this.children=[]),this.children.push(t)},n.prototype.getDisplayedChildren=function(){return this.displayedChildren},n.prototype.getLeafColumns=function(){var t=[];return this.addLeafColumns(t),t},n.prototype.getDisplayedLeafColumns=function(){var t=[];return this.addDisplayedLeafColumns(t),t},n.prototype.getDefinition=function(){return this.providedColumnGroup.getColGroupDef()},n.prototype.getColGroupDef=function(){return this.providedColumnGroup.getColGroupDef()},n.prototype.isPadding=function(){return this.providedColumnGroup.isPadding()},n.prototype.isExpandable=function(){return this.providedColumnGroup.isExpandable()},n.prototype.isExpanded=function(){return this.providedColumnGroup.isExpanded()},n.prototype.setExpanded=function(t){this.providedColumnGroup.setExpanded(t)},n.prototype.addDisplayedLeafColumns=function(t){this.displayedChildren.forEach(function(e){e instanceof X?t.push(e):e instanceof n&&e.addDisplayedLeafColumns(t)})},n.prototype.addLeafColumns=function(t){this.children.forEach(function(e){e instanceof X?t.push(e):e instanceof n&&e.addLeafColumns(t)})},n.prototype.getChildren=function(){return this.children},n.prototype.getColumnGroupShow=function(){return this.providedColumnGroup.getColumnGroupShow()},n.prototype.getProvidedColumnGroup=function(){return this.providedColumnGroup},n.prototype.getPaddingLevel=function(){var t=this.getParent();return!this.isPadding()||!t||!t.isPadding()?0:1+t.getPaddingLevel()},n.prototype.calculateDisplayedColumns=function(){var t=this;this.displayedChildren=[];for(var e=this;e!=null&&e.isPadding();)e=e.getParent();var r=e?e.providedColumnGroup.isExpandable():!1;if(!r){this.displayedChildren=this.children,this.localEventService.dispatchEvent(this.createAgEvent(n.EVENT_DISPLAYED_CHILDREN_CHANGED));return}this.children.forEach(function(o){var i=o instanceof n&&(!o.displayedChildren||!o.displayedChildren.length);if(!i){var s=o.getColumnGroupShow();switch(s){case"open":e.providedColumnGroup.isExpanded()&&t.displayedChildren.push(o);break;case"closed":e.providedColumnGroup.isExpanded()||t.displayedChildren.push(o);break;default:t.displayedChildren.push(o);break}}}),this.localEventService.dispatchEvent(this.createAgEvent(n.EVENT_DISPLAYED_CHILDREN_CHANGED))},n.EVENT_LEFT_CHANGED="leftChanged",n.EVENT_DISPLAYED_CHILDREN_CHANGED="displayedChildrenChanged",gc([h("gridOptionsService")],n.prototype,"gridOptionsService",void 0),n}(),v=function(){function n(){}return n.EVENT_COLUMN_EVERYTHING_CHANGED="columnEverythingChanged",n.EVENT_NEW_COLUMNS_LOADED="newColumnsLoaded",n.EVENT_COLUMN_PIVOT_MODE_CHANGED="columnPivotModeChanged",n.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged",n.EVENT_EXPAND_COLLAPSE_ALL="expandOrCollapseAll",n.EVENT_COLUMN_PIVOT_CHANGED="columnPivotChanged",n.EVENT_GRID_COLUMNS_CHANGED="gridColumnsChanged",n.EVENT_COLUMN_VALUE_CHANGED="columnValueChanged",n.EVENT_COLUMN_MOVED="columnMoved",n.EVENT_COLUMN_VISIBLE="columnVisible",n.EVENT_COLUMN_PINNED="columnPinned",n.EVENT_COLUMN_GROUP_OPENED="columnGroupOpened",n.EVENT_COLUMN_RESIZED="columnResized",n.EVENT_DISPLAYED_COLUMNS_CHANGED="displayedColumnsChanged",n.EVENT_VIRTUAL_COLUMNS_CHANGED="virtualColumnsChanged",n.EVENT_ASYNC_TRANSACTIONS_FLUSHED="asyncTransactionsFlushed",n.EVENT_ROW_GROUP_OPENED="rowGroupOpened",n.EVENT_ROW_DATA_CHANGED="rowDataChanged",n.EVENT_ROW_DATA_UPDATED="rowDataUpdated",n.EVENT_PINNED_ROW_DATA_CHANGED="pinnedRowDataChanged",n.EVENT_RANGE_SELECTION_CHANGED="rangeSelectionChanged",n.EVENT_CHART_CREATED="chartCreated",n.EVENT_CHART_RANGE_SELECTION_CHANGED="chartRangeSelectionChanged",n.EVENT_CHART_OPTIONS_CHANGED="chartOptionsChanged",n.EVENT_CHART_DESTROYED="chartDestroyed",n.EVENT_TOOL_PANEL_VISIBLE_CHANGED="toolPanelVisibleChanged",n.EVENT_TOOL_PANEL_SIZE_CHANGED="toolPanelSizeChanged",n.EVENT_COLUMN_PANEL_ITEM_DRAG_START="columnPanelItemDragStart",n.EVENT_COLUMN_PANEL_ITEM_DRAG_END="columnPanelItemDragEnd",n.EVENT_MODEL_UPDATED="modelUpdated",n.EVENT_CUT_START="cutStart",n.EVENT_CUT_END="cutEnd",n.EVENT_PASTE_START="pasteStart",n.EVENT_PASTE_END="pasteEnd",n.EVENT_FILL_START="fillStart",n.EVENT_FILL_END="fillEnd",n.EVENT_RANGE_DELETE_START="rangeDeleteStart",n.EVENT_RANGE_DELETE_END="rangeDeleteEnd",n.EVENT_UNDO_STARTED="undoStarted",n.EVENT_UNDO_ENDED="undoEnded",n.EVENT_REDO_STARTED="redoStarted",n.EVENT_REDO_ENDED="redoEnded",n.EVENT_KEY_SHORTCUT_CHANGED_CELL_START="keyShortcutChangedCellStart",n.EVENT_KEY_SHORTCUT_CHANGED_CELL_END="keyShortcutChangedCellEnd",n.EVENT_CELL_CLICKED="cellClicked",n.EVENT_CELL_DOUBLE_CLICKED="cellDoubleClicked",n.EVENT_CELL_MOUSE_DOWN="cellMouseDown",n.EVENT_CELL_CONTEXT_MENU="cellContextMenu",n.EVENT_CELL_VALUE_CHANGED="cellValueChanged",n.EVENT_CELL_EDIT_REQUEST="cellEditRequest",n.EVENT_ROW_VALUE_CHANGED="rowValueChanged",n.EVENT_CELL_FOCUSED="cellFocused",n.EVENT_CELL_FOCUS_CLEARED="cellFocusCleared",n.EVENT_FULL_WIDTH_ROW_FOCUSED="fullWidthRowFocused",n.EVENT_ROW_SELECTED="rowSelected",n.EVENT_SELECTION_CHANGED="selectionChanged",n.EVENT_CELL_KEY_DOWN="cellKeyDown",n.EVENT_CELL_MOUSE_OVER="cellMouseOver",n.EVENT_CELL_MOUSE_OUT="cellMouseOut",n.EVENT_FILTER_CHANGED="filterChanged",n.EVENT_FILTER_MODIFIED="filterModified",n.EVENT_FILTER_OPENED="filterOpened",n.EVENT_SORT_CHANGED="sortChanged",n.EVENT_VIRTUAL_ROW_REMOVED="virtualRowRemoved",n.EVENT_ROW_CLICKED="rowClicked",n.EVENT_ROW_DOUBLE_CLICKED="rowDoubleClicked",n.EVENT_GRID_READY="gridReady",n.EVENT_GRID_SIZE_CHANGED="gridSizeChanged",n.EVENT_VIEWPORT_CHANGED="viewportChanged",n.EVENT_SCROLLBAR_WIDTH_CHANGED="scrollbarWidthChanged",n.EVENT_FIRST_DATA_RENDERED="firstDataRendered",n.EVENT_DRAG_STARTED="dragStarted",n.EVENT_DRAG_STOPPED="dragStopped",n.EVENT_CHECKBOX_CHANGED="checkboxChanged",n.EVENT_ROW_EDITING_STARTED="rowEditingStarted",n.EVENT_ROW_EDITING_STOPPED="rowEditingStopped",n.EVENT_CELL_EDITING_STARTED="cellEditingStarted",n.EVENT_CELL_EDITING_STOPPED="cellEditingStopped",n.EVENT_BODY_SCROLL="bodyScroll",n.EVENT_BODY_SCROLL_END="bodyScrollEnd",n.EVENT_HEIGHT_SCALE_CHANGED="heightScaleChanged",n.EVENT_PAGINATION_CHANGED="paginationChanged",n.EVENT_COMPONENT_STATE_CHANGED="componentStateChanged",n.EVENT_STORE_REFRESHED="storeRefreshed",n.EVENT_BODY_HEIGHT_CHANGED="bodyHeightChanged",n.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED="displayedColumnsWidthChanged",n.EVENT_SCROLL_VISIBILITY_CHANGED="scrollVisibilityChanged",n.EVENT_COLUMN_HOVER_CHANGED="columnHoverChanged",n.EVENT_FLASH_CELLS="flashCells",n.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED="paginationPixelOffsetChanged",n.EVENT_DISPLAYED_ROWS_CHANGED="displayedRowsChanged",n.EVENT_LEFT_PINNED_WIDTH_CHANGED="leftPinnedWidthChanged",n.EVENT_RIGHT_PINNED_WIDTH_CHANGED="rightPinnedWidthChanged",n.EVENT_ROW_CONTAINER_HEIGHT_CHANGED="rowContainerHeightChanged",n.EVENT_HEADER_HEIGHT_CHANGED="headerHeightChanged",n.EVENT_COLUMN_HEADER_HEIGHT_CHANGED="columnHeaderHeightChanged",n.EVENT_ROW_DRAG_ENTER="rowDragEnter",n.EVENT_ROW_DRAG_MOVE="rowDragMove",n.EVENT_ROW_DRAG_LEAVE="rowDragLeave",n.EVENT_ROW_DRAG_END="rowDragEnd",n.EVENT_GRID_STYLES_CHANGED="gridStylesChanged",n.EVENT_POPUP_TO_FRONT="popupToFront",n.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST="columnRowGroupChangeRequest",n.EVENT_COLUMN_PIVOT_CHANGE_REQUEST="columnPivotChangeRequest",n.EVENT_COLUMN_VALUE_CHANGE_REQUEST="columnValueChangeRequest",n.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST="columnAggFuncChangeRequest",n.EVENT_KEYBOARD_FOCUS="keyboardFocus",n.EVENT_MOUSE_FOCUS="mouseFocus",n.EVENT_STORE_UPDATED="storeUpdated",n.EVENT_FILTER_DESTROYED="filterDestroyed",n.EVENT_ROW_DATA_UPDATE_STARTED="rowDataUpdateStarted",n}(),la=function(){function n(){this.existingIds={}}return n.prototype.getInstanceIdForKey=function(t){var e=this.existingIds[t],r;return typeof e!="number"?r=0:r=e+1,this.existingIds[t]=r,r},n}(),yc=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ui=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},pr="ag-Grid-AutoColumn",Cc=function(n){yc(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.createAutoGroupColumns=function(e,r){var o=this,i=[],s=this.gridOptionsService.isTreeData(),a=this.gridOptionsService.isGroupMultiAutoColumn();return s&&a&&(console.warn('AG Grid: you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),a=!1),a?r.forEach(function(l,u){i.push(o.createOneAutoGroupColumn(e,l,u))}):i.push(this.createOneAutoGroupColumn(e)),i},t.prototype.createOneAutoGroupColumn=function(e,r,o){var i=this.generateDefaultColDef(r),s;r?s=pr+"-"+r.getId():s=pr;var a=this.gridOptionsService.get("autoGroupColumnDef");if(De(i,a),i=this.columnFactory.mergeColDefs(i,s),i.colId=s,!this.gridOptionsService.isTreeData()){var l=N(i.field)&&N(i.valueGetter)&&N(i.filterValueGetter)&&i.filter!=="agGroupColumnFilter";l&&(i.filter=!1)}o&&o>0&&(i.headerCheckboxSelection=!1);var u=e.find(function(d){return d.getId()==s}),c=this.gridOptionsService.isColumnsSortingCoupledToGroup();if(u)return c&&(i.sort=void 0,i.sortIndex=void 0),u.setColDef(i,null),this.columnFactory.applyColumnState(u,i),u;c&&(i.sort||i.initialSort||"sortIndex"in i)&&!i.field&&(i.sort=null,i.sortIndex=null,i.initialSort=null);var p=new X(i,null,s,!0);return this.context.createBean(p),p},t.prototype.generateDefaultColDef=function(e){var r=this.gridOptionsService.get("autoGroupColumnDef"),o=this.localeService.getLocaleTextFunc(),i={headerName:o("group","Group")},s=r&&(r.cellRenderer||r.cellRendererSelector);if(s||(i.cellRenderer="agGroupCellRenderer"),e){var a=e.getColDef();Object.assign(i,{headerName:this.columnModel.getDisplayNameForColumn(e,"header"),headerValueGetter:a.headerValueGetter}),a.cellRenderer&&Object.assign(i,{cellRendererParams:{innerRenderer:a.cellRenderer,innerRendererParams:a.cellRendererParams}}),i.showRowGroup=e.getColId()}else i.showRowGroup=!0;return i},Ui([h("columnModel")],t.prototype,"columnModel",void 0),Ui([h("columnFactory")],t.prototype,"columnFactory",void 0),t=Ui([x("autoGroupColService")],t),t}(T),mc=/[&<>"']/g,wc={"&":"&","<":"<",">":">",'"':""","'":"'"};function Sc(n){var t=String.fromCharCode;function e(p){var d=[];if(!p)return[];for(var f=p.length,g=0,y,m;g=55296&&y<=56319&&g=55296&&p<=57343)throw Error("Lone surrogate U+"+p.toString(16).toUpperCase()+" is not a scalar value")}function o(p,d){return t(p>>d&63|128)}function i(p){if(p>=0&&p<=31&&p!==10){var d=p.toString(16).toUpperCase(),f=d.padStart(4,"0");return"_x"+f+"_"}if(!(p&4294967168))return t(p);var g="";return p&4294965248?p&4294901760?p&4292870144||(g=t(p>>18&7|240),g+=o(p,12),g+=o(p,6)):(r(p),g=t(p>>12&15|224),g+=o(p,6)):g=t(p>>6&31|192),g+=t(p&63|128),g}for(var s=e(n),a=s.length,l=-1,u,c="";++l1?o.substring(1,o.length):"")}).join(" ")}function pa(n){return n.replace(/[A-Z]/g,function(t){return"-"+t.toLocaleLowerCase()})}var Ec=Object.freeze({__proto__:null,utf8_encode:Sc,capitalise:ua,escapeString:it,camelCaseToHumanText:ca,camelCaseToHyphenated:pa});function vt(n){var t=new Map;return n.forEach(function(e){return t.set(e[0],e[1])}),t}function _c(n,t){var e=new Map;return n.forEach(function(r){return e.set(t(r),r)}),e}function Rc(n){var t=[];return n.forEach(function(e,r){return t.push(r)}),t}var Oc=Object.freeze({__proto__:null,convertToMap:vt,mapById:_c,keys:Rc}),Tc=function(){function n(){}return n.ColDefPropertyMap={headerName:void 0,columnGroupShow:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,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,columnsMenuParams: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,suppressCellFlash: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,suppressMenu: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,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0},n.ALL_PROPERTIES=Object.keys(n.ColDefPropertyMap),n}(),Rt=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Ot=function(n,t){for(var e=0,r=t.length,o=n.length;e0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Vr=function(n,t){for(var e=0,r=t.length,o=n.length;e0&&o.forEach(function(i){return r[i]=$i(i,e)}),r}function $i(n,t,e,r){var o=t.map(function(a){return{value:a,relevance:Pc(n.toLowerCase(),a.toLocaleLowerCase())}});if(o.sort(function(a,l){return l.relevance-a.relevance}),e&&(o=o.filter(function(a){return a.relevance!==0})),r&&r>0){var i=o[0].relevance,s=i*r;o=o.filter(function(a){return s-a.relevance<0})}return o.map(function(a){return a.value})}function Pc(n,t){for(var e=n.replace(/\s/g,""),r=t.replace(/\s/g,""),o=0,i=-1,s=0;s=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Tt=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Pt=function(n,t){for(var e=0,r=t.length,o=n.length;e0&&z(function(){return console.warn("AG Grid: to see all the valid "+o+" properties please check: "+i)},"invalidProperties"+o+i)},n.prototype.checkForDeprecated=function(){var t=this.gridOptions;Object.entries(this.deprecatedProperties).forEach(function(e){var r,o=Tt(e,2),i=o[0],s=o[1],a=t[i];a&&(Ne(s.version,i,s.newProp,s.message),s.copyToNewProp&&s.newProp&&t[s.newProp]==null&&(t[s.newProp]=(r=s.newPropValue)!==null&&r!==void 0?r:a))}),t.serverSideStoreType&&(console.warn("AG Grid: since v29.0, `serverSideStoreType` has been replaced by `suppressServerSideInfiniteScroll`. Set to false to use Partial Store, and true to use Full Store."),t.suppressServerSideInfiniteScroll=t.serverSideStoreType!=="partial")},n.prototype.checkForViolations=function(){this.gridOptionsService.is("treeData")&&this.treeDataViolations()},n.prototype.treeDataViolations=function(){this.gridOptionsService.isRowModelType("clientSide")&&(this.gridOptionsService.exists("getDataPath")||console.warn("AG Grid: property usingTreeData=true with rowModel=clientSide, but you did not provide getDataPath function, please provide getDataPath function if using tree data.")),this.gridOptionsService.isRowModelType("serverSide")&&(this.gridOptionsService.exists("isServerSideGroup")||console.warn("AG Grid: property usingTreeData=true with rowModel=serverSide, but you did not provide isServerSideGroup function, please provide isServerSideGroup function if using tree data."),this.gridOptionsService.exists("getServerSideGroupKey")||console.warn("AG Grid: property usingTreeData=true with rowModel=serverSide, but you did not provide getServerSideGroupKey function, please provide getServerSideGroupKey function if using tree data."))},Ao([h("gridOptions")],n.prototype,"gridOptions",void 0),Ao([h("gridOptionsService")],n.prototype,"gridOptionsService",void 0),Ao([P],n.prototype,"init",null),n=Ao([x("gridOptionsValidator")],n),n}();function Ki(n,t){var e=["groupRows","multipleColumns","custom","singleColumn"];return e.indexOf(t)<0?(console.warn("AG Grid: '"+t+"' is not a valid groupDisplayType value - possible values are: '"+e.join("', '")+"'"),!1):t===n}function bc(n,t){var e=["auto","custom"];return e.indexOf(t)<0?(console.warn("AG Grid: '"+t+"' is not a valid treeDataDisplayType value - possible values are: '"+e.join("', '")+"'"),!1):t===n}var Fc=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ce=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},xc=function(n,t){return function(e,r){t(e,r,n)}},Lc=function(n,t){var e={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(n);o=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},qt=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Qt=function(n,t){for(var e=0,r=t.length,o=n.length;e=0,u=a>=0;if(l&&u)return s-a;if(l)return 1;if(u)return-1;var c=e.gridColumns.indexOf(o),p=e.gridColumns.indexOf(i);return c-p}),this.gridColumns=this.placeLockedColumns(this.gridColumns))},t.prototype.getAllDisplayedAutoHeightCols=function(){return this.displayedAutoHeightCols},t.prototype.setViewport=function(){this.gridOptionsService.is("enableRtl")?(this.viewportLeft=this.bodyWidth-this.scrollPosition-this.scrollWidth,this.viewportRight=this.bodyWidth-this.scrollPosition):(this.viewportLeft=this.scrollPosition,this.viewportRight=this.scrollWidth+this.scrollPosition)},t.prototype.getDisplayedColumnsStartingAt=function(e){for(var r=e,o=[];r!=null;)o.push(r),r=this.getDisplayedColAfter(r);return o},t.prototype.checkViewportColumns=function(){if(this.displayedColumnsCenter!=null){var e=this.extractViewport();if(e){var r={type:v.EVENT_VIRTUAL_COLUMNS_CHANGED};this.eventService.dispatchEvent(r)}}},t.prototype.setViewportPosition=function(e,r){(e!==this.scrollWidth||r!==this.scrollPosition||this.bodyWidthDirty)&&(this.scrollWidth=e,this.scrollPosition=r,this.bodyWidthDirty=!0,this.setViewport(),this.ready&&this.checkViewportColumns())},t.prototype.isPivotMode=function(){return this.pivotMode},t.prototype.isPivotSettingAllowed=function(e){return e&&this.gridOptionsService.isTreeData()?(console.warn("AG Grid: Pivot mode not available in conjunction Tree Data i.e. 'gridOptions.treeData: true'"),!1):!0},t.prototype.setPivotMode=function(e,r){if(r===void 0&&(r="api"),!(e===this.pivotMode||!this.isPivotSettingAllowed(this.pivotMode))){this.pivotMode=e,this.autoGroupsNeedBuilding=!0,this.updateGridColumns(),this.updateDisplayedColumns(r);var o={type:v.EVENT_COLUMN_PIVOT_MODE_CHANGED};this.eventService.dispatchEvent(o)}},t.prototype.getSecondaryPivotColumn=function(e,r){if(N(this.secondaryColumns))return null;var o=this.getPrimaryColumn(r),i=null;return this.secondaryColumns.forEach(function(s){var a=s.getColDef().pivotKeys,l=s.getColDef().pivotValueColumn,u=_t(a,e),c=l===o;u&&c&&(i=s)}),i},t.prototype.setBeans=function(e){this.logger=e.create("columnModel")},t.prototype.setFirstRightAndLastLeftPinned=function(e){var r,o;this.gridOptionsService.is("enableRtl")?(r=this.displayedColumnsLeft?this.displayedColumnsLeft[0]:null,o=this.displayedColumnsRight?Q(this.displayedColumnsRight):null):(r=this.displayedColumnsLeft?Q(this.displayedColumnsLeft):null,o=this.displayedColumnsRight?this.displayedColumnsRight[0]:null),this.gridColumns.forEach(function(i){i.setLastLeftPinned(i===r,e),i.setFirstRightPinned(i===o,e)})},t.prototype.autoSizeColumns=function(e){var r=this;if(this.shouldQueueResizeOperations){this.resizeOperationQueue.push(function(){return r.autoSizeColumns(e)});return}var o=e.columns,i=e.skipHeader,s=e.skipHeaderGroups,a=e.stopAtGroup,l=e.source,u=l===void 0?"api":l;this.animationFrameService.flushAllFrames();for(var c=[],p=-1,d=i??this.gridOptionsService.is("skipHeaderOnAutoSize"),f=s??d;p!==0;)p=0,this.actionOnGridColumns(o,function(g){if(c.indexOf(g)>=0)return!1;var y=r.autoWidthCalculator.getPreferredWidthForColumn(g,d);if(y>0){var m=r.normaliseColumnWidth(g,y);g.setActualWidth(m,u),c.push(g),p++}return!0},u);f||this.autoSizeColumnGroupsByColumns(o,u,a),this.dispatchColumnResizedEvent(c,!0,"autosizeColumns")},t.prototype.dispatchColumnResizedEvent=function(e,r,o,i){if(i===void 0&&(i=null),e&&e.length){var s={type:v.EVENT_COLUMN_RESIZED,columns:e,column:e.length===1?e[0]:null,flexColumns:i,finished:r,source:o};this.eventService.dispatchEvent(s)}},t.prototype.dispatchColumnChangedEvent=function(e,r,o){var i={type:e,columns:r,column:r&&r.length==1?r[0]:null,source:o};this.eventService.dispatchEvent(i)},t.prototype.dispatchColumnMovedEvent=function(e){var r=e.movedColumns,o=e.source,i=e.toIndex,s=e.finished,a={type:v.EVENT_COLUMN_MOVED,columns:r,column:r&&r.length===1?r[0]:null,toIndex:i,finished:s,source:o};this.eventService.dispatchEvent(a)},t.prototype.dispatchColumnPinnedEvent=function(e,r){if(e.length){var o=e.length===1?e[0]:null,i=this.getCommonValue(e,function(a){return a.getPinned()}),s={type:v.EVENT_COLUMN_PINNED,pinned:i??null,columns:e,column:o,source:r};this.eventService.dispatchEvent(s)}},t.prototype.dispatchColumnVisibleEvent=function(e,r){if(e.length){var o=e.length===1?e[0]:null,i=this.getCommonValue(e,function(a){return a.isVisible()}),s={type:v.EVENT_COLUMN_VISIBLE,visible:i,columns:e,column:o,source:r};this.eventService.dispatchEvent(s)}},t.prototype.autoSizeColumn=function(e,r,o){o===void 0&&(o="api"),e&&this.autoSizeColumns({columns:[e],skipHeader:r,skipHeaderGroups:!0,source:o})},t.prototype.autoSizeColumnGroupsByColumns=function(e,r,o){var i,s,a,l,u=new Set,c=this.getGridColumns(e);c.forEach(function(S){for(var E=S.getParent();E&&E!=o;)E.isPadding()||u.add(E),E=E.getParent()});var p,d=[];try{for(var f=fa(u),g=f.next();!g.done;g=f.next()){var y=g.value;try{for(var m=(a=void 0,fa(this.ctrlsService.getHeaderRowContainerCtrls())),C=m.next();!C.done;C=m.next()){var w=C.value;if(p=w.getHeaderCtrlForColumn(y),p)break}}catch(S){a={error:S}}finally{try{C&&!C.done&&(l=m.return)&&l.call(m)}finally{if(a)throw a.error}}p&&p.resizeLeafColumnsToFit(r)}}catch(S){i={error:S}}finally{try{g&&!g.done&&(s=f.return)&&s.call(f)}finally{if(i)throw i.error}}return d},t.prototype.autoSizeAllColumns=function(e,r){var o=this;if(r===void 0&&(r="api"),this.shouldQueueResizeOperations){this.resizeOperationQueue.push(function(){return o.autoSizeAllColumns(e,r)});return}var i=this.getAllDisplayedColumns();this.autoSizeColumns({columns:i,skipHeader:e,source:r})},t.prototype.getColumnsFromTree=function(e){var r=[],o=function(i){for(var s=0;s=0},t.prototype.getAllDisplayedColumns=function(){return this.displayedColumns},t.prototype.getViewportColumns=function(){return this.viewportColumns},t.prototype.getDisplayedLeftColumnsForRow=function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsLeft):this.displayedColumnsLeft},t.prototype.getDisplayedRightColumnsForRow=function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsRight):this.displayedColumnsRight},t.prototype.isColSpanActive=function(){return this.colSpanActive},t.prototype.getDisplayedColumnsForRow=function(e,r,o,i){for(var s=[],a=null,l=function(p){var d=r[p],f=r.length-p,g=Math.min(d.getColSpan(e),f),y=[d];if(g>1){for(var m=g-1,C=1;C<=m;C++)y.push(r[p+C]);p+=m}var w;if(o?(w=!1,y.forEach(function(E){o(E)&&(w=!0)})):w=!0,w){if(s.length===0&&a){var S=i?i(d):!1;S&&s.push(a)}s.push(d)}a=d,u=p},u,c=0;cr.viewportLeft},i=this.suppressColumnVirtualisation?null:this.isColumnInRowViewport.bind(this);return this.getDisplayedColumnsForRow(e,this.displayedColumnsCenter,i,o)},t.prototype.getAriaColumnIndex=function(e){return this.getAllGridColumns().indexOf(e)+1},t.prototype.isColumnInHeaderViewport=function(e){return e.isAutoHeaderHeight()?!0:this.isColumnInRowViewport(e)},t.prototype.isColumnInRowViewport=function(e){if(e.isAutoHeight())return!0;var r=e.getLeft()||0,o=r+e.getActualWidth(),i=this.viewportLeft-200,s=this.viewportRight+200,a=rs&&o>s;return!a&&!l},t.prototype.getDisplayedColumnsLeftWidth=function(){return this.getWidthOfColsInList(this.displayedColumnsLeft)},t.prototype.getDisplayedColumnsRightWidth=function(){return this.getWidthOfColsInList(this.displayedColumnsRight)},t.prototype.updatePrimaryColumnList=function(e,r,o,i,s,a){var l=this;if(a===void 0&&(a="api"),!(!e||Pe(e))){var u=!1;if(e.forEach(function(p){var d=l.getPrimaryColumn(p);if(d){if(o){if(r.indexOf(d)>=0)return;r.push(d)}else{if(r.indexOf(d)<0)return;fe(r,d)}i(d),u=!0}}),!!u){this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(a);var c={type:s,columns:r,column:r.length===1?r[0]:null,source:a};this.eventService.dispatchEvent(c)}}},t.prototype.setRowGroupColumns=function(e,r){r===void 0&&(r="api"),this.autoGroupsNeedBuilding=!0,this.setPrimaryColumnList(e,this.rowGroupColumns,v.EVENT_COLUMN_ROW_GROUP_CHANGED,this.setRowGroupActive.bind(this),r)},t.prototype.setRowGroupActive=function(e,r,o){e!==r.isRowGroupActive()&&(r.setRowGroupActive(e,o),e&&!this.gridOptionsService.is("suppressRowGroupHidesColumns")&&this.setColumnVisible(r,!1,o),!e&&!this.gridOptionsService.is("suppressMakeColumnVisibleAfterUnGroup")&&this.setColumnVisible(r,!0,o))},t.prototype.addRowGroupColumn=function(e,r){r===void 0&&(r="api"),e&&this.addRowGroupColumns([e],r)},t.prototype.addRowGroupColumns=function(e,r){r===void 0&&(r="api"),this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!0,this.setRowGroupActive.bind(this,!0),v.EVENT_COLUMN_ROW_GROUP_CHANGED,r)},t.prototype.removeRowGroupColumns=function(e,r){r===void 0&&(r="api"),this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!1,this.setRowGroupActive.bind(this,!1),v.EVENT_COLUMN_ROW_GROUP_CHANGED,r)},t.prototype.removeRowGroupColumn=function(e,r){r===void 0&&(r="api"),e&&this.removeRowGroupColumns([e],r)},t.prototype.addPivotColumns=function(e,r){r===void 0&&(r="api"),this.updatePrimaryColumnList(e,this.pivotColumns,!0,function(o){return o.setPivotActive(!0,r)},v.EVENT_COLUMN_PIVOT_CHANGED,r)},t.prototype.setPivotColumns=function(e,r){r===void 0&&(r="api"),this.setPrimaryColumnList(e,this.pivotColumns,v.EVENT_COLUMN_PIVOT_CHANGED,function(o,i){i.setPivotActive(o,r)},r)},t.prototype.addPivotColumn=function(e,r){r===void 0&&(r="api"),this.addPivotColumns([e],r)},t.prototype.removePivotColumns=function(e,r){r===void 0&&(r="api"),this.updatePrimaryColumnList(e,this.pivotColumns,!1,function(o){return o.setPivotActive(!1,r)},v.EVENT_COLUMN_PIVOT_CHANGED,r)},t.prototype.removePivotColumn=function(e,r){r===void 0&&(r="api"),this.removePivotColumns([e],r)},t.prototype.setPrimaryColumnList=function(e,r,o,i,s){var a=this;r.length=0,O(e)&&e.forEach(function(l){var u=a.getPrimaryColumn(l);u&&r.push(u)}),(this.primaryColumns||[]).forEach(function(l){var u=r.indexOf(l)>=0;i(u,l)}),this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(s),this.dispatchColumnChangedEvent(o,r,s)},t.prototype.setValueColumns=function(e,r){r===void 0&&(r="api"),this.setPrimaryColumnList(e,this.valueColumns,v.EVENT_COLUMN_VALUE_CHANGED,this.setValueActive.bind(this),r)},t.prototype.setValueActive=function(e,r,o){if(e!==r.isValueActive()&&(r.setValueActive(e,o),e&&!r.getAggFunc())){var i=this.aggFuncService.getDefaultAggFunc(r);r.setAggFunc(i)}},t.prototype.addValueColumns=function(e,r){r===void 0&&(r="api"),this.updatePrimaryColumnList(e,this.valueColumns,!0,this.setValueActive.bind(this,!0),v.EVENT_COLUMN_VALUE_CHANGED,r)},t.prototype.addValueColumn=function(e,r){r===void 0&&(r="api"),e&&this.addValueColumns([e],r)},t.prototype.removeValueColumn=function(e,r){r===void 0&&(r="api"),this.removeValueColumns([e],r)},t.prototype.removeValueColumns=function(e,r){r===void 0&&(r="api"),this.updatePrimaryColumnList(e,this.valueColumns,!1,this.setValueActive.bind(this,!1),v.EVENT_COLUMN_VALUE_CHANGED,r)},t.prototype.normaliseColumnWidth=function(e,r){var o=e.getMinWidth();O(o)&&r0?s+=d:a=!1});var l=o>=i,u=!a||o<=s;return l&&u},t.prototype.resizeColumnSets=function(e){var r=this,o=e.resizeSets,i=e.finished,s=e.source,a=!o||o.every(function(g){return r.checkMinAndMaxWidthsForSet(g)});if(!a){if(i){var l=o&&o.length>0?o[0].columns:null;this.dispatchColumnResizedEvent(l,i,s)}return}var u=[],c=[];o.forEach(function(g){var y=g.width,m=g.columns,C=g.ratios,w={},S={};m.forEach(function(F){return c.push(F)});for(var E=!0,A=0,b=function(){if(A++,A>1e3)return console.error("AG Grid: infinite loop in resizeColumnSets"),"break";E=!1;var F=[],I=0,V=y;m.forEach(function(K,te){var Oe=S[K.getId()];if(Oe)V-=w[K.getId()];else{F.push(K);var se=C[te];I+=se}});var k=1/I;F.forEach(function(K,te){var Oe=te===F.length-1,se;Oe?se=V:(se=Math.round(C[te]*y*k),V-=se);var Te=K.getMinWidth(),Z=K.getMaxWidth();O(Te)&&se0&&se>Z&&(se=Z,S[K.getId()]=!0,E=!0),w[K.getId()]=se})};E;){var M=b();if(M==="break")break}m.forEach(function(F){var I=w[F.getId()],V=F.getActualWidth();V!==I&&(F.setActualWidth(I,s),u.push(F))})});var p=u.length>0,d=[];p&&(d=this.refreshFlexedColumns({resizingCols:c,skipSetLeft:!0}),this.setLeftValues(s),this.updateBodyWidths(),this.checkViewportColumns());var f=c.concat(d);(p||i)&&this.dispatchColumnResizedEvent(f,i,s,d)},t.prototype.setColumnAggFunc=function(e,r,o){if(o===void 0&&(o="api"),!!e){var i=this.getPrimaryColumn(e);i&&(i.setAggFunc(r),this.dispatchColumnChangedEvent(v.EVENT_COLUMN_VALUE_CHANGED,[i],o))}},t.prototype.moveRowGroupColumn=function(e,r,o){o===void 0&&(o="api");var i=this.rowGroupColumns[e];this.rowGroupColumns.splice(e,1),this.rowGroupColumns.splice(r,0,i);var s={type:v.EVENT_COLUMN_ROW_GROUP_CHANGED,columns:this.rowGroupColumns,column:this.rowGroupColumns.length===1?this.rowGroupColumns[0]:null,source:o};this.eventService.dispatchEvent(s)},t.prototype.moveColumns=function(e,r,o,i){if(o===void 0&&(o="api"),i===void 0&&(i=!0),this.columnAnimationService.start(),r>this.gridColumns.length-e.length){console.warn("AG Grid: tried to insert columns in invalid location, toIndex = "+r),console.warn("AG Grid: remember that you should not count the moving columns when calculating the new index");return}var s=this.getGridColumns(e),a=!this.doesMovePassRules(s,r);a||(Bi(this.gridColumns,s,r),this.updateDisplayedColumns(o),this.dispatchColumnMovedEvent({movedColumns:s,source:o,toIndex:r,finished:i}),this.columnAnimationService.finish())},t.prototype.doesMovePassRules=function(e,r){var o=this.getProposedColumnOrder(e,r);return this.doesOrderPassRules(o)},t.prototype.doesOrderPassRules=function(e){return!(!this.doesMovePassMarryChildren(e)||!this.doesMovePassLockedPositions(e))},t.prototype.getProposedColumnOrder=function(e,r){var o=this.gridColumns.slice();return Bi(o,e,r),o},t.prototype.sortColumnsLikeGridColumns=function(e){var r=this;if(!(!e||e.length<=1)){var o=e.filter(function(i){return r.gridColumns.indexOf(i)<0}).length>0;o||e.sort(function(i,s){var a=r.gridColumns.indexOf(i),l=r.gridColumns.indexOf(s);return a-l})}},t.prototype.doesMovePassLockedPositions=function(e){var r=0,o=!0,i=function(s){return s?s===!0||s==="left"?0:2:1};return e.forEach(function(s){var a=i(s.getColDef().lockPosition);ad&&(r=!1)}}}),r},t.prototype.moveColumn=function(e,r,o){o===void 0&&(o="api"),this.moveColumns([e],r,o)},t.prototype.moveColumnByIndex=function(e,r,o){o===void 0&&(o="api");var i=this.gridColumns[e];this.moveColumn(i,r,o)},t.prototype.getColumnDefs=function(){var e=this;if(this.primaryColumns){var r=this.primaryColumns.slice();return this.gridColsArePrimary?r.sort(function(o,i){return e.gridColumns.indexOf(o)-e.gridColumns.indexOf(i)}):this.lastPrimaryOrder&&r.sort(function(o,i){return e.lastPrimaryOrder.indexOf(o)-e.lastPrimaryOrder.indexOf(i)}),this.columnDefFactory.buildColumnDefs(r,this.rowGroupColumns,this.pivotColumns)}},t.prototype.getBodyContainerWidth=function(){return this.bodyWidth},t.prototype.getContainerWidth=function(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}},t.prototype.updateBodyWidths=function(){var e=this.getWidthOfColsInList(this.displayedColumnsCenter),r=this.getWidthOfColsInList(this.displayedColumnsLeft),o=this.getWidthOfColsInList(this.displayedColumnsRight);this.bodyWidthDirty=this.bodyWidth!==e;var i=this.bodyWidth!==e||this.leftWidth!==r||this.rightWidth!==o;if(i){this.bodyWidth=e,this.leftWidth=r,this.rightWidth=o;var s={type:v.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED};this.eventService.dispatchEvent(s)}},t.prototype.getValueColumns=function(){return this.valueColumns?this.valueColumns:[]},t.prototype.getPivotColumns=function(){return this.pivotColumns?this.pivotColumns:[]},t.prototype.isPivotActive=function(){return this.pivotColumns&&this.pivotColumns.length>0&&this.pivotMode},t.prototype.getRowGroupColumns=function(){return this.rowGroupColumns?this.rowGroupColumns:[]},t.prototype.getDisplayedCenterColumns=function(){return this.displayedColumnsCenter},t.prototype.getDisplayedLeftColumns=function(){return this.displayedColumnsLeft},t.prototype.getDisplayedRightColumns=function(){return this.displayedColumnsRight},t.prototype.getDisplayedColumns=function(e){switch(e){case"left":return this.getDisplayedLeftColumns();case"right":return this.getDisplayedRightColumns();default:return this.getDisplayedCenterColumns()}},t.prototype.getAllPrimaryColumns=function(){return this.primaryColumns?this.primaryColumns.slice():null},t.prototype.getSecondaryColumns=function(){return this.secondaryColumns?this.secondaryColumns.slice():null},t.prototype.getAllColumnsForQuickFilter=function(){return this.columnsForQuickFilter},t.prototype.getAllGridColumns=function(){return this.gridColumns},t.prototype.isEmpty=function(){return Pe(this.gridColumns)},t.prototype.isRowGroupEmpty=function(){return Pe(this.rowGroupColumns)},t.prototype.setColumnVisible=function(e,r,o){o===void 0&&(o="api"),this.setColumnsVisible([e],r,o)},t.prototype.setColumnsVisible=function(e,r,o){r===void 0&&(r=!1),o===void 0&&(o="api"),this.applyColumnState({state:e.map(function(i){return{colId:typeof i=="string"?i:i.getColId(),hide:!r}})},o)},t.prototype.setColumnPinned=function(e,r,o){o===void 0&&(o="api"),e&&this.setColumnsPinned([e],r,o)},t.prototype.setColumnsPinned=function(e,r,o){if(o===void 0&&(o="api"),this.gridOptionsService.isDomLayout("print")){console.warn("AG Grid: Changing the column pinning status is not allowed with domLayout='print'");return}this.columnAnimationService.start();var i;r===!0||r==="left"?i="left":r==="right"?i="right":i=null,this.actionOnGridColumns(e,function(s){return s.getPinned()!==i?(s.setPinned(i),!0):!1},o,function(){var s={type:v.EVENT_COLUMN_PINNED,pinned:i,column:null,columns:null,source:o};return s}),this.columnAnimationService.finish()},t.prototype.actionOnGridColumns=function(e,r,o,i){var s=this;if(!Pe(e)){var a=[];if(e.forEach(function(u){var c=s.getGridColumn(u);if(c){var p=r(c);p!==!1&&a.push(c)}}),!!a.length&&(this.updateDisplayedColumns(o),O(i)&&i)){var l=i();l.columns=a,l.column=a.length===1?a[0]:null,this.eventService.dispatchEvent(l)}}},t.prototype.getDisplayedColBefore=function(e){var r=this.getAllDisplayedColumns(),o=r.indexOf(e);return o>0?r[o-1]:null},t.prototype.getDisplayedColAfter=function(e){var r=this.getAllDisplayedColumns(),o=r.indexOf(e);return o0},t.prototype.isPinningRight=function(){return this.displayedColumnsRight.length>0},t.prototype.getPrimaryAndSecondaryAndAutoColumns=function(){var e;return(e=[]).concat.apply(e,[this.primaryColumns||[],this.groupAutoColumns||[],this.secondaryColumns||[]])},t.prototype.createStateItemFromColumn=function(e){var r=e.isRowGroupActive()?this.rowGroupColumns.indexOf(e):null,o=e.isPivotActive()?this.pivotColumns.indexOf(e):null,i=e.isValueActive()?e.getAggFunc():null,s=e.getSort()!=null?e.getSort():null,a=e.getSortIndex()!=null?e.getSortIndex():null,l=e.getFlex()!=null&&e.getFlex()>0?e.getFlex():null,u={colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:s,sortIndex:a,aggFunc:i,rowGroup:e.isRowGroupActive(),rowGroupIndex:r,pivot:e.isPivotActive(),pivotIndex:o,flex:l};return u},t.prototype.getColumnState=function(){if(N(this.primaryColumns)||!this.isAlive())return[];var e=this.getPrimaryAndSecondaryAndAutoColumns(),r=e.map(this.createStateItemFromColumn.bind(this));return this.orderColumnStateList(r),r},t.prototype.orderColumnStateList=function(e){var r=vt(this.gridColumns.map(function(o,i){return[o.getColId(),i]}));e.sort(function(o,i){var s=r.has(o.colId)?r.get(o.colId):-1,a=r.has(i.colId)?r.get(i.colId):-1;return s-a})},t.prototype.resetColumnState=function(e){var r=this;e===void 0&&(e="api");var o=this.getColumnsFromTree(this.primaryColumnTree),i=[],s=1e3,a=1e3,l=[];this.groupAutoColumns&&(l=l.concat(this.groupAutoColumns)),o&&(l=l.concat(o)),l.forEach(function(u){var c=r.getColumnStateFromColDef(u);N(c.rowGroupIndex)&&c.rowGroup&&(c.rowGroupIndex=s++),N(c.pivotIndex)&&c.pivot&&(c.pivotIndex=a++),i.push(c)}),this.applyColumnState({state:i,applyOrder:!0},e)},t.prototype.getColumnStateFromColDef=function(e){var r=function(m,C){return m??C??null},o=e.getColDef(),i=r(o.sort,o.initialSort),s=r(o.sortIndex,o.initialSortIndex),a=r(o.hide,o.initialHide),l=r(o.pinned,o.initialPinned),u=r(o.width,o.initialWidth),c=r(o.flex,o.initialFlex),p=r(o.rowGroupIndex,o.initialRowGroupIndex),d=r(o.rowGroup,o.initialRowGroup);p==null&&(d==null||d==!1)&&(p=null,d=null);var f=r(o.pivotIndex,o.initialPivotIndex),g=r(o.pivot,o.initialPivot);f==null&&(g==null||g==!1)&&(f=null,g=null);var y=r(o.aggFunc,o.initialAggFunc);return{colId:e.getColId(),sort:i,sortIndex:s,hide:a,pinned:l,width:u,flex:c,rowGroup:d,rowGroupIndex:p,pivot:g,pivotIndex:f,aggFunc:y}},t.prototype.applyColumnState=function(e,r){var o=this;if(Pe(this.primaryColumns))return!1;if(e&&e.state&&!e.state.forEach)return console.warn("AG Grid: 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."),!1;var i=function(u,c,p){var d=o.compareColumnStatesAndDispatchEvents(r);o.autoGroupsNeedBuilding=!0;var f=c.slice(),g={},y={},m=[],C=[],w=0,S=o.rowGroupColumns.slice(),E=o.pivotColumns.slice();u.forEach(function(F){var I=F.colId||"",V=I.startsWith(pr);if(V){m.push(F),C.push(F);return}var k=p(I);k?(o.syncColumnWithStateItem(k,F,e.defaultState,g,y,!1,r),fe(f,k)):(C.push(F),w+=1)});var A=function(F){return o.syncColumnWithStateItem(F,null,e.defaultState,g,y,!1,r)};f.forEach(A);var b=function(F,I,V,k){var K=F[V.getId()],te=F[k.getId()],Oe=K!=null,se=te!=null;if(Oe&&se)return K-te;if(Oe)return-1;if(se)return 1;var Te=I.indexOf(V),Z=I.indexOf(k),ht=Te>=0,ur=Z>=0;return ht&&ur?Te-Z:ht?-1:1};o.rowGroupColumns.sort(b.bind(o,g,S)),o.pivotColumns.sort(b.bind(o,y,E)),o.updateGridColumns();var M=o.groupAutoColumns?o.groupAutoColumns.slice():[];return m.forEach(function(F){var I=o.getAutoColumn(F.colId);fe(M,I),o.syncColumnWithStateItem(I,F,e.defaultState,null,null,!0,r)}),M.forEach(A),o.applyOrderAfterApplyState(e),o.updateDisplayedColumns(r),o.dispatchEverythingChanged(r),d(),{unmatchedAndAutoStates:C,unmatchedCount:w}};this.columnAnimationService.start();var s=i(e.state||[],this.primaryColumns||[],function(u){return o.getPrimaryColumn(u)}),a=s.unmatchedAndAutoStates,l=s.unmatchedCount;return(a.length>0||O(e.defaultState))&&(l=i(a,this.secondaryColumns||[],function(u){return o.getSecondaryColumn(u)}).unmatchedCount),this.columnAnimationService.finish(),l===0},t.prototype.applyOrderAfterApplyState=function(e){var r=this;if(!(!e.applyOrder||!e.state)){var o=[],i={};e.state.forEach(function(a){if(!(!a.colId||i[a.colId])){var l=r.gridColumnsMap[a.colId];l&&(o.push(l),i[a.colId]=!0)}});var s=0;if(this.gridColumns.forEach(function(a){var l=a.getColId(),u=i[l]!=null;if(!u){var c=l.startsWith(pr);c?Gr(o,a,s++):o.push(a)}}),o=this.placeLockedColumns(o),!this.doesMovePassMarryChildren(o)){console.warn("AG Grid: Applying column order broke a group where columns should be married together. Applying new order has been discarded.");return}this.gridColumns=o}},t.prototype.compareColumnStatesAndDispatchEvents=function(e){var r=this,o={rowGroupColumns:this.rowGroupColumns.slice(),pivotColumns:this.pivotColumns.slice(),valueColumns:this.valueColumns.slice()},i=this.getColumnState(),s={};return i.forEach(function(a){s[a.colId]=a}),function(){var a=r.getPrimaryAndSecondaryAndAutoColumns(),l=function(C,w,S,E){var A=w.map(E),b=S.map(E),M=_t(A,b);if(!M){var F={type:C,columns:S,column:S.length===1?S[0]:null,source:e};r.eventService.dispatchEvent(F)}},u=function(C){var w=[];return a.forEach(function(S){var E=s[S.getColId()];E&&C(E,S)&&w.push(S)}),w},c=function(C){return C.getColId()};l(v.EVENT_COLUMN_ROW_GROUP_CHANGED,o.rowGroupColumns,r.rowGroupColumns,c),l(v.EVENT_COLUMN_PIVOT_CHANGED,o.pivotColumns,r.pivotColumns,c);var p=function(C,w){var S=C.aggFunc!=null,E=S!=w.isValueActive(),A=S&&C.aggFunc!=w.getAggFunc();return E||A},d=u(p);d.length>0&&r.dispatchColumnChangedEvent(v.EVENT_COLUMN_VALUE_CHANGED,r.valueColumns,e);var f=function(C,w){return C.width!=w.getActualWidth()};r.dispatchColumnResizedEvent(u(f),!0,e);var g=function(C,w){return C.pinned!=w.getPinned()};r.dispatchColumnPinnedEvent(u(g),e);var y=function(C,w){return C.hide==w.isVisible()};r.dispatchColumnVisibleEvent(u(y),e);var m=function(C,w){return C.sort!=w.getSort()||C.sortIndex!=w.getSortIndex()};u(m).length>0&&r.sortController.dispatchSortChangedEvents(e),r.normaliseColumnMovedEventForColumnState(i,e)}},t.prototype.getCommonValue=function(e,r){if(!(!e||e.length==0)){for(var o=r(e[0]),i=1;i=d&&e.setActualWidth(y,l)}var m=u("sort").value1;m!==void 0&&(m==="desc"||m==="asc"?e.setSort(m,l):e.setSort(void 0,l));var C=u("sortIndex").value1;if(C!==void 0&&e.setSortIndex(C),!(a||!e.isPrimary())){var w=u("aggFunc").value1;w!==void 0&&(typeof w=="string"?(e.setAggFunc(w),e.isValueActive()||(e.setValueActive(!0,l),this.valueColumns.push(e))):(O(w)&&console.warn("AG Grid: 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."),e.isValueActive()&&(e.setValueActive(!1,l),fe(this.valueColumns,e))));var S=u("rowGroup","rowGroupIndex"),E=S.value1,A=S.value2;(E!==void 0||A!==void 0)&&(typeof A=="number"||E?(e.isRowGroupActive()||(e.setRowGroupActive(!0,l),this.rowGroupColumns.push(e)),i&&typeof A=="number"&&(i[e.getId()]=A)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,l),fe(this.rowGroupColumns,e)));var b=u("pivot","pivotIndex"),M=b.value1,F=b.value2;(M!==void 0||F!==void 0)&&(typeof F=="number"||M?(e.isPivotActive()||(e.setPivotActive(!0,l),this.pivotColumns.push(e)),s&&typeof F=="number"&&(s[e.getId()]=F)):e.isPivotActive()&&(e.setPivotActive(!1,l),fe(this.pivotColumns,e)))}}},t.prototype.getGridColumns=function(e){return this.getColumns(e,this.getGridColumn.bind(this))},t.prototype.getColumns=function(e,r){var o=[];return e&&e.forEach(function(i){var s=r(i);s&&o.push(s)}),o},t.prototype.getColumnWithValidation=function(e){if(e==null)return null;var r=this.getGridColumn(e);return r||console.warn("AG Grid: could not find column "+e),r},t.prototype.getPrimaryColumn=function(e){return this.primaryColumns?this.getColumn(e,this.primaryColumns,this.primaryColumnsMap):null},t.prototype.getGridColumn=function(e){return this.getColumn(e,this.gridColumns,this.gridColumnsMap)},t.prototype.getSecondaryColumn=function(e){return this.secondaryColumns?this.getColumn(e,this.secondaryColumns,this.secondaryColumnsMap):null},t.prototype.getColumn=function(e,r,o){if(!e)return null;if(typeof e=="string"&&o[e])return o[e];for(var i=0;i=0:g?M?E=C:F?E=S!=null&&S>=0:E=!1:E=r.indexOf(f)>=0,E){var I=g?w!=null||S!=null:w!=null;I?u.push(f):c.push(f)}});var p=function(f){var g=i(f.getColDef()),y=s(f.getColDef());return g??y};u.sort(function(f,g){var y=p(f),m=p(g);return y===m?0:y=0&&d.push(f)}),c.forEach(function(f){d.indexOf(f)<0&&d.push(f)}),r.forEach(function(f){d.indexOf(f)<0&&o(f,!1)}),d.forEach(function(f){r.indexOf(f)<0&&o(f,!0)}),d},t.prototype.extractPivotColumns=function(e,r){this.pivotColumns=this.extractColumns(r,this.pivotColumns,function(o,i){return o.setPivotActive(i,e)},function(o){return o.pivotIndex},function(o){return o.initialPivotIndex},function(o){return o.pivot},function(o){return o.initialPivot})},t.prototype.resetColumnGroupState=function(e){e===void 0&&(e="api");var r=[];this.columnUtils.depthFirstOriginalTreeSearch(null,this.primaryColumnTree,function(o){if(o instanceof re){var i=o.getColGroupDef(),s={groupId:o.getGroupId(),open:i?i.openByDefault:void 0};r.push(s)}}),this.setColumnGroupState(r,e)},t.prototype.getColumnGroupState=function(){var e=[];return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,function(r){r instanceof re&&e.push({groupId:r.getGroupId(),open:r.isExpanded()})}),e},t.prototype.setColumnGroupState=function(e,r){var o=this;r===void 0&&(r="api"),this.columnAnimationService.start();var i=[];e.forEach(function(s){var a=s.groupId,l=s.open,u=o.getProvidedColumnGroup(a);u&&u.isExpanded()!==l&&(o.logger.log("columnGroupOpened("+u.getGroupId()+","+l+")"),u.setExpanded(l),i.push(u))}),this.updateGroupsAndDisplayedColumns(r),this.setFirstRightAndLastLeftPinned(r),i.forEach(function(s){var a={type:v.EVENT_COLUMN_GROUP_OPENED,columnGroup:s};o.eventService.dispatchEvent(a)}),this.columnAnimationService.finish()},t.prototype.setColumnGroupOpened=function(e,r,o){o===void 0&&(o="api");var i;e instanceof re?i=e.getId():i=e||"",this.setColumnGroupState([{groupId:i,open:r}],o)},t.prototype.getProvidedColumnGroup=function(e){typeof e!="string"&&console.error("AG Grid: group key must be a string");var r=null;return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,function(o){o instanceof re&&o.getId()===e&&(r=o)}),r},t.prototype.calculateColumnsForDisplay=function(){var e=this,r;return this.pivotMode&&N(this.secondaryColumns)?r=this.gridColumns.filter(function(o){var i=e.groupAutoColumns&&Ie(e.groupAutoColumns,o),s=e.valueColumns&&Ie(e.valueColumns,o);return i||s}):r=this.gridColumns.filter(function(o){var i=e.groupAutoColumns&&Ie(e.groupAutoColumns,o);return i||o.isVisible()}),r},t.prototype.checkColSpanActiveInCols=function(e){var r=!1;return e.forEach(function(o){O(o.getColDef().colSpan)&&(r=!0)}),r},t.prototype.calculateColumnsForGroupDisplay=function(){var e=this;this.groupDisplayColumns=[],this.groupDisplayColumnsMap={};var r=function(o){var i=o.getColDef(),s=i.showRowGroup;i&&O(s)&&(e.groupDisplayColumns.push(o),typeof s=="string"?e.groupDisplayColumnsMap[s]=o:s===!0&&e.getRowGroupColumns().forEach(function(a){e.groupDisplayColumnsMap[a.getId()]=o}))};this.gridColumns.forEach(r)},t.prototype.getGroupDisplayColumns=function(){return this.groupDisplayColumns},t.prototype.getGroupDisplayColumnForGroup=function(e){return this.groupDisplayColumnsMap[e]},t.prototype.updateDisplayedColumns=function(e){var r=this.calculateColumnsForDisplay();this.buildDisplayedTrees(r),this.updateGroupsAndDisplayedColumns(e),this.setFirstRightAndLastLeftPinned(e)},t.prototype.isSecondaryColumnsPresent=function(){return O(this.secondaryColumns)},t.prototype.setSecondaryColumns=function(e,r){var o=this;r===void 0&&(r="api");var i=e&&e.length>0;if(!(!i&&N(this.secondaryColumns))){if(i){this.processSecondaryColumnDefinitions(e);var s=this.columnFactory.createColumnTree(e,!1,this.secondaryBalancedTree||this.previousSecondaryColumns||void 0);this.destroyOldColumns(this.secondaryBalancedTree,s.columnTree),this.secondaryBalancedTree=s.columnTree,this.secondaryHeaderRowCount=s.treeDept+1,this.secondaryColumns=this.getColumnsFromTree(this.secondaryBalancedTree),this.secondaryColumnsMap={},this.secondaryColumns.forEach(function(a){return o.secondaryColumnsMap[a.getId()]=a}),this.previousSecondaryColumns=null}else this.previousSecondaryColumns=this.secondaryBalancedTree,this.secondaryBalancedTree=null,this.secondaryHeaderRowCount=-1,this.secondaryColumns=null,this.secondaryColumnsMap={};this.updateGridColumns(),this.updateDisplayedColumns(r)}},t.prototype.processSecondaryColumnDefinitions=function(e){var r=this.gridOptionsService.get("processPivotResultColDef")||this.gridOptionsService.get("processSecondaryColDef"),o=this.gridOptionsService.get("processPivotResultColGroupDef")||this.gridOptionsService.get("processSecondaryColGroupDef");if(!(!r&&!o)){var i=function(s){s.forEach(function(a){var l=O(a.children);if(l){var u=a;o&&o(u),i(u.children)}else{var c=a;r&&r(c)}})};e&&i(e)}},t.prototype.updateGridColumns=function(){var e=this,r=this.gridBalancedTree;this.gridColsArePrimary?this.lastPrimaryOrder=this.gridColumns:this.lastSecondaryOrder=this.gridColumns;var o;if(this.secondaryColumns&&this.secondaryBalancedTree){var i=this.secondaryColumns.every(function(u){return e.gridColumnsMap[u.getColId()]!==void 0});this.gridBalancedTree=this.secondaryBalancedTree.slice(),this.gridHeaderRowCount=this.secondaryHeaderRowCount,this.gridColumns=this.secondaryColumns.slice(),this.gridColsArePrimary=!1,i&&(o=this.lastSecondaryOrder)}else this.primaryColumns&&(this.gridBalancedTree=this.primaryColumnTree.slice(),this.gridHeaderRowCount=this.primaryHeaderRowCount,this.gridColumns=this.primaryColumns.slice(),this.gridColsArePrimary=!0,o=this.lastPrimaryOrder);var s=this.createGroupAutoColumnsIfNeeded();if(s&&o){var a=vt(this.groupAutoColumns.map(function(u){return[u,!0]}));o=o.filter(function(u){return!a.has(u)}),o=Qt(Qt([],qt(this.groupAutoColumns)),qt(o))}if(this.addAutoGroupToGridColumns(),this.orderGridColsLike(o),this.gridColumns=this.placeLockedColumns(this.gridColumns),this.calculateColumnsForGroupDisplay(),this.refreshQuickFilterColumns(),this.clearDisplayedAndViewportColumns(),this.colSpanActive=this.checkColSpanActiveInCols(this.gridColumns),this.gridColumnsMap={},this.gridColumns.forEach(function(u){return e.gridColumnsMap[u.getId()]=u}),this.setAutoHeightActive(),!_t(r,this.gridBalancedTree)){var l={type:v.EVENT_GRID_COLUMNS_CHANGED};this.eventService.dispatchEvent(l)}},t.prototype.setAutoHeightActive=function(){if(this.autoHeightActive=this.gridColumns.filter(function(o){return o.isAutoHeight()}).length>0,this.autoHeightActive){this.autoHeightActiveAtLeastOnce=!0;var e=this.gridOptionsService.isRowModelType("clientSide")||this.gridOptionsService.isRowModelType("serverSide");if(!e){var r="AG Grid - autoHeight columns only work with Client Side Row Model and Server Side Row Model.";z(function(){return console.warn(r)},"autoHeightActive.wrongRowModel")}}},t.prototype.orderGridColsLike=function(e){if(!N(e)){var r=vt(e.map(function(c,p){return[c,p]})),o=!0;if(this.gridColumns.forEach(function(c){r.has(c)&&(o=!1)}),!o){var i=vt(this.gridColumns.map(function(c){return[c,!0]})),s=e.filter(function(c){return i.has(c)}),a=vt(s.map(function(c){return[c,!0]})),l=this.gridColumns.filter(function(c){return!a.has(c)}),u=s.slice();l.forEach(function(c){var p=c.getOriginalParent();if(!p){u.push(c);return}for(var d=[];!d.length&&p;){var f=p.getLeafColumns();f.forEach(function(m){var C=u.indexOf(m)>=0,w=d.indexOf(m)<0;C&&w&&d.push(m)}),p=p.getOriginalParent()}if(!d.length){u.push(c);return}var g=d.map(function(m){return u.indexOf(m)}),y=Math.max.apply(Math,Qt([],qt(g)));Gr(u,c,y+1)}),this.gridColumns=u}}},t.prototype.isPrimaryColumnGroupsPresent=function(){return this.primaryHeaderRowCount>1},t.prototype.refreshQuickFilterColumns=function(){var e,r=(e=this.isPivotMode()?this.secondaryColumns:this.primaryColumns)!==null&&e!==void 0?e:[];this.groupAutoColumns&&(r=r.concat(this.groupAutoColumns)),this.columnsForQuickFilter=this.gridOptionsService.is("includeHiddenColumnsInQuickFilter")?r:r.filter(function(o){return o.isVisible()||o.isRowGroupActive()})},t.prototype.placeLockedColumns=function(e){var r=[],o=[],i=[];return e.forEach(function(s){var a=s.getColDef().lockPosition;a==="right"?i.push(s):a==="left"||a===!0?r.push(s):o.push(s)}),Qt(Qt(Qt([],qt(r)),qt(o)),qt(i))},t.prototype.addAutoGroupToGridColumns=function(){if(N(this.groupAutoColumns)){this.destroyOldColumns(this.groupAutoColsBalancedTree),this.groupAutoColsBalancedTree=null;return}this.gridColumns=this.groupAutoColumns?this.groupAutoColumns.concat(this.gridColumns):this.gridColumns;var e=this.columnFactory.createForAutoGroups(this.groupAutoColumns,this.gridBalancedTree);this.destroyOldColumns(this.groupAutoColsBalancedTree,e),this.groupAutoColsBalancedTree=e,this.gridBalancedTree=e.concat(this.gridBalancedTree)},t.prototype.clearDisplayedAndViewportColumns=function(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.viewportColumns=[],this.headerViewportColumns=[],this.viewportColumnsHash=""},t.prototype.updateGroupsAndDisplayedColumns=function(e){this.updateOpenClosedVisibilityInColumnGroups(),this.deriveDisplayedColumns(e),this.refreshFlexedColumns(),this.extractViewport(),this.updateBodyWidths();var r={type:v.EVENT_DISPLAYED_COLUMNS_CHANGED};this.eventService.dispatchEvent(r)},t.prototype.deriveDisplayedColumns=function(e){this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeLeft,this.displayedColumnsLeft),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeCentre,this.displayedColumnsCenter),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeRight,this.displayedColumnsRight),this.joinDisplayedColumns(),this.setLeftValues(e),this.displayedAutoHeightCols=this.displayedColumns.filter(function(r){return r.isAutoHeight()})},t.prototype.isAutoRowHeightActive=function(){return this.autoHeightActive},t.prototype.wasAutoRowHeightEverActive=function(){return this.autoHeightActiveAtLeastOnce},t.prototype.joinDisplayedColumns=function(){this.gridOptionsService.is("enableRtl")?this.displayedColumns=this.displayedColumnsRight.concat(this.displayedColumnsCenter).concat(this.displayedColumnsLeft):this.displayedColumns=this.displayedColumnsLeft.concat(this.displayedColumnsCenter).concat(this.displayedColumnsRight)},t.prototype.setLeftValues=function(e){this.setLeftValuesOfColumns(e),this.setLeftValuesOfGroups()},t.prototype.setLeftValuesOfColumns=function(e){var r=this;if(this.primaryColumns){var o=this.primaryColumns.slice(0),i=this.gridOptionsService.is("enableRtl");[this.displayedColumnsLeft,this.displayedColumnsRight,this.displayedColumnsCenter].forEach(function(s){if(i){var a=r.getWidthOfColsInList(s);s.forEach(function(u){a-=u.getActualWidth(),u.setLeft(a,e)})}else{var l=0;s.forEach(function(u){u.setLeft(l,e),l+=u.getActualWidth()})}Vi(o,s)}),o.forEach(function(s){s.setLeft(null,e)})}},t.prototype.setLeftValuesOfGroups=function(){[this.displayedTreeLeft,this.displayedTreeRight,this.displayedTreeCentre].forEach(function(e){e.forEach(function(r){if(r instanceof we){var o=r;o.checkLeft()}})})},t.prototype.derivedDisplayedColumnsFromDisplayedTree=function(e,r){r.length=0,this.columnUtils.depthFirstDisplayedColumnTreeSearch(e,function(o){o instanceof X&&r.push(o)})},t.prototype.extractViewportColumns=function(){this.suppressColumnVirtualisation?(this.viewportColumnsCenter=this.displayedColumnsCenter,this.headerViewportColumnsCenter=this.displayedColumnsCenter):(this.viewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInRowViewport.bind(this)),this.headerViewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInHeaderViewport.bind(this))),this.viewportColumns=this.viewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight),this.headerViewportColumns=this.headerViewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight)},t.prototype.getVirtualHeaderGroupRow=function(e,r){var o;switch(e){case"left":o=this.viewportRowLeft[r];break;case"right":o=this.viewportRowRight[r];break;default:o=this.viewportRowCenter[r];break}return N(o)&&(o=[]),o},t.prototype.calculateHeaderRows=function(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={};var e={};this.headerViewportColumns.forEach(function(o){return e[o.getId()]=!0});var r=function(o,i,s){for(var a=!1,l=0;li;return E.getFlex()&&A},a=this.displayedColumnsCenter.filter(function(E){return!s(E)}),l=this.displayedColumnsCenter.filter(function(E){return s(E)}),u=[];if(!l.length)return[];var c=[],p;e:for(;;){var d=l.reduce(function(E,A){return E+A.getFlex()},0);p=this.flexViewportWidth-this.getWidthOfColsInList(a);for(var f=0;fw&&(m=w),m){g.setActualWidth(m,o),fe(l,g),u.push(g),a.push(g);continue e}c[f]=Math.round(y)}break}var S=p;return l.forEach(function(E,A){E.setActualWidth(Math.min(c[A],S),o),u.push(E),S-=c[A]}),e.skipSetLeft||this.setLeftValues(o),e.updateBodyWidths&&this.updateBodyWidths(),e.fireResizedEvent&&this.dispatchColumnResizedEvent(u,!0,o,l),l},t.prototype.sizeColumnsToFit=function(e,r,o,i){var s=this,a,l,u,c,p;if(r===void 0&&(r="sizeColumnsToFit"),this.shouldQueueResizeOperations){this.resizeOperationQueue.push(function(){return s.sizeColumnsToFit(e,r,o,i)});return}var d={};i&&((a=i==null?void 0:i.columnLimits)===null||a===void 0||a.forEach(function(Z){var ht=Z.key,ur=Lc(Z,["key"]);d[typeof ht=="string"?ht:ht.getColId()]=ur}));var f=this.getAllDisplayedColumns(),g=e===this.getWidthOfColsInList(f);if(!(e<=0||!f.length||g)){var y=[],m=[];f.forEach(function(Z){Z.getColDef().suppressSizeToFit===!0?m.push(Z):y.push(Z)});var C=y.slice(0),w=!1,S=function(Z){fe(y,Z),m.push(Z)};for(y.forEach(function(Z){return Z.resetActualWidth(r)});!w;){w=!0;var E=e-this.getWidthOfColsInList(m);if(E<=0)y.forEach(function(Z){var ht,ur,Nu=(ur=(ht=d==null?void 0:d[Z.getId()])===null||ht===void 0?void 0:ht.minWidth)!==null&&ur!==void 0?ur:i==null?void 0:i.defaultMinWidth;if(typeof Nu=="number"){Z.setActualWidth(Nu);return}Z.setMinimum(r)});else for(var A=E/this.getWidthOfColsInList(y),b=E,M=y.length-1;M>=0;M--){var F=y[M],I=d==null?void 0:d[F.getId()],V=(l=I==null?void 0:I.minWidth)!==null&&l!==void 0?l:i==null?void 0:i.defaultMinWidth,k=(u=I==null?void 0:I.maxWidth)!==null&&u!==void 0?u:i==null?void 0:i.defaultMaxWidth,K=(c=F.getMinWidth())!==null&&c!==void 0?c:0,te=(p=F.getMaxWidth())!==null&&p!==void 0?p:Number.MAX_VALUE,Oe=typeof V=="number"&&V>K?V:F.getMinWidth(),se=typeof k=="number"&&kse?(Te=se,S(F),w=!1):M===0&&(Te=b),F.setActualWidth(Te,r,!0),b-=Te}}C.forEach(function(Z){Z.fireColumnWidthChangedEvent(r)}),this.setLeftValues(r),this.updateBodyWidths(),!o&&this.dispatchColumnResizedEvent(C,!0,r)}},t.prototype.buildDisplayedTrees=function(e){var r=[],o=[],i=[];e.forEach(function(a){switch(a.getPinned()){case"left":r.push(a);break;case"right":o.push(a);break;default:i.push(a);break}});var s=new la;this.displayedTreeLeft=this.displayedGroupCreator.createDisplayedGroups(r,this.gridBalancedTree,s,"left",this.displayedTreeLeft),this.displayedTreeRight=this.displayedGroupCreator.createDisplayedGroups(o,this.gridBalancedTree,s,"right",this.displayedTreeRight),this.displayedTreeCentre=this.displayedGroupCreator.createDisplayedGroups(i,this.gridBalancedTree,s,null,this.displayedTreeCentre),this.updateDisplayedMap()},t.prototype.updateDisplayedMap=function(){var e=this;this.displayedColumnsAndGroupsMap={};var r=function(o){e.displayedColumnsAndGroupsMap[o.getUniqueId()]=o};this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeCentre,r),this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeLeft,r),this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeRight,r)},t.prototype.isDisplayed=function(e){var r=this.displayedColumnsAndGroupsMap[e.getUniqueId()];return r===e},t.prototype.updateOpenClosedVisibilityInColumnGroups=function(){var e=this.getAllDisplayedTrees();this.columnUtils.depthFirstAllColumnTreeSearch(e,function(r){if(r instanceof we){var o=r;o.calculateDisplayedColumns()}})},t.prototype.getGroupAutoColumns=function(){return this.groupAutoColumns},t.prototype.createGroupAutoColumnsIfNeeded=function(){var e=this.forceRecreateAutoGroups;if(this.forceRecreateAutoGroups=!1,!this.autoGroupsNeedBuilding)return!1;this.autoGroupsNeedBuilding=!1;var r=this.gridOptionsService.isGroupUseEntireRow(this.pivotMode),o=this.pivotMode?this.gridOptionsService.is("pivotSuppressAutoColumn"):this.isGroupSuppressAutoColumn(),i=this.rowGroupColumns.length>0||this.usingTreeData,s=i&&!o&&!r;if(s){var a=this.groupAutoColumns||[],l=this.autoGroupColService.createAutoGroupColumns(a,this.rowGroupColumns),u=!this.autoColsEqual(l,this.groupAutoColumns);if(u||e)return this.groupAutoColumns=l,!0}else this.groupAutoColumns=null;return!1},t.prototype.isGroupSuppressAutoColumn=function(){var e=this.gridOptionsService.get("groupDisplayType"),r=e?Ki("custom",e):!1;if(r)return!0;var o=this.gridOptionsService.get("treeDataDisplayType");return o?bc("custom",o):!1},t.prototype.autoColsEqual=function(e,r){return _t(e,r,function(o,i){return o.getColId()===i.getColId()})},t.prototype.getWidthOfColsInList=function(e){return e.reduce(function(r,o){return r+o.getActualWidth()},0)},t.prototype.getGridBalancedTree=function(){return this.gridBalancedTree},t.prototype.hasFloatingFilters=function(){if(!this.gridColumns)return!1;var e=this.gridColumns.some(function(r){return r.getColDef().floatingFilter});return e},t.prototype.getFirstDisplayedColumn=function(){var e=this.gridOptionsService.is("enableRtl"),r=["getDisplayedLeftColumns","getDisplayedCenterColumns","getDisplayedRightColumns"];e&&r.reverse();for(var o=0;o=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Gc=function(n){Ic(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.calculateColMinWidth=function(e){return e.minWidth!=null?e.minWidth:this.environment.getMinColWidth()},t.prototype.calculateColMaxWidth=function(e){return e.maxWidth!=null?e.maxWidth:Number.MAX_SAFE_INTEGER},t.prototype.calculateColInitialWidth=function(e){var r=this.calculateColMinWidth(e),o=this.calculateColMaxWidth(e),i,s=Me(e.width),a=Me(e.initialWidth);return s!=null?i=s:a!=null?i=a:i=200,Math.max(Math.min(i,o),r)},t.prototype.getOriginalPathForColumn=function(e,r){var o=[],i=!1,s=function(a,l){for(var u=0;u=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Bc=function(n){Hc(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.createDisplayedGroups=function(e,r,o,i,s){var a=this,l=[],u,c,p=this.mapOldGroupsById(s);return e.forEach(function(d){for(var f=a.getOriginalPathForColumn(r,d),g=[],y=!c,m=0;m=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},kc=function(n){Wc(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.componentsMappedByName={},e}return t.prototype.setupComponents=function(e){var r=this;e&&e.forEach(function(o){return r.addComponent(o)})},t.prototype.addComponent=function(e){var r=e.componentName.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o=r.toUpperCase();this.componentsMappedByName[o]=e.componentClass},t.prototype.getComponentClass=function(e){return this.componentsMappedByName[e]},t=jc([x("agStackComponentsRegistry")],t),t}(T);function nt(n,t,e){e==null||e==""?Yi(n,t):Ge(n,t,e)}function Ge(n,t,e){n.setAttribute(va(t),e.toString())}function Yi(n,t){n.removeAttribute(va(t))}function va(n){return"aria-"+n}function le(n,t){t?n.setAttribute("role",t):n.removeAttribute("role")}function ga(n){var t;return n==="asc"?t="ascending":n==="desc"?t="descending":n==="mixed"?t="other":t="none",t}function ya(n){return parseInt(n.getAttribute("aria-level"),10)}function Ca(n){return parseInt(n.getAttribute("aria-posinset"),10)}function Uc(n){return n.getAttribute("aria-describedby")||""}function Dt(n,t){nt(n,"label",t)}function bo(n,t){nt(n,"labelledby",t)}function ma(n,t){nt(n,"description",t)}function wa(n,t){nt(n,"describedby",t)}function Sa(n,t){nt(n,"live",t)}function Ea(n,t){nt(n,"level",t)}function qi(n,t){nt(n,"disabled",t)}function Fo(n,t){nt(n,"hidden",t)}function Ke(n,t){Ge(n,"expanded",t)}function _a(n){Yi(n,"expanded")}function Qi(n,t){Ge(n,"setsize",t)}function Xi(n,t){Ge(n,"posinset",t)}function Ra(n,t){Ge(n,"multiselectable",t)}function Oa(n,t){Ge(n,"rowcount",t)}function Ji(n,t){Ge(n,"rowindex",t)}function Ta(n,t){Ge(n,"colcount",t)}function Zi(n,t){Ge(n,"colindex",t)}function Pa(n,t){Ge(n,"colspan",t)}function Da(n,t){Ge(n,"sort",t)}function Aa(n){Yi(n,"sort")}function dr(n,t){nt(n,"selected",t)}function ba(n,t){Ge(n,"checked",t===void 0?"mixed":t)}function zc(n,t){nt(n,"controls",t.id),bo(t,n.id)}function xo(n,t){return t===void 0?n("ariaIndeterminate","indeterminate"):t===!0?n("ariaChecked","checked"):n("ariaUnchecked","unchecked")}var $c=Object.freeze({__proto__:null,setAriaRole:le,getAriaSortState:ga,getAriaLevel:ya,getAriaPosInSet:Ca,getAriaDescribedBy:Uc,setAriaLabel:Dt,setAriaLabelledBy:bo,setAriaDescription:ma,setAriaDescribedBy:wa,setAriaLive:Sa,setAriaLevel:Ea,setAriaDisabled:qi,setAriaHidden:Fo,setAriaExpanded:Ke,removeAriaExpanded:_a,setAriaSetSize:Qi,setAriaPosInSet:Xi,setAriaMultiSelectable:Ra,setAriaRowCount:Oa,setAriaRowIndex:Ji,setAriaColCount:Ta,setAriaColIndex:Zi,setAriaColSpan:Pa,setAriaSort:Da,removeAriaSort:Aa,setAriaSelected:dr,setAriaChecked:ba,setAriaControls:zc,getAriaCheckboxStateName:xo}),en,Lo,tn,rn,on,nn,sn,an;function He(){return en===void 0&&(en=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),en}function ln(){if(Lo===void 0)if(He()){var n=navigator.userAgent.match(/version\/(\d+)/i);n&&(Lo=n[1]!=null?parseFloat(n[1]):0)}else Lo=0;return Lo}function Mo(){if(tn===void 0){var n=window;tn=!!n.chrome&&(!!n.chrome.webstore||!!n.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return tn}function un(){return rn===void 0&&(rn=/(firefox)/i.test(navigator.userAgent)),rn}function cn(){return on===void 0&&(on=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),on}function At(){return nn===void 0&&(nn=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),nn}function Io(){return!He()||ln()>=15}function No(n){if(!n)return null;var t=n.tabIndex,e=n.getAttribute("tabIndex");return t===-1&&(e===null||e===""&&!un())?null:t.toString()}function Fa(){if(!document.body)return-1;var n=1e6,t=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,e=document.createElement("div");for(document.body.appendChild(e);;){var r=n*2;if(e.style.height=r+"px",r>t||e.clientHeight!==r)break;n=r}return document.body.removeChild(e),n}function xa(){var n,t,e;return(t=(n=document.body)===null||n===void 0?void 0:n.clientWidth)!==null&&t!==void 0?t:window.innerHeight||((e=document.documentElement)===null||e===void 0?void 0:e.clientWidth)||-1}function La(){var n,t,e;return(t=(n=document.body)===null||n===void 0?void 0:n.clientHeight)!==null&&t!==void 0?t:window.innerHeight||((e=document.documentElement)===null||e===void 0?void 0:e.clientHeight)||-1}function Ma(){return an==null&&Ia(),an}function Ia(){var n=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",n.appendChild(t);var e=t.offsetWidth-t.clientWidth;e===0&&t.clientWidth===0&&(e=null),t.parentNode&&t.parentNode.removeChild(t),e!=null&&(an=e,sn=e===0)}function hr(){return sn==null&&Ia(),sn}var Kc=Object.freeze({__proto__:null,isBrowserSafari:He,getSafariVersion:ln,isBrowserChrome:Mo,isBrowserFirefox:un,isMacOsUserAgent:cn,isIOSUserAgent:At,browserSupportsPreventScroll:Io,getTabIndex:No,getMaxDivHeight:Fa,getBodyWidth:xa,getBodyHeight:La,getScrollbarWidth:Ma,isInvisibleScrollbar:hr});function fr(n,t){return n.toString().padStart(t,"0")}function Na(n,t){for(var e=[],r=n;r<=t;r++)e.push(r);return e}function Yc(n){return typeof n=="string"&&(n=parseInt(n,10)),typeof n=="number"?Math.floor(n):null}function qc(n,t){for(var e="",r=0;r>>=8;return e}function Qc(n,t,e){return typeof n!="number"?"":pn(Math.round(n*100)/100,t,e)}function pn(n,t,e){return typeof n!="number"?"":n.toString().replace(".",e).replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+t)}function Xc(n){return n==null?null:n.reduce(function(t,e){return t+e},0)}function Jc(n,t){return n>=0?n:t}function Zc(n,t){var e=parseInt(n,10);return!isNaN(e)&&isFinite(e)&&e>0?e:t}var ep=Object.freeze({__proto__:null,padStartWidthZeros:fr,createArrayOfNumbers:Na,cleanNumber:Yc,decToHex:qc,formatNumberTwoDecimalPlacesAndCommas:Qc,formatNumberCommas:pn,sum:Xc,zeroOrGreater:Jc,oneOrGreater:Zc}),dn=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i};function Ve(n,t,e){if(t===void 0&&(t=!0),e===void 0&&(e="-"),!n)return null;var r=[n.getFullYear(),n.getMonth()+1,n.getDate()].map(function(o){return fr(o,2)}).join(e);return t&&(r+=" "+[n.getHours(),n.getMinutes(),n.getSeconds()].map(function(o){return fr(o,2)}).join(":")),r}var hn=function(n){if(n>3&&n<21)return"th";var t=n%10;switch(t){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};function Go(n,t){t===void 0&&(t="YYYY-MM-DD");var e=fr(n.getFullYear(),4),r=["January","February","March","April","May","June","July","August","September","October","November","December"],o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],i={YYYY:function(){return e.slice(e.length-4,e.length)},YY:function(){return e.slice(e.length-2,e.length)},Y:function(){return""+n.getFullYear()},MMMM:function(){return r[n.getMonth()]},MMM:function(){return r[n.getMonth()].slice(0,3)},MM:function(){return fr(n.getMonth()+1,2)},Mo:function(){return""+(n.getMonth()+1)+hn(n.getMonth()+1)},M:function(){return""+(n.getMonth()+1)},Do:function(){return""+n.getDate()+hn(n.getDate())},DD:function(){return fr(n.getDate(),2)},D:function(){return""+n.getDate()},dddd:function(){return o[n.getDay()]},ddd:function(){return o[n.getDay()].slice(0,3)},dd:function(){return o[n.getDay()].slice(0,2)},do:function(){return""+n.getDay()+hn(n.getDay())},d:function(){return""+n.getDay()}},s=new RegExp(Object.keys(i).join("|"),"g");return t.replace(s,function(a){return a in i?i[a]():a})}function Ye(n){if(!n)return null;var t=dn(n.split(" "),2),e=t[0],r=t[1];if(!e)return null;var o=e.split("-").map(function(g){return parseInt(g,10)});if(o.filter(function(g){return!isNaN(g)}).length!==3)return null;var i=dn(o,3),s=i[0],a=i[1],l=i[2],u=new Date(s,a-1,l);if(u.getFullYear()!==s||u.getMonth()!==a-1||u.getDate()!==l)return null;if(!r||r==="00:00:00")return u;var c=dn(r.split(":").map(function(g){return parseInt(g,10)}),3),p=c[0],d=c[1],f=c[2];return p>=0&&p<24&&u.setHours(p),d>=0&&d<60&&u.setMinutes(d),f>=0&&f<60&&u.setSeconds(f),u}var tp=Object.freeze({__proto__:null,serialiseDate:Ve,dateToFormattedString:Go,parseDateTimeFromString:Ye}),rp=function(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},op=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Ho;function ip(n,t,e){for(var r=n.parentElement,o=r&&r.firstChild;o;)t&&o.classList.toggle(t,o===n),e&&o.classList.toggle(e,o!==n),o=o.nextSibling}var Ga="[tabindex], input, select, button, textarea, [href]",fn=".ag-hidden, .ag-hidden *, [disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function vn(n){var t=Element.prototype.matches||Element.prototype.msMatchesSelector,e="input, select, button, textarea",r=t.call(n,e),o=t.call(n,fn),i=Ct(n),s=r&&!o&&i;return s}function U(n,t,e){e===void 0&&(e={});var r=e.skipAriaHidden;n.classList.toggle("ag-hidden",!t),r||Fo(n,!t)}function Ha(n,t,e){e===void 0&&(e={});var r=e.skipAriaHidden;n.classList.toggle("ag-invisible",!t),r||Fo(n,!t)}function vr(n,t){var e="disabled",r=t?function(o){return o.setAttribute(e,"")}:function(o){return o.removeAttribute(e)};r(n),Rn(n.querySelectorAll("input"),function(o){return r(o)})}function Xt(n,t,e){for(var r=0;n;){if(n.classList.contains(t))return!0;if(n=n.parentElement,typeof e=="number"){if(++r>e)break}else if(n===e)break}return!1}function bt(n){var t=window.getComputedStyle(n),e=t.height,r=t.width,o=t.borderTopWidth,i=t.borderRightWidth,s=t.borderBottomWidth,a=t.borderLeftWidth,l=t.paddingTop,u=t.paddingRight,c=t.paddingBottom,p=t.paddingLeft,d=t.marginTop,f=t.marginRight,g=t.marginBottom,y=t.marginLeft,m=t.boxSizing;return{height:parseFloat(e),width:parseFloat(r),borderTopWidth:parseFloat(o),borderRightWidth:parseFloat(i),borderBottomWidth:parseFloat(s),borderLeftWidth:parseFloat(a),paddingTop:parseFloat(l),paddingRight:parseFloat(u),paddingBottom:parseFloat(c),paddingLeft:parseFloat(p),marginTop:parseFloat(d),marginRight:parseFloat(f),marginBottom:parseFloat(g),marginLeft:parseFloat(y),boxSizing:m}}function Br(n){var t=bt(n);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function Vo(n){var t=bt(n);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function gn(n){var t=bt(n),e=t.marginBottom+t.marginTop;return Math.ceil(n.offsetHeight+e)}function Bo(n){var t=bt(n),e=t.marginLeft+t.marginRight;return Math.ceil(n.offsetWidth+e)}function yn(n){var t=n.getBoundingClientRect(),e=bt(n),r=e.borderTopWidth,o=e.borderLeftWidth,i=e.borderRightWidth,s=e.borderBottomWidth;return{top:t.top+(r||0),left:t.left+(o||0),right:t.right+(i||0),bottom:t.bottom+(s||0)}}function Wr(){if(typeof Ho=="boolean")return Ho;var n=document.createElement("div");return n.style.direction="rtl",n.style.width="1px",n.style.height="1px",n.style.position="fixed",n.style.top="0px",n.style.overflow="hidden",n.dir="rtl",n.innerHTML=`
+For more info see: https://www.ag-grid.com/javascript-grid/packages/`;return z(function(){console.warn(s)},i),!1},n.__isRegistered=function(t,e){var r;return!!n.globalModulesMap[t]||!!(!((r=n.gridModulesMap[e])===null||r===void 0)&&r[t])},n.__getRegisteredModules=function(t){return Ys(Ys([],Nr($t(n.globalModulesMap))),Nr($t(n.gridModulesMap[t]||{})))},n.__getGridRegisteredModules=function(t){var e;return $t((e=n.gridModulesMap[t])!==null&&e!==void 0?e:{})||[]},n.__isPackageBased=function(){return!n.moduleBased},n.globalModulesMap={},n.gridModulesMap={},n.areGridScopedModules=!1,n}(),Ju=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Zu=function(n,t){for(var e=0,r=t.length,o=n.length;e> creating ag-Application Context"),this.createBeans();var r=this.getBeanInstances();this.wireBeans(r),this.logger.log(">> ag-Application Context ready - component is alive")}}return n.prototype.getBeanInstances=function(){return $t(this.beanWrappers).map(function(t){return t.beanInstance})},n.prototype.createBean=function(t,e){if(!t)throw Error("Can't wire to bean since it is null");return this.wireBeans([t],e),t},n.prototype.wireBeans=function(t,e){this.autoWireBeans(t),this.methodWireBeans(t),this.callLifeCycleMethods(t,"preConstructMethods"),O(e)&&t.forEach(e),this.callLifeCycleMethods(t,"postConstructMethods")},n.prototype.createBeans=function(){var t=this;this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),J(this.beanWrappers,function(r,o){var i;o.bean.__agBeanMetaData&&o.bean.__agBeanMetaData.autowireMethods&&o.bean.__agBeanMetaData.autowireMethods.agConstructor&&(i=o.bean.__agBeanMetaData.autowireMethods.agConstructor);var s=t.getBeansForParameters(i,o.bean.name),a=new(o.bean.bind.apply(o.bean,Zu([null],Ju(s))));o.beanInstance=a});var e=Object.keys(this.beanWrappers).join(", ");this.logger.log("created beans: "+e)},n.prototype.createBeanWrapper=function(t){var e=t.__agBeanMetaData;if(!e){var r=void 0;t.prototype.constructor?r=So(t.prototype.constructor):r=""+t,console.error("Context item "+r+" is not a bean");return}var o={bean:t,beanInstance:null,beanName:e.beanName};this.beanWrappers[e.beanName]=o},n.prototype.autoWireBeans=function(t){var e=this;t.forEach(function(r){e.forEachMetaDataInHierarchy(r,function(o,i){var s=o.agClassAttributes;s&&s.forEach(function(a){var l=e.lookupBeanInstance(i,a.beanName,a.optional);r[a.attributeName]=l})})})},n.prototype.methodWireBeans=function(t){var e=this;t.forEach(function(r){e.forEachMetaDataInHierarchy(r,function(o,i){J(o.autowireMethods,function(s,a){if(s!=="agConstructor"){var l=e.getBeansForParameters(a,i);r[s].apply(r,l)}})})})},n.prototype.forEachMetaDataInHierarchy=function(t,e){for(var r=Object.getPrototypeOf(t);r!=null;){var o=r.constructor;if(o.hasOwnProperty("__agBeanMetaData")){var i=o.__agBeanMetaData,s=this.getBeanName(o);e(i,s)}r=Object.getPrototypeOf(r)}},n.prototype.getBeanName=function(t){if(t.__agBeanMetaData&&t.__agBeanMetaData.beanName)return t.__agBeanMetaData.beanName;var e=t.toString(),r=e.substring(9,e.indexOf("("));return r},n.prototype.getBeansForParameters=function(t,e){var r=this,o=[];return t&&J(t,function(i,s){var a=r.lookupBeanInstance(e,s);o[Number(i)]=a}),o},n.prototype.lookupBeanInstance=function(t,e,r){if(r===void 0&&(r=!1),this.destroyed)return this.logger.log("AG Grid: bean reference "+e+" is used after the grid is destroyed!"),null;if(e==="context")return this;if(this.contextParams.providedBeanInstances&&this.contextParams.providedBeanInstances.hasOwnProperty(e))return this.contextParams.providedBeanInstances[e];var o=this.beanWrappers[e];return o?o.beanInstance:(r||console.error("AG Grid: unable to find bean reference "+e+" while initialising "+t),null)},n.prototype.callLifeCycleMethods=function(t,e){var r=this;t.forEach(function(o){return r.callLifeCycleMethodsOnBean(o,e)})},n.prototype.callLifeCycleMethodsOnBean=function(t,e,r){var o={};this.forEachMetaDataInHierarchy(t,function(s){var a=s[e];a&&a.forEach(function(l){l!=r&&(o[l]=!0)})});var i=Object.keys(o);i.forEach(function(s){return t[s]()})},n.prototype.getBean=function(t){return this.lookupBeanInstance("getBean",t,!0)},n.prototype.destroy=function(){if(!this.destroyed){this.logger.log(">> Shutting down ag-Application Context");var t=this.getBeanInstances();this.destroyBeans(t),this.contextParams.providedBeanInstances=null,G.__unRegisterGridModules(this.contextParams.gridId),this.destroyed=!0,this.logger.log(">> ag-Application Context shut down - component is dead")}},n.prototype.destroyBean=function(t){t&&this.destroyBeans([t])},n.prototype.destroyBeans=function(t){var e=this;return t?(t.forEach(function(r){e.callLifeCycleMethodsOnBean(r,"preDestroyMethods","destroy");var o=r;typeof o.destroy=="function"&&o.destroy()}),[]):[]},n.prototype.isDestroyed=function(){return this.destroyed},n.prototype.getGridId=function(){return this.contextParams.gridId},n}();function qs(n,t,e){var r=Kt(n.constructor);r.preConstructMethods||(r.preConstructMethods=[]),r.preConstructMethods.push(t)}function P(n,t,e){var r=Kt(n.constructor);r.postConstructMethods||(r.postConstructMethods=[]),r.postConstructMethods.push(t)}function ae(n,t,e){var r=Kt(n.constructor);r.preDestroyMethods||(r.preDestroyMethods=[]),r.preDestroyMethods.push(t)}function x(n){return function(t){var e=Kt(t);e.beanName=n}}function h(n){return function(t,e,r){Qs(t,n,!1,t,e,null)}}function Y(n){return function(t,e,r){Qs(t,n,!0,t,e,null)}}function Qs(n,t,e,r,o,i){if(t===null){console.error("AG Grid: Autowired name should not be null");return}if(typeof i=="number"){console.error("AG Grid: Autowired should be on an attribute");return}var s=Kt(n.constructor);s.agClassAttributes||(s.agClassAttributes=[]),s.agClassAttributes.push({attributeName:o,beanName:t,optional:e})}function ye(n){return function(t,e,r){var o=typeof t=="function"?t:t.constructor,i;if(typeof r=="number"){var s=void 0;e?(i=Kt(o),s=e):(i=Kt(o),s="agConstructor"),i.autowireMethods||(i.autowireMethods={}),i.autowireMethods[s]||(i.autowireMethods[s]={}),i.autowireMethods[s][r]=n}}}function Kt(n){return n.hasOwnProperty("__agBeanMetaData")||(n.__agBeanMetaData={}),n.__agBeanMetaData}var Xs=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},_o=function(n,t){return function(e,r){t(e,r,n)}},Et=function(){function n(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}return n.prototype.setBeans=function(t,e,r,o){if(o===void 0&&(o=null),this.frameworkOverrides=r,this.gridOptionsService=e,o){var i=e.useAsyncEvents();this.addGlobalListener(o,i)}},n.prototype.getListeners=function(t,e,r){var o=e?this.allAsyncListeners:this.allSyncListeners,i=o.get(t);return!i&&r&&(i=new Set,o.set(t,i)),i},n.prototype.noRegisteredListenersExist=function(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0},n.prototype.addEventListener=function(t,e,r){r===void 0&&(r=!1),this.getListeners(t,r,!0).add(e)},n.prototype.removeEventListener=function(t,e,r){r===void 0&&(r=!1);var o=this.getListeners(t,r,!1);if(o&&(o.delete(e),o.size===0)){var i=r?this.allAsyncListeners:this.allSyncListeners;i.delete(t)}},n.prototype.addGlobalListener=function(t,e){e===void 0&&(e=!1),(e?this.globalAsyncListeners:this.globalSyncListeners).add(t)},n.prototype.removeGlobalListener=function(t,e){e===void 0&&(e=!1),(e?this.globalAsyncListeners:this.globalSyncListeners).delete(t)},n.prototype.dispatchEvent=function(t){var e=t;if(this.gridOptionsService){var r=this.gridOptionsService,o=r.api,i=r.columnApi,s=r.context;e.api=o,e.columnApi=i,e.context=s}this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0},n.prototype.dispatchEventOnce=function(t){this.firedEvents[t.type]||this.dispatchEvent(t)},n.prototype.dispatchToListeners=function(t,e){var r=this,o=t.type;if(e&&"event"in t){var i=t.event;i instanceof Event&&(t.eventPath=i.composedPath())}var s=function(u){return u.forEach(function(c){e?r.dispatchAsync(function(){return c(t)}):c(t)})},a=new Set(this.getListeners(o,e,!1));a&&s(a);var l=new Set(e?this.globalAsyncListeners:this.globalSyncListeners);l.forEach(function(u){e?r.dispatchAsync(function(){return r.frameworkOverrides.dispatchEvent(o,function(){return u(o,t)},!0)}):r.frameworkOverrides.dispatchEvent(o,function(){return u(o,t)},!0)})},n.prototype.dispatchAsync=function(t){this.asyncFunctionsQueue.push(t),this.scheduled||(window.setTimeout(this.flushAsyncQueue.bind(this),0),this.scheduled=!0)},n.prototype.flushAsyncQueue=function(){this.scheduled=!1;var t=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],t.forEach(function(e){return e()})},Xs([_o(0,ye("loggerFactory")),_o(1,ye("gridOptionsService")),_o(2,ye("frameworkOverrides")),_o(3,ye("globalEventListener"))],n.prototype,"setBeans",null),n=Xs([x("eventService")],n),n}(),Ro=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Js=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Zs=function(n,t){for(var e=0,r=t.length,o=n.length;e=0&&!t,this.tooltipFieldContainsDots=O(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!t},n.prototype.initMinAndMaxWidths=function(){var t=this.colDef;this.minWidth=this.columnUtils.calculateColMinWidth(t),this.maxWidth=this.columnUtils.calculateColMaxWidth(t)},n.prototype.initTooltip=function(){this.tooltipEnabled=O(this.colDef.tooltipField)||O(this.colDef.tooltipValueGetter)||O(this.colDef.tooltipComponent)},n.prototype.resetActualWidth=function(t){t===void 0&&(t="api");var e=this.columnUtils.calculateColInitialWidth(this.colDef);this.setActualWidth(e,t,!0)},n.prototype.isEmptyGroup=function(){return!1},n.prototype.isRowGroupDisplayed=function(t){if(N(this.colDef)||N(this.colDef.showRowGroup))return!1;var e=this.colDef.showRowGroup===!0,r=this.colDef.showRowGroup===t;return e||r},n.prototype.isPrimary=function(){return this.primary},n.prototype.isFilterAllowed=function(){var t=!!this.colDef.filter;return t},n.prototype.isFieldContainsDots=function(){return this.fieldContainsDots},n.prototype.isTooltipEnabled=function(){return this.tooltipEnabled},n.prototype.isTooltipFieldContainsDots=function(){return this.tooltipFieldContainsDots},n.prototype.validate=function(){var t=this.colDef;function e(u,c,p){z(function(){p?console.warn(u,p):z(function(){return console.warn(u)},c)},c)}var r=this.gridOptionsService.isRowModelType("clientSide");if(r&&!G.__isRegistered(L.RowGroupingModule,this.gridOptionsService.getGridId())){var o=["enableRowGroup","rowGroup","rowGroupIndex","enablePivot","enableValue","pivot","pivotIndex","aggFunc"],i=o.filter(function(u){return O(t[u])});i.length>0&&G.__assertRegistered(L.RowGroupingModule,i.map(function(u){return"colDef."+u}).join(", "),this.gridOptionsService.getGridId())}if((this.colDef.cellEditor==="agRichSelect"||this.colDef.cellEditor==="agRichSelectCellEditor")&&G.__assertRegistered(L.RichSelectModule,this.colDef.cellEditor,this.gridOptionsService.getGridId()),this.gridOptionsService.isTreeData()){var s=["rowGroup","rowGroupIndex","pivot","pivotIndex"],i=s.filter(function(c){return O(t[c])});i.length>0&&e("AG Grid: "+i.join()+" is not possible when doing tree data, your column definition should not have "+i.join(),"TreeDataCannotRowGroup")}if(O(t.menuTabs))if(Array.isArray(t.menuTabs)){var a=["filterMenuTab"],l=["columnsMenuTab","generalMenuTab"],i=l.filter(function(c){return t.menuTabs.includes(c)});i.length>0&&G.__assertRegistered(L.MenuModule,"menuTab(s): "+i.map(function(c){return"'"+c+"'"}).join(),this.gridOptionsService.getGridId()),t.menuTabs.forEach(function(c){!l.includes(c)&&!a.includes(c)&&e("AG Grid: '"+c+"' is not valid for 'colDef.menuTabs'. Valid values are: "+Zs(Zs([],Js(a)),Js(l)).map(function(p){return"'"+p+"'"}).join()+".","wrongValue_menuTabs_"+c)})}else e("AG Grid: The typeof 'colDef.menuTabs' should be an array not:"+typeof t.menuTabs,"wrongType_menuTabs");O(t.columnsMenuParams)&&G.__assertRegistered(L.MenuModule,"columnsMenuParams",this.gridOptionsService.getGridId()),O(t.columnsMenuParams)&&G.__assertRegistered(L.ColumnsToolPanelModule,"columnsMenuParams",this.gridOptionsService.getGridId()),O(this.colDef.width)&&typeof this.colDef.width!="number"&&e("AG Grid: colDef.width should be a number, not "+typeof this.colDef.width,"ColumnCheck"),O(t.columnGroupShow)&&t.columnGroupShow!=="closed"&&t.columnGroupShow!=="open"&&e("AG Grid: '"+t.columnGroupShow+"' is not valid for columnGroupShow. Valid values are 'open', 'closed', undefined, null","columnGroupShow_invalid")},n.prototype.addEventListener=function(t,e){this.eventService.addEventListener(t,e)},n.prototype.removeEventListener=function(t,e){this.eventService.removeEventListener(t,e)},n.prototype.createColumnFunctionCallbackParams=function(t){return{node:t,data:t.data,column:this,colDef:this.colDef,context:this.gridOptionsService.context,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi}},n.prototype.isSuppressNavigable=function(t){if(typeof this.colDef.suppressNavigable=="boolean")return this.colDef.suppressNavigable;if(typeof this.colDef.suppressNavigable=="function"){var e=this.createColumnFunctionCallbackParams(t),r=this.colDef.suppressNavigable;return r(e)}return!1},n.prototype.isCellEditable=function(t){return t.group&&!this.gridOptionsService.is("enableGroupEdit")?!1:this.isColumnFunc(t,this.colDef.editable)},n.prototype.isSuppressFillHandle=function(){return!!et(this.colDef.suppressFillHandle)},n.prototype.isAutoHeight=function(){return!!et(this.colDef.autoHeight)},n.prototype.isAutoHeaderHeight=function(){return!!et(this.colDef.autoHeaderHeight)},n.prototype.isRowDrag=function(t){return this.isColumnFunc(t,this.colDef.rowDrag)},n.prototype.isDndSource=function(t){return this.isColumnFunc(t,this.colDef.dndSource)},n.prototype.isCellCheckboxSelection=function(t){return this.isColumnFunc(t,this.colDef.checkboxSelection)},n.prototype.isSuppressPaste=function(t){return this.isColumnFunc(t,this.colDef?this.colDef.suppressPaste:null)},n.prototype.isResizable=function(){return!!et(this.colDef.resizable)},n.prototype.isColumnFunc=function(t,e){if(typeof e=="boolean")return e;if(typeof e=="function"){var r=this.createColumnFunctionCallbackParams(t),o=e;return o(r)}return!1},n.prototype.setMoving=function(t,e){e===void 0&&(e="api"),this.moving=t,this.eventService.dispatchEvent(this.createColumnEvent("movingChanged",e))},n.prototype.createColumnEvent=function(t,e){return{type:t,column:this,columns:[this],source:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context}},n.prototype.isMoving=function(){return this.moving},n.prototype.getSort=function(){return this.sort},n.prototype.setSort=function(t,e){e===void 0&&(e="api"),this.sort!==t&&(this.sort=t,this.eventService.dispatchEvent(this.createColumnEvent("sortChanged",e))),this.dispatchStateUpdatedEvent("sort")},n.prototype.setMenuVisible=function(t,e){e===void 0&&(e="api"),this.menuVisible!==t&&(this.menuVisible=t,this.eventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",e)))},n.prototype.isMenuVisible=function(){return this.menuVisible},n.prototype.isSortAscending=function(){return this.sort==="asc"},n.prototype.isSortDescending=function(){return this.sort==="desc"},n.prototype.isSortNone=function(){return N(this.sort)},n.prototype.isSorting=function(){return O(this.sort)},n.prototype.getSortIndex=function(){return this.sortIndex},n.prototype.setSortIndex=function(t){this.sortIndex=t,this.dispatchStateUpdatedEvent("sortIndex")},n.prototype.setAggFunc=function(t){this.aggFunc=t,this.dispatchStateUpdatedEvent("aggFunc")},n.prototype.getAggFunc=function(){return this.aggFunc},n.prototype.getLeft=function(){return this.left},n.prototype.getOldLeft=function(){return this.oldLeft},n.prototype.getRight=function(){return this.left+this.actualWidth},n.prototype.setLeft=function(t,e){e===void 0&&(e="api"),this.oldLeft=this.left,this.left!==t&&(this.left=t,this.eventService.dispatchEvent(this.createColumnEvent("leftChanged",e)))},n.prototype.isFilterActive=function(){return this.filterActive},n.prototype.setFilterActive=function(t,e,r){e===void 0&&(e="api"),this.filterActive!==t&&(this.filterActive=t,this.eventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",e)));var o=this.createColumnEvent("filterChanged",e);r&&De(o,r),this.eventService.dispatchEvent(o)},n.prototype.isHovered=function(){return this.columnHoverService.isHovered(this)},n.prototype.setPinned=function(t){t===!0||t==="left"?this.pinned="left":t==="right"?this.pinned="right":this.pinned=null,this.dispatchStateUpdatedEvent("pinned")},n.prototype.setFirstRightPinned=function(t,e){e===void 0&&(e="api"),this.firstRightPinned!==t&&(this.firstRightPinned=t,this.eventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",e)))},n.prototype.setLastLeftPinned=function(t,e){e===void 0&&(e="api"),this.lastLeftPinned!==t&&(this.lastLeftPinned=t,this.eventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",e)))},n.prototype.isFirstRightPinned=function(){return this.firstRightPinned},n.prototype.isLastLeftPinned=function(){return this.lastLeftPinned},n.prototype.isPinned=function(){return this.pinned==="left"||this.pinned==="right"},n.prototype.isPinnedLeft=function(){return this.pinned==="left"},n.prototype.isPinnedRight=function(){return this.pinned==="right"},n.prototype.getPinned=function(){return this.pinned},n.prototype.setVisible=function(t,e){e===void 0&&(e="api");var r=t===!0;this.visible!==r&&(this.visible=r,this.eventService.dispatchEvent(this.createColumnEvent("visibleChanged",e))),this.dispatchStateUpdatedEvent("hide")},n.prototype.isVisible=function(){return this.visible},n.prototype.isSpanHeaderHeight=function(){var t=this.getColDef();return!t.suppressSpanHeaderHeight&&!t.autoHeaderHeight},n.prototype.getColDef=function(){return this.colDef},n.prototype.getColumnGroupShow=function(){return this.colDef.columnGroupShow},n.prototype.getColId=function(){return this.colId},n.prototype.getId=function(){return this.colId},n.prototype.getUniqueId=function(){return this.colId},n.prototype.getDefinition=function(){return this.colDef},n.prototype.getActualWidth=function(){return this.actualWidth},n.prototype.getAutoHeaderHeight=function(){return this.autoHeaderHeight},n.prototype.setAutoHeaderHeight=function(t){var e=t!==this.autoHeaderHeight;return this.autoHeaderHeight=t,e},n.prototype.createBaseColDefParams=function(t){var e={node:t,data:t.data,colDef:this.colDef,column:this,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};return e},n.prototype.getColSpan=function(t){if(N(this.colDef.colSpan))return 1;var e=this.createBaseColDefParams(t),r=this.colDef.colSpan(e);return Math.max(r,1)},n.prototype.getRowSpan=function(t){if(N(this.colDef.rowSpan))return 1;var e=this.createBaseColDefParams(t),r=this.colDef.rowSpan(e);return Math.max(r,1)},n.prototype.setActualWidth=function(t,e,r){e===void 0&&(e="api"),r===void 0&&(r=!1),this.minWidth!=null&&(t=Math.max(t,this.minWidth)),this.maxWidth!=null&&(t=Math.min(t,this.maxWidth)),this.actualWidth!==t&&(this.actualWidth=t,this.flex&&e!=="flex"&&e!=="gridInitializing"&&(this.flex=null),r||this.fireColumnWidthChangedEvent(e)),this.dispatchStateUpdatedEvent("width")},n.prototype.fireColumnWidthChangedEvent=function(t){this.eventService.dispatchEvent(this.createColumnEvent("widthChanged",t))},n.prototype.isGreaterThanMax=function(t){return this.maxWidth!=null?t>this.maxWidth:!1},n.prototype.getMinWidth=function(){return this.minWidth},n.prototype.getMaxWidth=function(){return this.maxWidth},n.prototype.getFlex=function(){return this.flex||0},n.prototype.setFlex=function(t){this.flex!==t&&(this.flex=t),this.dispatchStateUpdatedEvent("flex")},n.prototype.setMinimum=function(t){t===void 0&&(t="api"),O(this.minWidth)&&this.setActualWidth(this.minWidth,t)},n.prototype.setRowGroupActive=function(t,e){e===void 0&&(e="api"),this.rowGroupActive!==t&&(this.rowGroupActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",e))),this.dispatchStateUpdatedEvent("rowGroup")},n.prototype.isRowGroupActive=function(){return this.rowGroupActive},n.prototype.setPivotActive=function(t,e){e===void 0&&(e="api"),this.pivotActive!==t&&(this.pivotActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",e))),this.dispatchStateUpdatedEvent("pivot")},n.prototype.isPivotActive=function(){return this.pivotActive},n.prototype.isAnyFunctionActive=function(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()},n.prototype.isAnyFunctionAllowed=function(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()},n.prototype.setValueActive=function(t,e){e===void 0&&(e="api"),this.aggregationActive!==t&&(this.aggregationActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnValueChanged",e)))},n.prototype.isValueActive=function(){return this.aggregationActive},n.prototype.isAllowPivot=function(){return this.colDef.enablePivot===!0},n.prototype.isAllowValue=function(){return this.colDef.enableValue===!0},n.prototype.isAllowRowGroup=function(){return this.colDef.enableRowGroup===!0},n.prototype.getMenuTabs=function(t){var e=this.getColDef().menuTabs;return e==null&&(e=t),e},n.prototype.dispatchStateUpdatedEvent=function(t){this.eventService.dispatchEvent({type:n.EVENT_STATE_UPDATED,key:t})},n.EVENT_MOVING_CHANGED="movingChanged",n.EVENT_LEFT_CHANGED="leftChanged",n.EVENT_WIDTH_CHANGED="widthChanged",n.EVENT_LAST_LEFT_PINNED_CHANGED="lastLeftPinnedChanged",n.EVENT_FIRST_RIGHT_PINNED_CHANGED="firstRightPinnedChanged",n.EVENT_VISIBLE_CHANGED="visibleChanged",n.EVENT_FILTER_CHANGED="filterChanged",n.EVENT_FILTER_ACTIVE_CHANGED="filterActiveChanged",n.EVENT_SORT_CHANGED="sortChanged",n.EVENT_COL_DEF_CHANGED="colDefChanged",n.EVENT_MENU_VISIBLE_CHANGED="menuVisibleChanged",n.EVENT_ROW_GROUP_CHANGED="columnRowGroupChanged",n.EVENT_PIVOT_CHANGED="columnPivotChanged",n.EVENT_VALUE_CHANGED="columnValueChanged",n.EVENT_STATE_UPDATED="columnStateUpdated",Ro([h("gridOptionsService")],n.prototype,"gridOptionsService",void 0),Ro([h("columnUtils")],n.prototype,"columnUtils",void 0),Ro([h("columnHoverService")],n.prototype,"columnHoverService",void 0),Ro([P],n.prototype,"initialise",null),n}(),rc=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},re=function(){function n(t,e,r,o){this.localEventService=new Et,this.expandable=!1,this.instanceId=ea(),this.expandableListenerRemoveCallback=null,this.colGroupDef=t,this.groupId=e,this.expanded=!!t&&!!t.openByDefault,this.padding=r,this.level=o}return n.prototype.destroy=function(){this.expandableListenerRemoveCallback&&this.reset(null,void 0)},n.prototype.reset=function(t,e){this.colGroupDef=t,this.level=e,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0},n.prototype.getInstanceId=function(){return this.instanceId},n.prototype.setOriginalParent=function(t){this.originalParent=t},n.prototype.getOriginalParent=function(){return this.originalParent},n.prototype.getLevel=function(){return this.level},n.prototype.isVisible=function(){return this.children?this.children.some(function(t){return t.isVisible()}):!1},n.prototype.isPadding=function(){return this.padding},n.prototype.setExpanded=function(t){this.expanded=t===void 0?!1:t;var e={type:n.EVENT_EXPANDED_CHANGED};this.localEventService.dispatchEvent(e)},n.prototype.isExpandable=function(){return this.expandable},n.prototype.isExpanded=function(){return this.expanded},n.prototype.getGroupId=function(){return this.groupId},n.prototype.getId=function(){return this.getGroupId()},n.prototype.setChildren=function(t){this.children=t},n.prototype.getChildren=function(){return this.children},n.prototype.getColGroupDef=function(){return this.colGroupDef},n.prototype.getLeafColumns=function(){var t=[];return this.addLeafColumns(t),t},n.prototype.addLeafColumns=function(t){this.children&&this.children.forEach(function(e){e instanceof X?t.push(e):e instanceof n&&e.addLeafColumns(t)})},n.prototype.getColumnGroupShow=function(){var t=this.colGroupDef;if(t)return t.columnGroupShow},n.prototype.setupExpandable=function(){var t=this;this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();var e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(function(r){return r.addEventListener("visibleChanged",e)}),this.expandableListenerRemoveCallback=function(){t.getLeafColumns().forEach(function(r){return r.removeEventListener("visibleChanged",e)}),t.expandableListenerRemoveCallback=null}},n.prototype.setExpandable=function(){if(!this.isPadding()){for(var t=!1,e=!1,r=!1,o=this.findChildrenRemovingPadding(),i=0,s=o.length;i0}function Q(n){if(!(!n||!n.length))return n[n.length-1]}function _t(n,t,e){return n==null&&t==null?!0:n!=null&&t!=null&&n.length===t.length&&n.every(function(r,o){return e?e(r,t[o]):t[o]===r})}function nc(n,t){return _t(n,t)}function ra(n){return n.sort(function(t,e){return t-e})}function sc(n,t){if(n)for(var e=n.length-2;e>=0;e--){var r=n[e]===t,o=n[e+1]===t;r&&o&&n.splice(e+1,1)}}function fe(n,t){var e=n.indexOf(t);e>=0&&n.splice(e,1)}function Vi(n,t){t.forEach(function(e){return fe(n,e)})}function Gr(n,t,e){n.splice(e,0,t)}function ac(n,t,e){if(!(n==null||t==null))for(var r=t.length-1;r>=0;r--){var o=t[r];Gr(n,o,e)}}function Bi(n,t,e){Vi(n,t),t.slice().reverse().forEach(function(r){return Gr(n,r,e)})}function Me(n,t){return n.indexOf(t)>-1}function oa(n){return[].concat.apply([],n)}function Wi(n,t){t==null||n==null||t.forEach(function(e){return n.push(e)})}function lc(n){return n.map(Mr)}function uc(n,t){if(n!=null)for(var e=n.length-1;e>=0;e--)t(n[e],e)}var cc=Object.freeze({__proto__:null,firstExistingValue:ta,existsAndNotEmpty:ic,last:Q,areEqual:_t,shallowCompare:nc,sortNumerically:ra,removeRepeatsFromArray:sc,removeFromArray:fe,removeAllFromArray:Vi,insertIntoArray:Gr,insertArrayIntoArray:ac,moveInArray:Bi,includes:Me,flatten:oa,pushAll:Wi,toStrings:lc,forEachReverse:uc}),ia="__ag_Grid_Stop_Propagation",pc=["touchstart","touchend","touchmove","touchcancel","scroll"],ji={};function ft(n){n[ia]=!0}function ot(n){return n[ia]===!0}var ki=function(){var n={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},t=function(e){if(typeof ji[e]=="boolean")return ji[e];var r=document.createElement(n[e]||"div");return e="on"+e,ji[e]=e in r};return t}();function Oo(n,t,e){for(var r=t;r;){var o=n.getDomData(r,e);if(o)return o;r=r.parentElement}return null}function To(n,t){return!t||!n?!1:sa(t).indexOf(n)>=0}function na(n){for(var t=[],e=n.target;e;)t.push(e),e=e.parentElement;return t}function sa(n){var t=n;return t.path?t.path:t.composedPath?t.composedPath():na(t)}function aa(n,t,e,r){var o=Me(pc,e),i=o?{passive:!0}:void 0;n&&n.addEventListener&&n.addEventListener(t,e,r,i)}var dc=Object.freeze({__proto__:null,stopPropagationForAgGrid:ft,isStopPropagationForAgGrid:ot,isEventSupported:ki,getCtrlForEventTarget:Oo,isElementInEventPath:To,createEventPath:na,getEventPath:sa,addSafePassiveEventListener:aa}),Yt=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},T=function(){function n(){var t=this;this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.isAlive=function(){return!t.destroyed}}return n.prototype.getFrameworkOverrides=function(){return this.frameworkOverrides},n.prototype.getContext=function(){return this.context},n.prototype.destroy=function(){this.destroyFunctions.forEach(function(t){return t()}),this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchEvent({type:n.EVENT_DESTROYED})},n.prototype.addEventListener=function(t,e){this.localEventService||(this.localEventService=new Et),this.localEventService.addEventListener(t,e)},n.prototype.removeEventListener=function(t,e){this.localEventService&&this.localEventService.removeEventListener(t,e)},n.prototype.dispatchEventAsync=function(t){var e=this;window.setTimeout(function(){return e.dispatchEvent(t)},0)},n.prototype.dispatchEvent=function(t){this.localEventService&&this.localEventService.dispatchEvent(t)},n.prototype.addManagedListener=function(t,e,r){var o=this;if(!this.destroyed){t instanceof HTMLElement?aa(this.getFrameworkOverrides(),t,e,r):t.addEventListener(e,r);var i=function(){return t.removeEventListener(e,r),o.destroyFunctions=o.destroyFunctions.filter(function(s){return s!==i}),null};return this.destroyFunctions.push(i),i}},n.prototype.addManagedPropertyListener=function(t,e){var r=this;if(!this.destroyed){this.gridOptionsService.addEventListener(t,e);var o=function(){return r.gridOptionsService.removeEventListener(t,e),r.destroyFunctions=r.destroyFunctions.filter(function(i){return i!==o}),null};return this.destroyFunctions.push(o),o}},n.prototype.addDestroyFunc=function(t){this.isAlive()?this.destroyFunctions.push(t):t()},n.prototype.createManagedBean=function(t,e){var r=this.createBean(t,e);return this.addDestroyFunc(this.destroyBean.bind(this,t,e)),r},n.prototype.createBean=function(t,e,r){return(e||this.getContext()).createBean(t,r)},n.prototype.destroyBean=function(t,e){return(e||this.getContext()).destroyBean(t)},n.prototype.destroyBeans=function(t,e){var r=this;return t&&t.forEach(function(o){return r.destroyBean(o,e)}),[]},n.EVENT_DESTROYED="destroyed",Yt([h("frameworkOverrides")],n.prototype,"frameworkOverrides",void 0),Yt([h("context")],n.prototype,"context",void 0),Yt([h("eventService")],n.prototype,"eventService",void 0),Yt([h("gridOptionsService")],n.prototype,"gridOptionsService",void 0),Yt([h("localeService")],n.prototype,"localeService",void 0),Yt([h("environment")],n.prototype,"environment",void 0),Yt([ae],n.prototype,"destroy",null),n}(),hc=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Po=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},fc=function(n,t){return function(e,r){t(e,r,n)}},vc=function(n){hc(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.setBeans=function(e){this.logger=e.create("ColumnFactory")},t.prototype.createColumnTree=function(e,r,o){var i=new ju,s=this.extractExistingTreeData(o),a=s.existingCols,l=s.existingGroups,u=s.existingColKeys;i.addExistingKeys(u);var c=this.recursivelyCreateColumns(e,0,r,a,i,l),p=this.findMaxDept(c,0);this.logger.log("Number of levels for grouped columns is "+p);var d=this.balanceColumnTree(c,0,p,i),f=function(g,y){g instanceof re&&g.setupExpandable(),g.setOriginalParent(y)};return this.columnUtils.depthFirstOriginalTreeSearch(null,d,f),{columnTree:d,treeDept:p}},t.prototype.extractExistingTreeData=function(e){var r=[],o=[],i=[];return e&&this.columnUtils.depthFirstOriginalTreeSearch(null,e,function(s){if(s instanceof re){var a=s;o.push(a)}else{var l=s;i.push(l.getId()),r.push(l)}}),{existingCols:r,existingGroups:o,existingColKeys:i}},t.prototype.createForAutoGroups=function(e,r){var o=this;return e.map(function(i){return o.createAutoGroupTreeItem(r,i)})},t.prototype.createAutoGroupTreeItem=function(e,r){for(var o=this.findDepth(e),i=r,s=o-1;s>=0;s--){var a=new re(null,"FAKE_PATH_"+r.getId()+"}_"+s,!0,s);this.createBean(a),a.setChildren([i]),i.setOriginalParent(a),i=a}return i},t.prototype.findDepth=function(e){for(var r=0,o=e;o&&o[0]&&o[0]instanceof re;)r++,o=o[0].getChildren();return r},t.prototype.balanceColumnTree=function(e,r,o,i){for(var s=[],a=0;a=r;f--){var g=i.getUniqueKey(null,null),y=this.createMergedColGroupDef(null),m=new re(y,g,!0,r);this.createBean(m),d&&d.setChildren([m]),d=m,p||(p=d)}if(p&&d){s.push(p);var C=e.some(function(w){return w instanceof re});if(C){d.setChildren([l]);continue}else{d.setChildren(e);break}}s.push(l)}}return s},t.prototype.findMaxDept=function(e,r){for(var o=r,i=0;i=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},we=function(){function n(t,e,r,o){this.displayedChildren=[],this.localEventService=new Et,this.groupId=e,this.partId=r,this.providedColumnGroup=t,this.pinned=o}return n.createUniqueId=function(t,e){return t+"_"+e},n.prototype.reset=function(){this.parent=null,this.children=null,this.displayedChildren=null},n.prototype.getParent=function(){return this.parent},n.prototype.setParent=function(t){this.parent=t},n.prototype.getUniqueId=function(){return n.createUniqueId(this.groupId,this.partId)},n.prototype.isEmptyGroup=function(){return this.displayedChildren.length===0},n.prototype.isMoving=function(){var t=this.getProvidedColumnGroup().getLeafColumns();return!t||t.length===0?!1:t.every(function(e){return e.isMoving()})},n.prototype.checkLeft=function(){if(this.displayedChildren.forEach(function(o){o instanceof n&&o.checkLeft()}),this.displayedChildren.length>0)if(this.gridOptionsService.is("enableRtl")){var t=Q(this.displayedChildren),e=t.getLeft();this.setLeft(e)}else{var r=this.displayedChildren[0].getLeft();this.setLeft(r)}else this.setLeft(null)},n.prototype.getLeft=function(){return this.left},n.prototype.getOldLeft=function(){return this.oldLeft},n.prototype.setLeft=function(t){this.oldLeft=t,this.left!==t&&(this.left=t,this.localEventService.dispatchEvent(this.createAgEvent(n.EVENT_LEFT_CHANGED)))},n.prototype.getPinned=function(){return this.pinned},n.prototype.createAgEvent=function(t){return{type:t}},n.prototype.addEventListener=function(t,e){this.localEventService.addEventListener(t,e)},n.prototype.removeEventListener=function(t,e){this.localEventService.removeEventListener(t,e)},n.prototype.getGroupId=function(){return this.groupId},n.prototype.getPartId=function(){return this.partId},n.prototype.isChildInThisGroupDeepSearch=function(t){var e=!1;return this.children.forEach(function(r){t===r&&(e=!0),r instanceof n&&r.isChildInThisGroupDeepSearch(t)&&(e=!0)}),e},n.prototype.getActualWidth=function(){var t=0;return this.displayedChildren&&this.displayedChildren.forEach(function(e){t+=e.getActualWidth()}),t},n.prototype.isResizable=function(){if(!this.displayedChildren)return!1;var t=!1;return this.displayedChildren.forEach(function(e){e.isResizable()&&(t=!0)}),t},n.prototype.getMinWidth=function(){var t=0;return this.displayedChildren.forEach(function(e){t+=e.getMinWidth()||0}),t},n.prototype.addChild=function(t){this.children||(this.children=[]),this.children.push(t)},n.prototype.getDisplayedChildren=function(){return this.displayedChildren},n.prototype.getLeafColumns=function(){var t=[];return this.addLeafColumns(t),t},n.prototype.getDisplayedLeafColumns=function(){var t=[];return this.addDisplayedLeafColumns(t),t},n.prototype.getDefinition=function(){return this.providedColumnGroup.getColGroupDef()},n.prototype.getColGroupDef=function(){return this.providedColumnGroup.getColGroupDef()},n.prototype.isPadding=function(){return this.providedColumnGroup.isPadding()},n.prototype.isExpandable=function(){return this.providedColumnGroup.isExpandable()},n.prototype.isExpanded=function(){return this.providedColumnGroup.isExpanded()},n.prototype.setExpanded=function(t){this.providedColumnGroup.setExpanded(t)},n.prototype.addDisplayedLeafColumns=function(t){this.displayedChildren.forEach(function(e){e instanceof X?t.push(e):e instanceof n&&e.addDisplayedLeafColumns(t)})},n.prototype.addLeafColumns=function(t){this.children.forEach(function(e){e instanceof X?t.push(e):e instanceof n&&e.addLeafColumns(t)})},n.prototype.getChildren=function(){return this.children},n.prototype.getColumnGroupShow=function(){return this.providedColumnGroup.getColumnGroupShow()},n.prototype.getProvidedColumnGroup=function(){return this.providedColumnGroup},n.prototype.getPaddingLevel=function(){var t=this.getParent();return!this.isPadding()||!t||!t.isPadding()?0:1+t.getPaddingLevel()},n.prototype.calculateDisplayedColumns=function(){var t=this;this.displayedChildren=[];for(var e=this;e!=null&&e.isPadding();)e=e.getParent();var r=e?e.providedColumnGroup.isExpandable():!1;if(!r){this.displayedChildren=this.children,this.localEventService.dispatchEvent(this.createAgEvent(n.EVENT_DISPLAYED_CHILDREN_CHANGED));return}this.children.forEach(function(o){var i=o instanceof n&&(!o.displayedChildren||!o.displayedChildren.length);if(!i){var s=o.getColumnGroupShow();switch(s){case"open":e.providedColumnGroup.isExpanded()&&t.displayedChildren.push(o);break;case"closed":e.providedColumnGroup.isExpanded()||t.displayedChildren.push(o);break;default:t.displayedChildren.push(o);break}}}),this.localEventService.dispatchEvent(this.createAgEvent(n.EVENT_DISPLAYED_CHILDREN_CHANGED))},n.EVENT_LEFT_CHANGED="leftChanged",n.EVENT_DISPLAYED_CHILDREN_CHANGED="displayedChildrenChanged",gc([h("gridOptionsService")],n.prototype,"gridOptionsService",void 0),n}(),v=function(){function n(){}return n.EVENT_COLUMN_EVERYTHING_CHANGED="columnEverythingChanged",n.EVENT_NEW_COLUMNS_LOADED="newColumnsLoaded",n.EVENT_COLUMN_PIVOT_MODE_CHANGED="columnPivotModeChanged",n.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged",n.EVENT_EXPAND_COLLAPSE_ALL="expandOrCollapseAll",n.EVENT_COLUMN_PIVOT_CHANGED="columnPivotChanged",n.EVENT_GRID_COLUMNS_CHANGED="gridColumnsChanged",n.EVENT_COLUMN_VALUE_CHANGED="columnValueChanged",n.EVENT_COLUMN_MOVED="columnMoved",n.EVENT_COLUMN_VISIBLE="columnVisible",n.EVENT_COLUMN_PINNED="columnPinned",n.EVENT_COLUMN_GROUP_OPENED="columnGroupOpened",n.EVENT_COLUMN_RESIZED="columnResized",n.EVENT_DISPLAYED_COLUMNS_CHANGED="displayedColumnsChanged",n.EVENT_VIRTUAL_COLUMNS_CHANGED="virtualColumnsChanged",n.EVENT_ASYNC_TRANSACTIONS_FLUSHED="asyncTransactionsFlushed",n.EVENT_ROW_GROUP_OPENED="rowGroupOpened",n.EVENT_ROW_DATA_CHANGED="rowDataChanged",n.EVENT_ROW_DATA_UPDATED="rowDataUpdated",n.EVENT_PINNED_ROW_DATA_CHANGED="pinnedRowDataChanged",n.EVENT_RANGE_SELECTION_CHANGED="rangeSelectionChanged",n.EVENT_CHART_CREATED="chartCreated",n.EVENT_CHART_RANGE_SELECTION_CHANGED="chartRangeSelectionChanged",n.EVENT_CHART_OPTIONS_CHANGED="chartOptionsChanged",n.EVENT_CHART_DESTROYED="chartDestroyed",n.EVENT_TOOL_PANEL_VISIBLE_CHANGED="toolPanelVisibleChanged",n.EVENT_TOOL_PANEL_SIZE_CHANGED="toolPanelSizeChanged",n.EVENT_COLUMN_PANEL_ITEM_DRAG_START="columnPanelItemDragStart",n.EVENT_COLUMN_PANEL_ITEM_DRAG_END="columnPanelItemDragEnd",n.EVENT_MODEL_UPDATED="modelUpdated",n.EVENT_CUT_START="cutStart",n.EVENT_CUT_END="cutEnd",n.EVENT_PASTE_START="pasteStart",n.EVENT_PASTE_END="pasteEnd",n.EVENT_FILL_START="fillStart",n.EVENT_FILL_END="fillEnd",n.EVENT_RANGE_DELETE_START="rangeDeleteStart",n.EVENT_RANGE_DELETE_END="rangeDeleteEnd",n.EVENT_UNDO_STARTED="undoStarted",n.EVENT_UNDO_ENDED="undoEnded",n.EVENT_REDO_STARTED="redoStarted",n.EVENT_REDO_ENDED="redoEnded",n.EVENT_KEY_SHORTCUT_CHANGED_CELL_START="keyShortcutChangedCellStart",n.EVENT_KEY_SHORTCUT_CHANGED_CELL_END="keyShortcutChangedCellEnd",n.EVENT_CELL_CLICKED="cellClicked",n.EVENT_CELL_DOUBLE_CLICKED="cellDoubleClicked",n.EVENT_CELL_MOUSE_DOWN="cellMouseDown",n.EVENT_CELL_CONTEXT_MENU="cellContextMenu",n.EVENT_CELL_VALUE_CHANGED="cellValueChanged",n.EVENT_CELL_EDIT_REQUEST="cellEditRequest",n.EVENT_ROW_VALUE_CHANGED="rowValueChanged",n.EVENT_CELL_FOCUSED="cellFocused",n.EVENT_CELL_FOCUS_CLEARED="cellFocusCleared",n.EVENT_FULL_WIDTH_ROW_FOCUSED="fullWidthRowFocused",n.EVENT_ROW_SELECTED="rowSelected",n.EVENT_SELECTION_CHANGED="selectionChanged",n.EVENT_CELL_KEY_DOWN="cellKeyDown",n.EVENT_CELL_MOUSE_OVER="cellMouseOver",n.EVENT_CELL_MOUSE_OUT="cellMouseOut",n.EVENT_FILTER_CHANGED="filterChanged",n.EVENT_FILTER_MODIFIED="filterModified",n.EVENT_FILTER_OPENED="filterOpened",n.EVENT_SORT_CHANGED="sortChanged",n.EVENT_VIRTUAL_ROW_REMOVED="virtualRowRemoved",n.EVENT_ROW_CLICKED="rowClicked",n.EVENT_ROW_DOUBLE_CLICKED="rowDoubleClicked",n.EVENT_GRID_READY="gridReady",n.EVENT_GRID_SIZE_CHANGED="gridSizeChanged",n.EVENT_VIEWPORT_CHANGED="viewportChanged",n.EVENT_SCROLLBAR_WIDTH_CHANGED="scrollbarWidthChanged",n.EVENT_FIRST_DATA_RENDERED="firstDataRendered",n.EVENT_DRAG_STARTED="dragStarted",n.EVENT_DRAG_STOPPED="dragStopped",n.EVENT_CHECKBOX_CHANGED="checkboxChanged",n.EVENT_ROW_EDITING_STARTED="rowEditingStarted",n.EVENT_ROW_EDITING_STOPPED="rowEditingStopped",n.EVENT_CELL_EDITING_STARTED="cellEditingStarted",n.EVENT_CELL_EDITING_STOPPED="cellEditingStopped",n.EVENT_BODY_SCROLL="bodyScroll",n.EVENT_BODY_SCROLL_END="bodyScrollEnd",n.EVENT_HEIGHT_SCALE_CHANGED="heightScaleChanged",n.EVENT_PAGINATION_CHANGED="paginationChanged",n.EVENT_COMPONENT_STATE_CHANGED="componentStateChanged",n.EVENT_STORE_REFRESHED="storeRefreshed",n.EVENT_BODY_HEIGHT_CHANGED="bodyHeightChanged",n.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED="displayedColumnsWidthChanged",n.EVENT_SCROLL_VISIBILITY_CHANGED="scrollVisibilityChanged",n.EVENT_COLUMN_HOVER_CHANGED="columnHoverChanged",n.EVENT_FLASH_CELLS="flashCells",n.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED="paginationPixelOffsetChanged",n.EVENT_DISPLAYED_ROWS_CHANGED="displayedRowsChanged",n.EVENT_LEFT_PINNED_WIDTH_CHANGED="leftPinnedWidthChanged",n.EVENT_RIGHT_PINNED_WIDTH_CHANGED="rightPinnedWidthChanged",n.EVENT_ROW_CONTAINER_HEIGHT_CHANGED="rowContainerHeightChanged",n.EVENT_HEADER_HEIGHT_CHANGED="headerHeightChanged",n.EVENT_COLUMN_HEADER_HEIGHT_CHANGED="columnHeaderHeightChanged",n.EVENT_ROW_DRAG_ENTER="rowDragEnter",n.EVENT_ROW_DRAG_MOVE="rowDragMove",n.EVENT_ROW_DRAG_LEAVE="rowDragLeave",n.EVENT_ROW_DRAG_END="rowDragEnd",n.EVENT_GRID_STYLES_CHANGED="gridStylesChanged",n.EVENT_POPUP_TO_FRONT="popupToFront",n.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST="columnRowGroupChangeRequest",n.EVENT_COLUMN_PIVOT_CHANGE_REQUEST="columnPivotChangeRequest",n.EVENT_COLUMN_VALUE_CHANGE_REQUEST="columnValueChangeRequest",n.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST="columnAggFuncChangeRequest",n.EVENT_KEYBOARD_FOCUS="keyboardFocus",n.EVENT_MOUSE_FOCUS="mouseFocus",n.EVENT_STORE_UPDATED="storeUpdated",n.EVENT_FILTER_DESTROYED="filterDestroyed",n.EVENT_ROW_DATA_UPDATE_STARTED="rowDataUpdateStarted",n}(),la=function(){function n(){this.existingIds={}}return n.prototype.getInstanceIdForKey=function(t){var e=this.existingIds[t],r;return typeof e!="number"?r=0:r=e+1,this.existingIds[t]=r,r},n}(),yc=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ui=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},pr="ag-Grid-AutoColumn",Cc=function(n){yc(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.createAutoGroupColumns=function(e,r){var o=this,i=[],s=this.gridOptionsService.isTreeData(),a=this.gridOptionsService.isGroupMultiAutoColumn();return s&&a&&(console.warn('AG Grid: you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),a=!1),a?r.forEach(function(l,u){i.push(o.createOneAutoGroupColumn(e,l,u))}):i.push(this.createOneAutoGroupColumn(e)),i},t.prototype.createOneAutoGroupColumn=function(e,r,o){var i=this.generateDefaultColDef(r),s;r?s=pr+"-"+r.getId():s=pr;var a=this.gridOptionsService.get("autoGroupColumnDef");if(De(i,a),i=this.columnFactory.mergeColDefs(i,s),i.colId=s,!this.gridOptionsService.isTreeData()){var l=N(i.field)&&N(i.valueGetter)&&N(i.filterValueGetter)&&i.filter!=="agGroupColumnFilter";l&&(i.filter=!1)}o&&o>0&&(i.headerCheckboxSelection=!1);var u=e.find(function(d){return d.getId()==s}),c=this.gridOptionsService.isColumnsSortingCoupledToGroup();if(u)return c&&(i.sort=void 0,i.sortIndex=void 0),u.setColDef(i,null),this.columnFactory.applyColumnState(u,i),u;c&&(i.sort||i.initialSort||"sortIndex"in i)&&!i.field&&(i.sort=null,i.sortIndex=null,i.initialSort=null);var p=new X(i,null,s,!0);return this.context.createBean(p),p},t.prototype.generateDefaultColDef=function(e){var r=this.gridOptionsService.get("autoGroupColumnDef"),o=this.localeService.getLocaleTextFunc(),i={headerName:o("group","Group")},s=r&&(r.cellRenderer||r.cellRendererSelector);if(s||(i.cellRenderer="agGroupCellRenderer"),e){var a=e.getColDef();Object.assign(i,{headerName:this.columnModel.getDisplayNameForColumn(e,"header"),headerValueGetter:a.headerValueGetter}),a.cellRenderer&&Object.assign(i,{cellRendererParams:{innerRenderer:a.cellRenderer,innerRendererParams:a.cellRendererParams}}),i.showRowGroup=e.getColId()}else i.showRowGroup=!0;return i},Ui([h("columnModel")],t.prototype,"columnModel",void 0),Ui([h("columnFactory")],t.prototype,"columnFactory",void 0),t=Ui([x("autoGroupColService")],t),t}(T),mc=/[&<>"']/g,wc={"&":"&","<":"<",">":">",'"':""","'":"'"};function Sc(n){var t=String.fromCharCode;function e(p){var d=[];if(!p)return[];for(var f=p.length,g=0,y,m;g=55296&&y<=56319&&g=55296&&p<=57343)throw Error("Lone surrogate U+"+p.toString(16).toUpperCase()+" is not a scalar value")}function o(p,d){return t(p>>d&63|128)}function i(p){if(p>=0&&p<=31&&p!==10){var d=p.toString(16).toUpperCase(),f=d.padStart(4,"0");return"_x"+f+"_"}if(!(p&4294967168))return t(p);var g="";return p&4294965248?p&4294901760?p&4292870144||(g=t(p>>18&7|240),g+=o(p,12),g+=o(p,6)):(r(p),g=t(p>>12&15|224),g+=o(p,6)):g=t(p>>6&31|192),g+=t(p&63|128),g}for(var s=e(n),a=s.length,l=-1,u,c="";++l1?o.substring(1,o.length):"")}).join(" ")}function pa(n){return n.replace(/[A-Z]/g,function(t){return"-"+t.toLocaleLowerCase()})}var Ec=Object.freeze({__proto__:null,utf8_encode:Sc,capitalise:ua,escapeString:it,camelCaseToHumanText:ca,camelCaseToHyphenated:pa});function vt(n){var t=new Map;return n.forEach(function(e){return t.set(e[0],e[1])}),t}function _c(n,t){var e=new Map;return n.forEach(function(r){return e.set(t(r),r)}),e}function Rc(n){var t=[];return n.forEach(function(e,r){return t.push(r)}),t}var Oc=Object.freeze({__proto__:null,convertToMap:vt,mapById:_c,keys:Rc}),Tc=function(){function n(){}return n.ColDefPropertyMap={headerName:void 0,columnGroupShow:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,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,columnsMenuParams: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,suppressCellFlash: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,suppressMenu: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,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0},n.ALL_PROPERTIES=Object.keys(n.ColDefPropertyMap),n}(),Rt=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Ot=function(n,t){for(var e=0,r=t.length,o=n.length;e0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Vr=function(n,t){for(var e=0,r=t.length,o=n.length;e0&&o.forEach(function(i){return r[i]=$i(i,e)}),r}function $i(n,t,e,r){var o=t.map(function(a){return{value:a,relevance:Pc(n.toLowerCase(),a.toLocaleLowerCase())}});if(o.sort(function(a,l){return l.relevance-a.relevance}),e&&(o=o.filter(function(a){return a.relevance!==0})),r&&r>0){var i=o[0].relevance,s=i*r;o=o.filter(function(a){return s-a.relevance<0})}return o.map(function(a){return a.value})}function Pc(n,t){for(var e=n.replace(/\s/g,""),r=t.replace(/\s/g,""),o=0,i=-1,s=0;s=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Tt=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Pt=function(n,t){for(var e=0,r=t.length,o=n.length;e0&&z(function(){return console.warn("AG Grid: to see all the valid "+o+" properties please check: "+i)},"invalidProperties"+o+i)},n.prototype.checkForDeprecated=function(){var t=this.gridOptions;Object.entries(this.deprecatedProperties).forEach(function(e){var r,o=Tt(e,2),i=o[0],s=o[1],a=t[i];a&&(Ne(s.version,i,s.newProp,s.message),s.copyToNewProp&&s.newProp&&t[s.newProp]==null&&(t[s.newProp]=(r=s.newPropValue)!==null&&r!==void 0?r:a))}),t.serverSideStoreType&&(console.warn("AG Grid: since v29.0, `serverSideStoreType` has been replaced by `suppressServerSideInfiniteScroll`. Set to false to use Partial Store, and true to use Full Store."),t.suppressServerSideInfiniteScroll=t.serverSideStoreType!=="partial")},n.prototype.checkForViolations=function(){this.gridOptionsService.is("treeData")&&this.treeDataViolations()},n.prototype.treeDataViolations=function(){this.gridOptionsService.isRowModelType("clientSide")&&(this.gridOptionsService.exists("getDataPath")||console.warn("AG Grid: property usingTreeData=true with rowModel=clientSide, but you did not provide getDataPath function, please provide getDataPath function if using tree data.")),this.gridOptionsService.isRowModelType("serverSide")&&(this.gridOptionsService.exists("isServerSideGroup")||console.warn("AG Grid: property usingTreeData=true with rowModel=serverSide, but you did not provide isServerSideGroup function, please provide isServerSideGroup function if using tree data."),this.gridOptionsService.exists("getServerSideGroupKey")||console.warn("AG Grid: property usingTreeData=true with rowModel=serverSide, but you did not provide getServerSideGroupKey function, please provide getServerSideGroupKey function if using tree data."))},Ao([h("gridOptions")],n.prototype,"gridOptions",void 0),Ao([h("gridOptionsService")],n.prototype,"gridOptionsService",void 0),Ao([P],n.prototype,"init",null),n=Ao([x("gridOptionsValidator")],n),n}();function Ki(n,t){var e=["groupRows","multipleColumns","custom","singleColumn"];return e.indexOf(t)<0?(console.warn("AG Grid: '"+t+"' is not a valid groupDisplayType value - possible values are: '"+e.join("', '")+"'"),!1):t===n}function bc(n,t){var e=["auto","custom"];return e.indexOf(t)<0?(console.warn("AG Grid: '"+t+"' is not a valid treeDataDisplayType value - possible values are: '"+e.join("', '")+"'"),!1):t===n}var Fc=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ce=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},xc=function(n,t){return function(e,r){t(e,r,n)}},Lc=function(n,t){var e={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(n);o=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},qt=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Qt=function(n,t){for(var e=0,r=t.length,o=n.length;e=0,u=a>=0;if(l&&u)return s-a;if(l)return 1;if(u)return-1;var c=e.gridColumns.indexOf(o),p=e.gridColumns.indexOf(i);return c-p}),this.gridColumns=this.placeLockedColumns(this.gridColumns))},t.prototype.getAllDisplayedAutoHeightCols=function(){return this.displayedAutoHeightCols},t.prototype.setViewport=function(){this.gridOptionsService.is("enableRtl")?(this.viewportLeft=this.bodyWidth-this.scrollPosition-this.scrollWidth,this.viewportRight=this.bodyWidth-this.scrollPosition):(this.viewportLeft=this.scrollPosition,this.viewportRight=this.scrollWidth+this.scrollPosition)},t.prototype.getDisplayedColumnsStartingAt=function(e){for(var r=e,o=[];r!=null;)o.push(r),r=this.getDisplayedColAfter(r);return o},t.prototype.checkViewportColumns=function(){if(this.displayedColumnsCenter!=null){var e=this.extractViewport();if(e){var r={type:v.EVENT_VIRTUAL_COLUMNS_CHANGED};this.eventService.dispatchEvent(r)}}},t.prototype.setViewportPosition=function(e,r){(e!==this.scrollWidth||r!==this.scrollPosition||this.bodyWidthDirty)&&(this.scrollWidth=e,this.scrollPosition=r,this.bodyWidthDirty=!0,this.setViewport(),this.ready&&this.checkViewportColumns())},t.prototype.isPivotMode=function(){return this.pivotMode},t.prototype.isPivotSettingAllowed=function(e){return e&&this.gridOptionsService.isTreeData()?(console.warn("AG Grid: Pivot mode not available in conjunction Tree Data i.e. 'gridOptions.treeData: true'"),!1):!0},t.prototype.setPivotMode=function(e,r){if(r===void 0&&(r="api"),!(e===this.pivotMode||!this.isPivotSettingAllowed(this.pivotMode))){this.pivotMode=e,this.autoGroupsNeedBuilding=!0,this.updateGridColumns(),this.updateDisplayedColumns(r);var o={type:v.EVENT_COLUMN_PIVOT_MODE_CHANGED};this.eventService.dispatchEvent(o)}},t.prototype.getSecondaryPivotColumn=function(e,r){if(N(this.secondaryColumns))return null;var o=this.getPrimaryColumn(r),i=null;return this.secondaryColumns.forEach(function(s){var a=s.getColDef().pivotKeys,l=s.getColDef().pivotValueColumn,u=_t(a,e),c=l===o;u&&c&&(i=s)}),i},t.prototype.setBeans=function(e){this.logger=e.create("columnModel")},t.prototype.setFirstRightAndLastLeftPinned=function(e){var r,o;this.gridOptionsService.is("enableRtl")?(r=this.displayedColumnsLeft?this.displayedColumnsLeft[0]:null,o=this.displayedColumnsRight?Q(this.displayedColumnsRight):null):(r=this.displayedColumnsLeft?Q(this.displayedColumnsLeft):null,o=this.displayedColumnsRight?this.displayedColumnsRight[0]:null),this.gridColumns.forEach(function(i){i.setLastLeftPinned(i===r,e),i.setFirstRightPinned(i===o,e)})},t.prototype.autoSizeColumns=function(e){var r=this;if(this.shouldQueueResizeOperations){this.resizeOperationQueue.push(function(){return r.autoSizeColumns(e)});return}var o=e.columns,i=e.skipHeader,s=e.skipHeaderGroups,a=e.stopAtGroup,l=e.source,u=l===void 0?"api":l;this.animationFrameService.flushAllFrames();for(var c=[],p=-1,d=i??this.gridOptionsService.is("skipHeaderOnAutoSize"),f=s??d;p!==0;)p=0,this.actionOnGridColumns(o,function(g){if(c.indexOf(g)>=0)return!1;var y=r.autoWidthCalculator.getPreferredWidthForColumn(g,d);if(y>0){var m=r.normaliseColumnWidth(g,y);g.setActualWidth(m,u),c.push(g),p++}return!0},u);f||this.autoSizeColumnGroupsByColumns(o,u,a),this.dispatchColumnResizedEvent(c,!0,"autosizeColumns")},t.prototype.dispatchColumnResizedEvent=function(e,r,o,i){if(i===void 0&&(i=null),e&&e.length){var s={type:v.EVENT_COLUMN_RESIZED,columns:e,column:e.length===1?e[0]:null,flexColumns:i,finished:r,source:o};this.eventService.dispatchEvent(s)}},t.prototype.dispatchColumnChangedEvent=function(e,r,o){var i={type:e,columns:r,column:r&&r.length==1?r[0]:null,source:o};this.eventService.dispatchEvent(i)},t.prototype.dispatchColumnMovedEvent=function(e){var r=e.movedColumns,o=e.source,i=e.toIndex,s=e.finished,a={type:v.EVENT_COLUMN_MOVED,columns:r,column:r&&r.length===1?r[0]:null,toIndex:i,finished:s,source:o};this.eventService.dispatchEvent(a)},t.prototype.dispatchColumnPinnedEvent=function(e,r){if(e.length){var o=e.length===1?e[0]:null,i=this.getCommonValue(e,function(a){return a.getPinned()}),s={type:v.EVENT_COLUMN_PINNED,pinned:i??null,columns:e,column:o,source:r};this.eventService.dispatchEvent(s)}},t.prototype.dispatchColumnVisibleEvent=function(e,r){if(e.length){var o=e.length===1?e[0]:null,i=this.getCommonValue(e,function(a){return a.isVisible()}),s={type:v.EVENT_COLUMN_VISIBLE,visible:i,columns:e,column:o,source:r};this.eventService.dispatchEvent(s)}},t.prototype.autoSizeColumn=function(e,r,o){o===void 0&&(o="api"),e&&this.autoSizeColumns({columns:[e],skipHeader:r,skipHeaderGroups:!0,source:o})},t.prototype.autoSizeColumnGroupsByColumns=function(e,r,o){var i,s,a,l,u=new Set,c=this.getGridColumns(e);c.forEach(function(S){for(var E=S.getParent();E&&E!=o;)E.isPadding()||u.add(E),E=E.getParent()});var p,d=[];try{for(var f=fa(u),g=f.next();!g.done;g=f.next()){var y=g.value;try{for(var m=(a=void 0,fa(this.ctrlsService.getHeaderRowContainerCtrls())),C=m.next();!C.done;C=m.next()){var w=C.value;if(p=w.getHeaderCtrlForColumn(y),p)break}}catch(S){a={error:S}}finally{try{C&&!C.done&&(l=m.return)&&l.call(m)}finally{if(a)throw a.error}}p&&p.resizeLeafColumnsToFit(r)}}catch(S){i={error:S}}finally{try{g&&!g.done&&(s=f.return)&&s.call(f)}finally{if(i)throw i.error}}return d},t.prototype.autoSizeAllColumns=function(e,r){var o=this;if(r===void 0&&(r="api"),this.shouldQueueResizeOperations){this.resizeOperationQueue.push(function(){return o.autoSizeAllColumns(e,r)});return}var i=this.getAllDisplayedColumns();this.autoSizeColumns({columns:i,skipHeader:e,source:r})},t.prototype.getColumnsFromTree=function(e){var r=[],o=function(i){for(var s=0;s=0},t.prototype.getAllDisplayedColumns=function(){return this.displayedColumns},t.prototype.getViewportColumns=function(){return this.viewportColumns},t.prototype.getDisplayedLeftColumnsForRow=function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsLeft):this.displayedColumnsLeft},t.prototype.getDisplayedRightColumnsForRow=function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsRight):this.displayedColumnsRight},t.prototype.isColSpanActive=function(){return this.colSpanActive},t.prototype.getDisplayedColumnsForRow=function(e,r,o,i){for(var s=[],a=null,l=function(p){var d=r[p],f=r.length-p,g=Math.min(d.getColSpan(e),f),y=[d];if(g>1){for(var m=g-1,C=1;C<=m;C++)y.push(r[p+C]);p+=m}var w;if(o?(w=!1,y.forEach(function(E){o(E)&&(w=!0)})):w=!0,w){if(s.length===0&&a){var S=i?i(d):!1;S&&s.push(a)}s.push(d)}a=d,u=p},u,c=0;cr.viewportLeft},i=this.suppressColumnVirtualisation?null:this.isColumnInRowViewport.bind(this);return this.getDisplayedColumnsForRow(e,this.displayedColumnsCenter,i,o)},t.prototype.getAriaColumnIndex=function(e){return this.getAllGridColumns().indexOf(e)+1},t.prototype.isColumnInHeaderViewport=function(e){return e.isAutoHeaderHeight()?!0:this.isColumnInRowViewport(e)},t.prototype.isColumnInRowViewport=function(e){if(e.isAutoHeight())return!0;var r=e.getLeft()||0,o=r+e.getActualWidth(),i=this.viewportLeft-200,s=this.viewportRight+200,a=rs&&o>s;return!a&&!l},t.prototype.getDisplayedColumnsLeftWidth=function(){return this.getWidthOfColsInList(this.displayedColumnsLeft)},t.prototype.getDisplayedColumnsRightWidth=function(){return this.getWidthOfColsInList(this.displayedColumnsRight)},t.prototype.updatePrimaryColumnList=function(e,r,o,i,s,a){var l=this;if(a===void 0&&(a="api"),!(!e||Pe(e))){var u=!1;if(e.forEach(function(p){var d=l.getPrimaryColumn(p);if(d){if(o){if(r.indexOf(d)>=0)return;r.push(d)}else{if(r.indexOf(d)<0)return;fe(r,d)}i(d),u=!0}}),!!u){this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(a);var c={type:s,columns:r,column:r.length===1?r[0]:null,source:a};this.eventService.dispatchEvent(c)}}},t.prototype.setRowGroupColumns=function(e,r){r===void 0&&(r="api"),this.autoGroupsNeedBuilding=!0,this.setPrimaryColumnList(e,this.rowGroupColumns,v.EVENT_COLUMN_ROW_GROUP_CHANGED,this.setRowGroupActive.bind(this),r)},t.prototype.setRowGroupActive=function(e,r,o){e!==r.isRowGroupActive()&&(r.setRowGroupActive(e,o),e&&!this.gridOptionsService.is("suppressRowGroupHidesColumns")&&this.setColumnVisible(r,!1,o),!e&&!this.gridOptionsService.is("suppressMakeColumnVisibleAfterUnGroup")&&this.setColumnVisible(r,!0,o))},t.prototype.addRowGroupColumn=function(e,r){r===void 0&&(r="api"),e&&this.addRowGroupColumns([e],r)},t.prototype.addRowGroupColumns=function(e,r){r===void 0&&(r="api"),this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!0,this.setRowGroupActive.bind(this,!0),v.EVENT_COLUMN_ROW_GROUP_CHANGED,r)},t.prototype.removeRowGroupColumns=function(e,r){r===void 0&&(r="api"),this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!1,this.setRowGroupActive.bind(this,!1),v.EVENT_COLUMN_ROW_GROUP_CHANGED,r)},t.prototype.removeRowGroupColumn=function(e,r){r===void 0&&(r="api"),e&&this.removeRowGroupColumns([e],r)},t.prototype.addPivotColumns=function(e,r){r===void 0&&(r="api"),this.updatePrimaryColumnList(e,this.pivotColumns,!0,function(o){return o.setPivotActive(!0,r)},v.EVENT_COLUMN_PIVOT_CHANGED,r)},t.prototype.setPivotColumns=function(e,r){r===void 0&&(r="api"),this.setPrimaryColumnList(e,this.pivotColumns,v.EVENT_COLUMN_PIVOT_CHANGED,function(o,i){i.setPivotActive(o,r)},r)},t.prototype.addPivotColumn=function(e,r){r===void 0&&(r="api"),this.addPivotColumns([e],r)},t.prototype.removePivotColumns=function(e,r){r===void 0&&(r="api"),this.updatePrimaryColumnList(e,this.pivotColumns,!1,function(o){return o.setPivotActive(!1,r)},v.EVENT_COLUMN_PIVOT_CHANGED,r)},t.prototype.removePivotColumn=function(e,r){r===void 0&&(r="api"),this.removePivotColumns([e],r)},t.prototype.setPrimaryColumnList=function(e,r,o,i,s){var a=this;r.length=0,O(e)&&e.forEach(function(l){var u=a.getPrimaryColumn(l);u&&r.push(u)}),(this.primaryColumns||[]).forEach(function(l){var u=r.indexOf(l)>=0;i(u,l)}),this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(s),this.dispatchColumnChangedEvent(o,r,s)},t.prototype.setValueColumns=function(e,r){r===void 0&&(r="api"),this.setPrimaryColumnList(e,this.valueColumns,v.EVENT_COLUMN_VALUE_CHANGED,this.setValueActive.bind(this),r)},t.prototype.setValueActive=function(e,r,o){if(e!==r.isValueActive()&&(r.setValueActive(e,o),e&&!r.getAggFunc())){var i=this.aggFuncService.getDefaultAggFunc(r);r.setAggFunc(i)}},t.prototype.addValueColumns=function(e,r){r===void 0&&(r="api"),this.updatePrimaryColumnList(e,this.valueColumns,!0,this.setValueActive.bind(this,!0),v.EVENT_COLUMN_VALUE_CHANGED,r)},t.prototype.addValueColumn=function(e,r){r===void 0&&(r="api"),e&&this.addValueColumns([e],r)},t.prototype.removeValueColumn=function(e,r){r===void 0&&(r="api"),this.removeValueColumns([e],r)},t.prototype.removeValueColumns=function(e,r){r===void 0&&(r="api"),this.updatePrimaryColumnList(e,this.valueColumns,!1,this.setValueActive.bind(this,!1),v.EVENT_COLUMN_VALUE_CHANGED,r)},t.prototype.normaliseColumnWidth=function(e,r){var o=e.getMinWidth();O(o)&&r0?s+=d:a=!1});var l=o>=i,u=!a||o<=s;return l&&u},t.prototype.resizeColumnSets=function(e){var r=this,o=e.resizeSets,i=e.finished,s=e.source,a=!o||o.every(function(g){return r.checkMinAndMaxWidthsForSet(g)});if(!a){if(i){var l=o&&o.length>0?o[0].columns:null;this.dispatchColumnResizedEvent(l,i,s)}return}var u=[],c=[];o.forEach(function(g){var y=g.width,m=g.columns,C=g.ratios,w={},S={};m.forEach(function(F){return c.push(F)});for(var E=!0,A=0,b=function(){if(A++,A>1e3)return console.error("AG Grid: infinite loop in resizeColumnSets"),"break";E=!1;var F=[],M=0,V=y;m.forEach(function(K,te){var Oe=S[K.getId()];if(Oe)V-=w[K.getId()];else{F.push(K);var se=C[te];M+=se}});var k=1/M;F.forEach(function(K,te){var Oe=te===F.length-1,se;Oe?se=V:(se=Math.round(C[te]*y*k),V-=se);var Te=K.getMinWidth(),Z=K.getMaxWidth();O(Te)&&se0&&se>Z&&(se=Z,S[K.getId()]=!0,E=!0),w[K.getId()]=se})};E;){var I=b();if(I==="break")break}m.forEach(function(F){var M=w[F.getId()],V=F.getActualWidth();V!==M&&(F.setActualWidth(M,s),u.push(F))})});var p=u.length>0,d=[];p&&(d=this.refreshFlexedColumns({resizingCols:c,skipSetLeft:!0}),this.setLeftValues(s),this.updateBodyWidths(),this.checkViewportColumns());var f=c.concat(d);(p||i)&&this.dispatchColumnResizedEvent(f,i,s,d)},t.prototype.setColumnAggFunc=function(e,r,o){if(o===void 0&&(o="api"),!!e){var i=this.getPrimaryColumn(e);i&&(i.setAggFunc(r),this.dispatchColumnChangedEvent(v.EVENT_COLUMN_VALUE_CHANGED,[i],o))}},t.prototype.moveRowGroupColumn=function(e,r,o){o===void 0&&(o="api");var i=this.rowGroupColumns[e];this.rowGroupColumns.splice(e,1),this.rowGroupColumns.splice(r,0,i);var s={type:v.EVENT_COLUMN_ROW_GROUP_CHANGED,columns:this.rowGroupColumns,column:this.rowGroupColumns.length===1?this.rowGroupColumns[0]:null,source:o};this.eventService.dispatchEvent(s)},t.prototype.moveColumns=function(e,r,o,i){if(o===void 0&&(o="api"),i===void 0&&(i=!0),this.columnAnimationService.start(),r>this.gridColumns.length-e.length){console.warn("AG Grid: tried to insert columns in invalid location, toIndex = "+r),console.warn("AG Grid: remember that you should not count the moving columns when calculating the new index");return}var s=this.getGridColumns(e),a=!this.doesMovePassRules(s,r);a||(Bi(this.gridColumns,s,r),this.updateDisplayedColumns(o),this.dispatchColumnMovedEvent({movedColumns:s,source:o,toIndex:r,finished:i}),this.columnAnimationService.finish())},t.prototype.doesMovePassRules=function(e,r){var o=this.getProposedColumnOrder(e,r);return this.doesOrderPassRules(o)},t.prototype.doesOrderPassRules=function(e){return!(!this.doesMovePassMarryChildren(e)||!this.doesMovePassLockedPositions(e))},t.prototype.getProposedColumnOrder=function(e,r){var o=this.gridColumns.slice();return Bi(o,e,r),o},t.prototype.sortColumnsLikeGridColumns=function(e){var r=this;if(!(!e||e.length<=1)){var o=e.filter(function(i){return r.gridColumns.indexOf(i)<0}).length>0;o||e.sort(function(i,s){var a=r.gridColumns.indexOf(i),l=r.gridColumns.indexOf(s);return a-l})}},t.prototype.doesMovePassLockedPositions=function(e){var r=0,o=!0,i=function(s){return s?s===!0||s==="left"?0:2:1};return e.forEach(function(s){var a=i(s.getColDef().lockPosition);ad&&(r=!1)}}}),r},t.prototype.moveColumn=function(e,r,o){o===void 0&&(o="api"),this.moveColumns([e],r,o)},t.prototype.moveColumnByIndex=function(e,r,o){o===void 0&&(o="api");var i=this.gridColumns[e];this.moveColumn(i,r,o)},t.prototype.getColumnDefs=function(){var e=this;if(this.primaryColumns){var r=this.primaryColumns.slice();return this.gridColsArePrimary?r.sort(function(o,i){return e.gridColumns.indexOf(o)-e.gridColumns.indexOf(i)}):this.lastPrimaryOrder&&r.sort(function(o,i){return e.lastPrimaryOrder.indexOf(o)-e.lastPrimaryOrder.indexOf(i)}),this.columnDefFactory.buildColumnDefs(r,this.rowGroupColumns,this.pivotColumns)}},t.prototype.getBodyContainerWidth=function(){return this.bodyWidth},t.prototype.getContainerWidth=function(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}},t.prototype.updateBodyWidths=function(){var e=this.getWidthOfColsInList(this.displayedColumnsCenter),r=this.getWidthOfColsInList(this.displayedColumnsLeft),o=this.getWidthOfColsInList(this.displayedColumnsRight);this.bodyWidthDirty=this.bodyWidth!==e;var i=this.bodyWidth!==e||this.leftWidth!==r||this.rightWidth!==o;if(i){this.bodyWidth=e,this.leftWidth=r,this.rightWidth=o;var s={type:v.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED};this.eventService.dispatchEvent(s)}},t.prototype.getValueColumns=function(){return this.valueColumns?this.valueColumns:[]},t.prototype.getPivotColumns=function(){return this.pivotColumns?this.pivotColumns:[]},t.prototype.isPivotActive=function(){return this.pivotColumns&&this.pivotColumns.length>0&&this.pivotMode},t.prototype.getRowGroupColumns=function(){return this.rowGroupColumns?this.rowGroupColumns:[]},t.prototype.getDisplayedCenterColumns=function(){return this.displayedColumnsCenter},t.prototype.getDisplayedLeftColumns=function(){return this.displayedColumnsLeft},t.prototype.getDisplayedRightColumns=function(){return this.displayedColumnsRight},t.prototype.getDisplayedColumns=function(e){switch(e){case"left":return this.getDisplayedLeftColumns();case"right":return this.getDisplayedRightColumns();default:return this.getDisplayedCenterColumns()}},t.prototype.getAllPrimaryColumns=function(){return this.primaryColumns?this.primaryColumns.slice():null},t.prototype.getSecondaryColumns=function(){return this.secondaryColumns?this.secondaryColumns.slice():null},t.prototype.getAllColumnsForQuickFilter=function(){return this.columnsForQuickFilter},t.prototype.getAllGridColumns=function(){return this.gridColumns},t.prototype.isEmpty=function(){return Pe(this.gridColumns)},t.prototype.isRowGroupEmpty=function(){return Pe(this.rowGroupColumns)},t.prototype.setColumnVisible=function(e,r,o){o===void 0&&(o="api"),this.setColumnsVisible([e],r,o)},t.prototype.setColumnsVisible=function(e,r,o){r===void 0&&(r=!1),o===void 0&&(o="api"),this.applyColumnState({state:e.map(function(i){return{colId:typeof i=="string"?i:i.getColId(),hide:!r}})},o)},t.prototype.setColumnPinned=function(e,r,o){o===void 0&&(o="api"),e&&this.setColumnsPinned([e],r,o)},t.prototype.setColumnsPinned=function(e,r,o){if(o===void 0&&(o="api"),this.gridOptionsService.isDomLayout("print")){console.warn("AG Grid: Changing the column pinning status is not allowed with domLayout='print'");return}this.columnAnimationService.start();var i;r===!0||r==="left"?i="left":r==="right"?i="right":i=null,this.actionOnGridColumns(e,function(s){return s.getPinned()!==i?(s.setPinned(i),!0):!1},o,function(){var s={type:v.EVENT_COLUMN_PINNED,pinned:i,column:null,columns:null,source:o};return s}),this.columnAnimationService.finish()},t.prototype.actionOnGridColumns=function(e,r,o,i){var s=this;if(!Pe(e)){var a=[];if(e.forEach(function(u){var c=s.getGridColumn(u);if(c){var p=r(c);p!==!1&&a.push(c)}}),!!a.length&&(this.updateDisplayedColumns(o),O(i)&&i)){var l=i();l.columns=a,l.column=a.length===1?a[0]:null,this.eventService.dispatchEvent(l)}}},t.prototype.getDisplayedColBefore=function(e){var r=this.getAllDisplayedColumns(),o=r.indexOf(e);return o>0?r[o-1]:null},t.prototype.getDisplayedColAfter=function(e){var r=this.getAllDisplayedColumns(),o=r.indexOf(e);return o0},t.prototype.isPinningRight=function(){return this.displayedColumnsRight.length>0},t.prototype.getPrimaryAndSecondaryAndAutoColumns=function(){var e;return(e=[]).concat.apply(e,[this.primaryColumns||[],this.groupAutoColumns||[],this.secondaryColumns||[]])},t.prototype.createStateItemFromColumn=function(e){var r=e.isRowGroupActive()?this.rowGroupColumns.indexOf(e):null,o=e.isPivotActive()?this.pivotColumns.indexOf(e):null,i=e.isValueActive()?e.getAggFunc():null,s=e.getSort()!=null?e.getSort():null,a=e.getSortIndex()!=null?e.getSortIndex():null,l=e.getFlex()!=null&&e.getFlex()>0?e.getFlex():null,u={colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:s,sortIndex:a,aggFunc:i,rowGroup:e.isRowGroupActive(),rowGroupIndex:r,pivot:e.isPivotActive(),pivotIndex:o,flex:l};return u},t.prototype.getColumnState=function(){if(N(this.primaryColumns)||!this.isAlive())return[];var e=this.getPrimaryAndSecondaryAndAutoColumns(),r=e.map(this.createStateItemFromColumn.bind(this));return this.orderColumnStateList(r),r},t.prototype.orderColumnStateList=function(e){var r=vt(this.gridColumns.map(function(o,i){return[o.getColId(),i]}));e.sort(function(o,i){var s=r.has(o.colId)?r.get(o.colId):-1,a=r.has(i.colId)?r.get(i.colId):-1;return s-a})},t.prototype.resetColumnState=function(e){var r=this;e===void 0&&(e="api");var o=this.getColumnsFromTree(this.primaryColumnTree),i=[],s=1e3,a=1e3,l=[];this.groupAutoColumns&&(l=l.concat(this.groupAutoColumns)),o&&(l=l.concat(o)),l.forEach(function(u){var c=r.getColumnStateFromColDef(u);N(c.rowGroupIndex)&&c.rowGroup&&(c.rowGroupIndex=s++),N(c.pivotIndex)&&c.pivot&&(c.pivotIndex=a++),i.push(c)}),this.applyColumnState({state:i,applyOrder:!0},e)},t.prototype.getColumnStateFromColDef=function(e){var r=function(m,C){return m??C??null},o=e.getColDef(),i=r(o.sort,o.initialSort),s=r(o.sortIndex,o.initialSortIndex),a=r(o.hide,o.initialHide),l=r(o.pinned,o.initialPinned),u=r(o.width,o.initialWidth),c=r(o.flex,o.initialFlex),p=r(o.rowGroupIndex,o.initialRowGroupIndex),d=r(o.rowGroup,o.initialRowGroup);p==null&&(d==null||d==!1)&&(p=null,d=null);var f=r(o.pivotIndex,o.initialPivotIndex),g=r(o.pivot,o.initialPivot);f==null&&(g==null||g==!1)&&(f=null,g=null);var y=r(o.aggFunc,o.initialAggFunc);return{colId:e.getColId(),sort:i,sortIndex:s,hide:a,pinned:l,width:u,flex:c,rowGroup:d,rowGroupIndex:p,pivot:g,pivotIndex:f,aggFunc:y}},t.prototype.applyColumnState=function(e,r){var o=this;if(Pe(this.primaryColumns))return!1;if(e&&e.state&&!e.state.forEach)return console.warn("AG Grid: 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."),!1;var i=function(u,c,p){var d=o.compareColumnStatesAndDispatchEvents(r);o.autoGroupsNeedBuilding=!0;var f=c.slice(),g={},y={},m=[],C=[],w=0,S=o.rowGroupColumns.slice(),E=o.pivotColumns.slice();u.forEach(function(F){var M=F.colId||"",V=M.startsWith(pr);if(V){m.push(F),C.push(F);return}var k=p(M);k?(o.syncColumnWithStateItem(k,F,e.defaultState,g,y,!1,r),fe(f,k)):(C.push(F),w+=1)});var A=function(F){return o.syncColumnWithStateItem(F,null,e.defaultState,g,y,!1,r)};f.forEach(A);var b=function(F,M,V,k){var K=F[V.getId()],te=F[k.getId()],Oe=K!=null,se=te!=null;if(Oe&&se)return K-te;if(Oe)return-1;if(se)return 1;var Te=M.indexOf(V),Z=M.indexOf(k),ht=Te>=0,ur=Z>=0;return ht&&ur?Te-Z:ht?-1:1};o.rowGroupColumns.sort(b.bind(o,g,S)),o.pivotColumns.sort(b.bind(o,y,E)),o.updateGridColumns();var I=o.groupAutoColumns?o.groupAutoColumns.slice():[];return m.forEach(function(F){var M=o.getAutoColumn(F.colId);fe(I,M),o.syncColumnWithStateItem(M,F,e.defaultState,null,null,!0,r)}),I.forEach(A),o.applyOrderAfterApplyState(e),o.updateDisplayedColumns(r),o.dispatchEverythingChanged(r),d(),{unmatchedAndAutoStates:C,unmatchedCount:w}};this.columnAnimationService.start();var s=i(e.state||[],this.primaryColumns||[],function(u){return o.getPrimaryColumn(u)}),a=s.unmatchedAndAutoStates,l=s.unmatchedCount;return(a.length>0||O(e.defaultState))&&(l=i(a,this.secondaryColumns||[],function(u){return o.getSecondaryColumn(u)}).unmatchedCount),this.columnAnimationService.finish(),l===0},t.prototype.applyOrderAfterApplyState=function(e){var r=this;if(!(!e.applyOrder||!e.state)){var o=[],i={};e.state.forEach(function(a){if(!(!a.colId||i[a.colId])){var l=r.gridColumnsMap[a.colId];l&&(o.push(l),i[a.colId]=!0)}});var s=0;if(this.gridColumns.forEach(function(a){var l=a.getColId(),u=i[l]!=null;if(!u){var c=l.startsWith(pr);c?Gr(o,a,s++):o.push(a)}}),o=this.placeLockedColumns(o),!this.doesMovePassMarryChildren(o)){console.warn("AG Grid: Applying column order broke a group where columns should be married together. Applying new order has been discarded.");return}this.gridColumns=o}},t.prototype.compareColumnStatesAndDispatchEvents=function(e){var r=this,o={rowGroupColumns:this.rowGroupColumns.slice(),pivotColumns:this.pivotColumns.slice(),valueColumns:this.valueColumns.slice()},i=this.getColumnState(),s={};return i.forEach(function(a){s[a.colId]=a}),function(){var a=r.getPrimaryAndSecondaryAndAutoColumns(),l=function(C,w,S,E){var A=w.map(E),b=S.map(E),I=_t(A,b);if(!I){var F={type:C,columns:S,column:S.length===1?S[0]:null,source:e};r.eventService.dispatchEvent(F)}},u=function(C){var w=[];return a.forEach(function(S){var E=s[S.getColId()];E&&C(E,S)&&w.push(S)}),w},c=function(C){return C.getColId()};l(v.EVENT_COLUMN_ROW_GROUP_CHANGED,o.rowGroupColumns,r.rowGroupColumns,c),l(v.EVENT_COLUMN_PIVOT_CHANGED,o.pivotColumns,r.pivotColumns,c);var p=function(C,w){var S=C.aggFunc!=null,E=S!=w.isValueActive(),A=S&&C.aggFunc!=w.getAggFunc();return E||A},d=u(p);d.length>0&&r.dispatchColumnChangedEvent(v.EVENT_COLUMN_VALUE_CHANGED,r.valueColumns,e);var f=function(C,w){return C.width!=w.getActualWidth()};r.dispatchColumnResizedEvent(u(f),!0,e);var g=function(C,w){return C.pinned!=w.getPinned()};r.dispatchColumnPinnedEvent(u(g),e);var y=function(C,w){return C.hide==w.isVisible()};r.dispatchColumnVisibleEvent(u(y),e);var m=function(C,w){return C.sort!=w.getSort()||C.sortIndex!=w.getSortIndex()};u(m).length>0&&r.sortController.dispatchSortChangedEvents(e),r.normaliseColumnMovedEventForColumnState(i,e)}},t.prototype.getCommonValue=function(e,r){if(!(!e||e.length==0)){for(var o=r(e[0]),i=1;i=d&&e.setActualWidth(y,l)}var m=u("sort").value1;m!==void 0&&(m==="desc"||m==="asc"?e.setSort(m,l):e.setSort(void 0,l));var C=u("sortIndex").value1;if(C!==void 0&&e.setSortIndex(C),!(a||!e.isPrimary())){var w=u("aggFunc").value1;w!==void 0&&(typeof w=="string"?(e.setAggFunc(w),e.isValueActive()||(e.setValueActive(!0,l),this.valueColumns.push(e))):(O(w)&&console.warn("AG Grid: 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."),e.isValueActive()&&(e.setValueActive(!1,l),fe(this.valueColumns,e))));var S=u("rowGroup","rowGroupIndex"),E=S.value1,A=S.value2;(E!==void 0||A!==void 0)&&(typeof A=="number"||E?(e.isRowGroupActive()||(e.setRowGroupActive(!0,l),this.rowGroupColumns.push(e)),i&&typeof A=="number"&&(i[e.getId()]=A)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,l),fe(this.rowGroupColumns,e)));var b=u("pivot","pivotIndex"),I=b.value1,F=b.value2;(I!==void 0||F!==void 0)&&(typeof F=="number"||I?(e.isPivotActive()||(e.setPivotActive(!0,l),this.pivotColumns.push(e)),s&&typeof F=="number"&&(s[e.getId()]=F)):e.isPivotActive()&&(e.setPivotActive(!1,l),fe(this.pivotColumns,e)))}}},t.prototype.getGridColumns=function(e){return this.getColumns(e,this.getGridColumn.bind(this))},t.prototype.getColumns=function(e,r){var o=[];return e&&e.forEach(function(i){var s=r(i);s&&o.push(s)}),o},t.prototype.getColumnWithValidation=function(e){if(e==null)return null;var r=this.getGridColumn(e);return r||console.warn("AG Grid: could not find column "+e),r},t.prototype.getPrimaryColumn=function(e){return this.primaryColumns?this.getColumn(e,this.primaryColumns,this.primaryColumnsMap):null},t.prototype.getGridColumn=function(e){return this.getColumn(e,this.gridColumns,this.gridColumnsMap)},t.prototype.getSecondaryColumn=function(e){return this.secondaryColumns?this.getColumn(e,this.secondaryColumns,this.secondaryColumnsMap):null},t.prototype.getColumn=function(e,r,o){if(!e)return null;if(typeof e=="string"&&o[e])return o[e];for(var i=0;i=0:g?I?E=C:F?E=S!=null&&S>=0:E=!1:E=r.indexOf(f)>=0,E){var M=g?w!=null||S!=null:w!=null;M?u.push(f):c.push(f)}});var p=function(f){var g=i(f.getColDef()),y=s(f.getColDef());return g??y};u.sort(function(f,g){var y=p(f),m=p(g);return y===m?0:y=0&&d.push(f)}),c.forEach(function(f){d.indexOf(f)<0&&d.push(f)}),r.forEach(function(f){d.indexOf(f)<0&&o(f,!1)}),d.forEach(function(f){r.indexOf(f)<0&&o(f,!0)}),d},t.prototype.extractPivotColumns=function(e,r){this.pivotColumns=this.extractColumns(r,this.pivotColumns,function(o,i){return o.setPivotActive(i,e)},function(o){return o.pivotIndex},function(o){return o.initialPivotIndex},function(o){return o.pivot},function(o){return o.initialPivot})},t.prototype.resetColumnGroupState=function(e){e===void 0&&(e="api");var r=[];this.columnUtils.depthFirstOriginalTreeSearch(null,this.primaryColumnTree,function(o){if(o instanceof re){var i=o.getColGroupDef(),s={groupId:o.getGroupId(),open:i?i.openByDefault:void 0};r.push(s)}}),this.setColumnGroupState(r,e)},t.prototype.getColumnGroupState=function(){var e=[];return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,function(r){r instanceof re&&e.push({groupId:r.getGroupId(),open:r.isExpanded()})}),e},t.prototype.setColumnGroupState=function(e,r){var o=this;r===void 0&&(r="api"),this.columnAnimationService.start();var i=[];e.forEach(function(s){var a=s.groupId,l=s.open,u=o.getProvidedColumnGroup(a);u&&u.isExpanded()!==l&&(o.logger.log("columnGroupOpened("+u.getGroupId()+","+l+")"),u.setExpanded(l),i.push(u))}),this.updateGroupsAndDisplayedColumns(r),this.setFirstRightAndLastLeftPinned(r),i.forEach(function(s){var a={type:v.EVENT_COLUMN_GROUP_OPENED,columnGroup:s};o.eventService.dispatchEvent(a)}),this.columnAnimationService.finish()},t.prototype.setColumnGroupOpened=function(e,r,o){o===void 0&&(o="api");var i;e instanceof re?i=e.getId():i=e||"",this.setColumnGroupState([{groupId:i,open:r}],o)},t.prototype.getProvidedColumnGroup=function(e){typeof e!="string"&&console.error("AG Grid: group key must be a string");var r=null;return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,function(o){o instanceof re&&o.getId()===e&&(r=o)}),r},t.prototype.calculateColumnsForDisplay=function(){var e=this,r;return this.pivotMode&&N(this.secondaryColumns)?r=this.gridColumns.filter(function(o){var i=e.groupAutoColumns&&Me(e.groupAutoColumns,o),s=e.valueColumns&&Me(e.valueColumns,o);return i||s}):r=this.gridColumns.filter(function(o){var i=e.groupAutoColumns&&Me(e.groupAutoColumns,o);return i||o.isVisible()}),r},t.prototype.checkColSpanActiveInCols=function(e){var r=!1;return e.forEach(function(o){O(o.getColDef().colSpan)&&(r=!0)}),r},t.prototype.calculateColumnsForGroupDisplay=function(){var e=this;this.groupDisplayColumns=[],this.groupDisplayColumnsMap={};var r=function(o){var i=o.getColDef(),s=i.showRowGroup;i&&O(s)&&(e.groupDisplayColumns.push(o),typeof s=="string"?e.groupDisplayColumnsMap[s]=o:s===!0&&e.getRowGroupColumns().forEach(function(a){e.groupDisplayColumnsMap[a.getId()]=o}))};this.gridColumns.forEach(r)},t.prototype.getGroupDisplayColumns=function(){return this.groupDisplayColumns},t.prototype.getGroupDisplayColumnForGroup=function(e){return this.groupDisplayColumnsMap[e]},t.prototype.updateDisplayedColumns=function(e){var r=this.calculateColumnsForDisplay();this.buildDisplayedTrees(r),this.updateGroupsAndDisplayedColumns(e),this.setFirstRightAndLastLeftPinned(e)},t.prototype.isSecondaryColumnsPresent=function(){return O(this.secondaryColumns)},t.prototype.setSecondaryColumns=function(e,r){var o=this;r===void 0&&(r="api");var i=e&&e.length>0;if(!(!i&&N(this.secondaryColumns))){if(i){this.processSecondaryColumnDefinitions(e);var s=this.columnFactory.createColumnTree(e,!1,this.secondaryBalancedTree||this.previousSecondaryColumns||void 0);this.destroyOldColumns(this.secondaryBalancedTree,s.columnTree),this.secondaryBalancedTree=s.columnTree,this.secondaryHeaderRowCount=s.treeDept+1,this.secondaryColumns=this.getColumnsFromTree(this.secondaryBalancedTree),this.secondaryColumnsMap={},this.secondaryColumns.forEach(function(a){return o.secondaryColumnsMap[a.getId()]=a}),this.previousSecondaryColumns=null}else this.previousSecondaryColumns=this.secondaryBalancedTree,this.secondaryBalancedTree=null,this.secondaryHeaderRowCount=-1,this.secondaryColumns=null,this.secondaryColumnsMap={};this.updateGridColumns(),this.updateDisplayedColumns(r)}},t.prototype.processSecondaryColumnDefinitions=function(e){var r=this.gridOptionsService.get("processPivotResultColDef")||this.gridOptionsService.get("processSecondaryColDef"),o=this.gridOptionsService.get("processPivotResultColGroupDef")||this.gridOptionsService.get("processSecondaryColGroupDef");if(!(!r&&!o)){var i=function(s){s.forEach(function(a){var l=O(a.children);if(l){var u=a;o&&o(u),i(u.children)}else{var c=a;r&&r(c)}})};e&&i(e)}},t.prototype.updateGridColumns=function(){var e=this,r=this.gridBalancedTree;this.gridColsArePrimary?this.lastPrimaryOrder=this.gridColumns:this.lastSecondaryOrder=this.gridColumns;var o;if(this.secondaryColumns&&this.secondaryBalancedTree){var i=this.secondaryColumns.every(function(u){return e.gridColumnsMap[u.getColId()]!==void 0});this.gridBalancedTree=this.secondaryBalancedTree.slice(),this.gridHeaderRowCount=this.secondaryHeaderRowCount,this.gridColumns=this.secondaryColumns.slice(),this.gridColsArePrimary=!1,i&&(o=this.lastSecondaryOrder)}else this.primaryColumns&&(this.gridBalancedTree=this.primaryColumnTree.slice(),this.gridHeaderRowCount=this.primaryHeaderRowCount,this.gridColumns=this.primaryColumns.slice(),this.gridColsArePrimary=!0,o=this.lastPrimaryOrder);var s=this.createGroupAutoColumnsIfNeeded();if(s&&o){var a=vt(this.groupAutoColumns.map(function(u){return[u,!0]}));o=o.filter(function(u){return!a.has(u)}),o=Qt(Qt([],qt(this.groupAutoColumns)),qt(o))}if(this.addAutoGroupToGridColumns(),this.orderGridColsLike(o),this.gridColumns=this.placeLockedColumns(this.gridColumns),this.calculateColumnsForGroupDisplay(),this.refreshQuickFilterColumns(),this.clearDisplayedAndViewportColumns(),this.colSpanActive=this.checkColSpanActiveInCols(this.gridColumns),this.gridColumnsMap={},this.gridColumns.forEach(function(u){return e.gridColumnsMap[u.getId()]=u}),this.setAutoHeightActive(),!_t(r,this.gridBalancedTree)){var l={type:v.EVENT_GRID_COLUMNS_CHANGED};this.eventService.dispatchEvent(l)}},t.prototype.setAutoHeightActive=function(){if(this.autoHeightActive=this.gridColumns.filter(function(o){return o.isAutoHeight()}).length>0,this.autoHeightActive){this.autoHeightActiveAtLeastOnce=!0;var e=this.gridOptionsService.isRowModelType("clientSide")||this.gridOptionsService.isRowModelType("serverSide");if(!e){var r="AG Grid - autoHeight columns only work with Client Side Row Model and Server Side Row Model.";z(function(){return console.warn(r)},"autoHeightActive.wrongRowModel")}}},t.prototype.orderGridColsLike=function(e){if(!N(e)){var r=vt(e.map(function(c,p){return[c,p]})),o=!0;if(this.gridColumns.forEach(function(c){r.has(c)&&(o=!1)}),!o){var i=vt(this.gridColumns.map(function(c){return[c,!0]})),s=e.filter(function(c){return i.has(c)}),a=vt(s.map(function(c){return[c,!0]})),l=this.gridColumns.filter(function(c){return!a.has(c)}),u=s.slice();l.forEach(function(c){var p=c.getOriginalParent();if(!p){u.push(c);return}for(var d=[];!d.length&&p;){var f=p.getLeafColumns();f.forEach(function(m){var C=u.indexOf(m)>=0,w=d.indexOf(m)<0;C&&w&&d.push(m)}),p=p.getOriginalParent()}if(!d.length){u.push(c);return}var g=d.map(function(m){return u.indexOf(m)}),y=Math.max.apply(Math,Qt([],qt(g)));Gr(u,c,y+1)}),this.gridColumns=u}}},t.prototype.isPrimaryColumnGroupsPresent=function(){return this.primaryHeaderRowCount>1},t.prototype.refreshQuickFilterColumns=function(){var e,r=(e=this.isPivotMode()?this.secondaryColumns:this.primaryColumns)!==null&&e!==void 0?e:[];this.groupAutoColumns&&(r=r.concat(this.groupAutoColumns)),this.columnsForQuickFilter=this.gridOptionsService.is("includeHiddenColumnsInQuickFilter")?r:r.filter(function(o){return o.isVisible()||o.isRowGroupActive()})},t.prototype.placeLockedColumns=function(e){var r=[],o=[],i=[];return e.forEach(function(s){var a=s.getColDef().lockPosition;a==="right"?i.push(s):a==="left"||a===!0?r.push(s):o.push(s)}),Qt(Qt(Qt([],qt(r)),qt(o)),qt(i))},t.prototype.addAutoGroupToGridColumns=function(){if(N(this.groupAutoColumns)){this.destroyOldColumns(this.groupAutoColsBalancedTree),this.groupAutoColsBalancedTree=null;return}this.gridColumns=this.groupAutoColumns?this.groupAutoColumns.concat(this.gridColumns):this.gridColumns;var e=this.columnFactory.createForAutoGroups(this.groupAutoColumns,this.gridBalancedTree);this.destroyOldColumns(this.groupAutoColsBalancedTree,e),this.groupAutoColsBalancedTree=e,this.gridBalancedTree=e.concat(this.gridBalancedTree)},t.prototype.clearDisplayedAndViewportColumns=function(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.viewportColumns=[],this.headerViewportColumns=[],this.viewportColumnsHash=""},t.prototype.updateGroupsAndDisplayedColumns=function(e){this.updateOpenClosedVisibilityInColumnGroups(),this.deriveDisplayedColumns(e),this.refreshFlexedColumns(),this.extractViewport(),this.updateBodyWidths();var r={type:v.EVENT_DISPLAYED_COLUMNS_CHANGED};this.eventService.dispatchEvent(r)},t.prototype.deriveDisplayedColumns=function(e){this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeLeft,this.displayedColumnsLeft),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeCentre,this.displayedColumnsCenter),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeRight,this.displayedColumnsRight),this.joinDisplayedColumns(),this.setLeftValues(e),this.displayedAutoHeightCols=this.displayedColumns.filter(function(r){return r.isAutoHeight()})},t.prototype.isAutoRowHeightActive=function(){return this.autoHeightActive},t.prototype.wasAutoRowHeightEverActive=function(){return this.autoHeightActiveAtLeastOnce},t.prototype.joinDisplayedColumns=function(){this.gridOptionsService.is("enableRtl")?this.displayedColumns=this.displayedColumnsRight.concat(this.displayedColumnsCenter).concat(this.displayedColumnsLeft):this.displayedColumns=this.displayedColumnsLeft.concat(this.displayedColumnsCenter).concat(this.displayedColumnsRight)},t.prototype.setLeftValues=function(e){this.setLeftValuesOfColumns(e),this.setLeftValuesOfGroups()},t.prototype.setLeftValuesOfColumns=function(e){var r=this;if(this.primaryColumns){var o=this.primaryColumns.slice(0),i=this.gridOptionsService.is("enableRtl");[this.displayedColumnsLeft,this.displayedColumnsRight,this.displayedColumnsCenter].forEach(function(s){if(i){var a=r.getWidthOfColsInList(s);s.forEach(function(u){a-=u.getActualWidth(),u.setLeft(a,e)})}else{var l=0;s.forEach(function(u){u.setLeft(l,e),l+=u.getActualWidth()})}Vi(o,s)}),o.forEach(function(s){s.setLeft(null,e)})}},t.prototype.setLeftValuesOfGroups=function(){[this.displayedTreeLeft,this.displayedTreeRight,this.displayedTreeCentre].forEach(function(e){e.forEach(function(r){if(r instanceof we){var o=r;o.checkLeft()}})})},t.prototype.derivedDisplayedColumnsFromDisplayedTree=function(e,r){r.length=0,this.columnUtils.depthFirstDisplayedColumnTreeSearch(e,function(o){o instanceof X&&r.push(o)})},t.prototype.extractViewportColumns=function(){this.suppressColumnVirtualisation?(this.viewportColumnsCenter=this.displayedColumnsCenter,this.headerViewportColumnsCenter=this.displayedColumnsCenter):(this.viewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInRowViewport.bind(this)),this.headerViewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInHeaderViewport.bind(this))),this.viewportColumns=this.viewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight),this.headerViewportColumns=this.headerViewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight)},t.prototype.getVirtualHeaderGroupRow=function(e,r){var o;switch(e){case"left":o=this.viewportRowLeft[r];break;case"right":o=this.viewportRowRight[r];break;default:o=this.viewportRowCenter[r];break}return N(o)&&(o=[]),o},t.prototype.calculateHeaderRows=function(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={};var e={};this.headerViewportColumns.forEach(function(o){return e[o.getId()]=!0});var r=function(o,i,s){for(var a=!1,l=0;li;return E.getFlex()&&A},a=this.displayedColumnsCenter.filter(function(E){return!s(E)}),l=this.displayedColumnsCenter.filter(function(E){return s(E)}),u=[];if(!l.length)return[];var c=[],p;e:for(;;){var d=l.reduce(function(E,A){return E+A.getFlex()},0);p=this.flexViewportWidth-this.getWidthOfColsInList(a);for(var f=0;fw&&(m=w),m){g.setActualWidth(m,o),fe(l,g),u.push(g),a.push(g);continue e}c[f]=Math.round(y)}break}var S=p;return l.forEach(function(E,A){E.setActualWidth(Math.min(c[A],S),o),u.push(E),S-=c[A]}),e.skipSetLeft||this.setLeftValues(o),e.updateBodyWidths&&this.updateBodyWidths(),e.fireResizedEvent&&this.dispatchColumnResizedEvent(u,!0,o,l),l},t.prototype.sizeColumnsToFit=function(e,r,o,i){var s=this,a,l,u,c,p;if(r===void 0&&(r="sizeColumnsToFit"),this.shouldQueueResizeOperations){this.resizeOperationQueue.push(function(){return s.sizeColumnsToFit(e,r,o,i)});return}var d={};i&&((a=i==null?void 0:i.columnLimits)===null||a===void 0||a.forEach(function(Z){var ht=Z.key,ur=Lc(Z,["key"]);d[typeof ht=="string"?ht:ht.getColId()]=ur}));var f=this.getAllDisplayedColumns(),g=e===this.getWidthOfColsInList(f);if(!(e<=0||!f.length||g)){var y=[],m=[];f.forEach(function(Z){Z.getColDef().suppressSizeToFit===!0?m.push(Z):y.push(Z)});var C=y.slice(0),w=!1,S=function(Z){fe(y,Z),m.push(Z)};for(y.forEach(function(Z){return Z.resetActualWidth(r)});!w;){w=!0;var E=e-this.getWidthOfColsInList(m);if(E<=0)y.forEach(function(Z){var ht,ur,Nu=(ur=(ht=d==null?void 0:d[Z.getId()])===null||ht===void 0?void 0:ht.minWidth)!==null&&ur!==void 0?ur:i==null?void 0:i.defaultMinWidth;if(typeof Nu=="number"){Z.setActualWidth(Nu);return}Z.setMinimum(r)});else for(var A=E/this.getWidthOfColsInList(y),b=E,I=y.length-1;I>=0;I--){var F=y[I],M=d==null?void 0:d[F.getId()],V=(l=M==null?void 0:M.minWidth)!==null&&l!==void 0?l:i==null?void 0:i.defaultMinWidth,k=(u=M==null?void 0:M.maxWidth)!==null&&u!==void 0?u:i==null?void 0:i.defaultMaxWidth,K=(c=F.getMinWidth())!==null&&c!==void 0?c:0,te=(p=F.getMaxWidth())!==null&&p!==void 0?p:Number.MAX_VALUE,Oe=typeof V=="number"&&V>K?V:F.getMinWidth(),se=typeof k=="number"&&kse?(Te=se,S(F),w=!1):I===0&&(Te=b),F.setActualWidth(Te,r,!0),b-=Te}}C.forEach(function(Z){Z.fireColumnWidthChangedEvent(r)}),this.setLeftValues(r),this.updateBodyWidths(),!o&&this.dispatchColumnResizedEvent(C,!0,r)}},t.prototype.buildDisplayedTrees=function(e){var r=[],o=[],i=[];e.forEach(function(a){switch(a.getPinned()){case"left":r.push(a);break;case"right":o.push(a);break;default:i.push(a);break}});var s=new la;this.displayedTreeLeft=this.displayedGroupCreator.createDisplayedGroups(r,this.gridBalancedTree,s,"left",this.displayedTreeLeft),this.displayedTreeRight=this.displayedGroupCreator.createDisplayedGroups(o,this.gridBalancedTree,s,"right",this.displayedTreeRight),this.displayedTreeCentre=this.displayedGroupCreator.createDisplayedGroups(i,this.gridBalancedTree,s,null,this.displayedTreeCentre),this.updateDisplayedMap()},t.prototype.updateDisplayedMap=function(){var e=this;this.displayedColumnsAndGroupsMap={};var r=function(o){e.displayedColumnsAndGroupsMap[o.getUniqueId()]=o};this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeCentre,r),this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeLeft,r),this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeRight,r)},t.prototype.isDisplayed=function(e){var r=this.displayedColumnsAndGroupsMap[e.getUniqueId()];return r===e},t.prototype.updateOpenClosedVisibilityInColumnGroups=function(){var e=this.getAllDisplayedTrees();this.columnUtils.depthFirstAllColumnTreeSearch(e,function(r){if(r instanceof we){var o=r;o.calculateDisplayedColumns()}})},t.prototype.getGroupAutoColumns=function(){return this.groupAutoColumns},t.prototype.createGroupAutoColumnsIfNeeded=function(){var e=this.forceRecreateAutoGroups;if(this.forceRecreateAutoGroups=!1,!this.autoGroupsNeedBuilding)return!1;this.autoGroupsNeedBuilding=!1;var r=this.gridOptionsService.isGroupUseEntireRow(this.pivotMode),o=this.pivotMode?this.gridOptionsService.is("pivotSuppressAutoColumn"):this.isGroupSuppressAutoColumn(),i=this.rowGroupColumns.length>0||this.usingTreeData,s=i&&!o&&!r;if(s){var a=this.groupAutoColumns||[],l=this.autoGroupColService.createAutoGroupColumns(a,this.rowGroupColumns),u=!this.autoColsEqual(l,this.groupAutoColumns);if(u||e)return this.groupAutoColumns=l,!0}else this.groupAutoColumns=null;return!1},t.prototype.isGroupSuppressAutoColumn=function(){var e=this.gridOptionsService.get("groupDisplayType"),r=e?Ki("custom",e):!1;if(r)return!0;var o=this.gridOptionsService.get("treeDataDisplayType");return o?bc("custom",o):!1},t.prototype.autoColsEqual=function(e,r){return _t(e,r,function(o,i){return o.getColId()===i.getColId()})},t.prototype.getWidthOfColsInList=function(e){return e.reduce(function(r,o){return r+o.getActualWidth()},0)},t.prototype.getGridBalancedTree=function(){return this.gridBalancedTree},t.prototype.hasFloatingFilters=function(){if(!this.gridColumns)return!1;var e=this.gridColumns.some(function(r){return r.getColDef().floatingFilter});return e},t.prototype.getFirstDisplayedColumn=function(){var e=this.gridOptionsService.is("enableRtl"),r=["getDisplayedLeftColumns","getDisplayedCenterColumns","getDisplayedRightColumns"];e&&r.reverse();for(var o=0;o=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Gc=function(n){Mc(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.calculateColMinWidth=function(e){return e.minWidth!=null?e.minWidth:this.environment.getMinColWidth()},t.prototype.calculateColMaxWidth=function(e){return e.maxWidth!=null?e.maxWidth:Number.MAX_SAFE_INTEGER},t.prototype.calculateColInitialWidth=function(e){var r=this.calculateColMinWidth(e),o=this.calculateColMaxWidth(e),i,s=Ie(e.width),a=Ie(e.initialWidth);return s!=null?i=s:a!=null?i=a:i=200,Math.max(Math.min(i,o),r)},t.prototype.getOriginalPathForColumn=function(e,r){var o=[],i=!1,s=function(a,l){for(var u=0;u=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Bc=function(n){Hc(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.createDisplayedGroups=function(e,r,o,i,s){var a=this,l=[],u,c,p=this.mapOldGroupsById(s);return e.forEach(function(d){for(var f=a.getOriginalPathForColumn(r,d),g=[],y=!c,m=0;m=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},kc=function(n){Wc(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.componentsMappedByName={},e}return t.prototype.setupComponents=function(e){var r=this;e&&e.forEach(function(o){return r.addComponent(o)})},t.prototype.addComponent=function(e){var r=e.componentName.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o=r.toUpperCase();this.componentsMappedByName[o]=e.componentClass},t.prototype.getComponentClass=function(e){return this.componentsMappedByName[e]},t=jc([x("agStackComponentsRegistry")],t),t}(T);function nt(n,t,e){e==null||e==""?Yi(n,t):Ge(n,t,e)}function Ge(n,t,e){n.setAttribute(va(t),e.toString())}function Yi(n,t){n.removeAttribute(va(t))}function va(n){return"aria-"+n}function le(n,t){t?n.setAttribute("role",t):n.removeAttribute("role")}function ga(n){var t;return n==="asc"?t="ascending":n==="desc"?t="descending":n==="mixed"?t="other":t="none",t}function ya(n){return parseInt(n.getAttribute("aria-level"),10)}function Ca(n){return parseInt(n.getAttribute("aria-posinset"),10)}function Uc(n){return n.getAttribute("aria-describedby")||""}function Dt(n,t){nt(n,"label",t)}function bo(n,t){nt(n,"labelledby",t)}function ma(n,t){nt(n,"description",t)}function wa(n,t){nt(n,"describedby",t)}function Sa(n,t){nt(n,"live",t)}function Ea(n,t){nt(n,"level",t)}function qi(n,t){nt(n,"disabled",t)}function Fo(n,t){nt(n,"hidden",t)}function Ke(n,t){Ge(n,"expanded",t)}function _a(n){Yi(n,"expanded")}function Qi(n,t){Ge(n,"setsize",t)}function Xi(n,t){Ge(n,"posinset",t)}function Ra(n,t){Ge(n,"multiselectable",t)}function Oa(n,t){Ge(n,"rowcount",t)}function Ji(n,t){Ge(n,"rowindex",t)}function Ta(n,t){Ge(n,"colcount",t)}function Zi(n,t){Ge(n,"colindex",t)}function Pa(n,t){Ge(n,"colspan",t)}function Da(n,t){Ge(n,"sort",t)}function Aa(n){Yi(n,"sort")}function dr(n,t){nt(n,"selected",t)}function ba(n,t){Ge(n,"checked",t===void 0?"mixed":t)}function zc(n,t){nt(n,"controls",t.id),bo(t,n.id)}function xo(n,t){return t===void 0?n("ariaIndeterminate","indeterminate"):t===!0?n("ariaChecked","checked"):n("ariaUnchecked","unchecked")}var $c=Object.freeze({__proto__:null,setAriaRole:le,getAriaSortState:ga,getAriaLevel:ya,getAriaPosInSet:Ca,getAriaDescribedBy:Uc,setAriaLabel:Dt,setAriaLabelledBy:bo,setAriaDescription:ma,setAriaDescribedBy:wa,setAriaLive:Sa,setAriaLevel:Ea,setAriaDisabled:qi,setAriaHidden:Fo,setAriaExpanded:Ke,removeAriaExpanded:_a,setAriaSetSize:Qi,setAriaPosInSet:Xi,setAriaMultiSelectable:Ra,setAriaRowCount:Oa,setAriaRowIndex:Ji,setAriaColCount:Ta,setAriaColIndex:Zi,setAriaColSpan:Pa,setAriaSort:Da,removeAriaSort:Aa,setAriaSelected:dr,setAriaChecked:ba,setAriaControls:zc,getAriaCheckboxStateName:xo}),en,Lo,tn,rn,on,nn,sn,an;function He(){return en===void 0&&(en=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),en}function ln(){if(Lo===void 0)if(He()){var n=navigator.userAgent.match(/version\/(\d+)/i);n&&(Lo=n[1]!=null?parseFloat(n[1]):0)}else Lo=0;return Lo}function Io(){if(tn===void 0){var n=window;tn=!!n.chrome&&(!!n.chrome.webstore||!!n.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return tn}function un(){return rn===void 0&&(rn=/(firefox)/i.test(navigator.userAgent)),rn}function cn(){return on===void 0&&(on=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),on}function At(){return nn===void 0&&(nn=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),nn}function Mo(){return!He()||ln()>=15}function No(n){if(!n)return null;var t=n.tabIndex,e=n.getAttribute("tabIndex");return t===-1&&(e===null||e===""&&!un())?null:t.toString()}function Fa(){if(!document.body)return-1;var n=1e6,t=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,e=document.createElement("div");for(document.body.appendChild(e);;){var r=n*2;if(e.style.height=r+"px",r>t||e.clientHeight!==r)break;n=r}return document.body.removeChild(e),n}function xa(){var n,t,e;return(t=(n=document.body)===null||n===void 0?void 0:n.clientWidth)!==null&&t!==void 0?t:window.innerHeight||((e=document.documentElement)===null||e===void 0?void 0:e.clientWidth)||-1}function La(){var n,t,e;return(t=(n=document.body)===null||n===void 0?void 0:n.clientHeight)!==null&&t!==void 0?t:window.innerHeight||((e=document.documentElement)===null||e===void 0?void 0:e.clientHeight)||-1}function Ia(){return an==null&&Ma(),an}function Ma(){var n=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",n.appendChild(t);var e=t.offsetWidth-t.clientWidth;e===0&&t.clientWidth===0&&(e=null),t.parentNode&&t.parentNode.removeChild(t),e!=null&&(an=e,sn=e===0)}function hr(){return sn==null&&Ma(),sn}var Kc=Object.freeze({__proto__:null,isBrowserSafari:He,getSafariVersion:ln,isBrowserChrome:Io,isBrowserFirefox:un,isMacOsUserAgent:cn,isIOSUserAgent:At,browserSupportsPreventScroll:Mo,getTabIndex:No,getMaxDivHeight:Fa,getBodyWidth:xa,getBodyHeight:La,getScrollbarWidth:Ia,isInvisibleScrollbar:hr});function fr(n,t){return n.toString().padStart(t,"0")}function Na(n,t){for(var e=[],r=n;r<=t;r++)e.push(r);return e}function Yc(n){return typeof n=="string"&&(n=parseInt(n,10)),typeof n=="number"?Math.floor(n):null}function qc(n,t){for(var e="",r=0;r>>=8;return e}function Qc(n,t,e){return typeof n!="number"?"":pn(Math.round(n*100)/100,t,e)}function pn(n,t,e){return typeof n!="number"?"":n.toString().replace(".",e).replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+t)}function Xc(n){return n==null?null:n.reduce(function(t,e){return t+e},0)}function Jc(n,t){return n>=0?n:t}function Zc(n,t){var e=parseInt(n,10);return!isNaN(e)&&isFinite(e)&&e>0?e:t}var ep=Object.freeze({__proto__:null,padStartWidthZeros:fr,createArrayOfNumbers:Na,cleanNumber:Yc,decToHex:qc,formatNumberTwoDecimalPlacesAndCommas:Qc,formatNumberCommas:pn,sum:Xc,zeroOrGreater:Jc,oneOrGreater:Zc}),dn=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i};function Ve(n,t,e){if(t===void 0&&(t=!0),e===void 0&&(e="-"),!n)return null;var r=[n.getFullYear(),n.getMonth()+1,n.getDate()].map(function(o){return fr(o,2)}).join(e);return t&&(r+=" "+[n.getHours(),n.getMinutes(),n.getSeconds()].map(function(o){return fr(o,2)}).join(":")),r}var hn=function(n){if(n>3&&n<21)return"th";var t=n%10;switch(t){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};function Go(n,t){t===void 0&&(t="YYYY-MM-DD");var e=fr(n.getFullYear(),4),r=["January","February","March","April","May","June","July","August","September","October","November","December"],o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],i={YYYY:function(){return e.slice(e.length-4,e.length)},YY:function(){return e.slice(e.length-2,e.length)},Y:function(){return""+n.getFullYear()},MMMM:function(){return r[n.getMonth()]},MMM:function(){return r[n.getMonth()].slice(0,3)},MM:function(){return fr(n.getMonth()+1,2)},Mo:function(){return""+(n.getMonth()+1)+hn(n.getMonth()+1)},M:function(){return""+(n.getMonth()+1)},Do:function(){return""+n.getDate()+hn(n.getDate())},DD:function(){return fr(n.getDate(),2)},D:function(){return""+n.getDate()},dddd:function(){return o[n.getDay()]},ddd:function(){return o[n.getDay()].slice(0,3)},dd:function(){return o[n.getDay()].slice(0,2)},do:function(){return""+n.getDay()+hn(n.getDay())},d:function(){return""+n.getDay()}},s=new RegExp(Object.keys(i).join("|"),"g");return t.replace(s,function(a){return a in i?i[a]():a})}function Ye(n){if(!n)return null;var t=dn(n.split(" "),2),e=t[0],r=t[1];if(!e)return null;var o=e.split("-").map(function(g){return parseInt(g,10)});if(o.filter(function(g){return!isNaN(g)}).length!==3)return null;var i=dn(o,3),s=i[0],a=i[1],l=i[2],u=new Date(s,a-1,l);if(u.getFullYear()!==s||u.getMonth()!==a-1||u.getDate()!==l)return null;if(!r||r==="00:00:00")return u;var c=dn(r.split(":").map(function(g){return parseInt(g,10)}),3),p=c[0],d=c[1],f=c[2];return p>=0&&p<24&&u.setHours(p),d>=0&&d<60&&u.setMinutes(d),f>=0&&f<60&&u.setSeconds(f),u}var tp=Object.freeze({__proto__:null,serialiseDate:Ve,dateToFormattedString:Go,parseDateTimeFromString:Ye}),rp=function(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},op=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Ho;function ip(n,t,e){for(var r=n.parentElement,o=r&&r.firstChild;o;)t&&o.classList.toggle(t,o===n),e&&o.classList.toggle(e,o!==n),o=o.nextSibling}var Ga="[tabindex], input, select, button, textarea, [href]",fn=".ag-hidden, .ag-hidden *, [disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function vn(n){var t=Element.prototype.matches||Element.prototype.msMatchesSelector,e="input, select, button, textarea",r=t.call(n,e),o=t.call(n,fn),i=Ct(n),s=r&&!o&&i;return s}function U(n,t,e){e===void 0&&(e={});var r=e.skipAriaHidden;n.classList.toggle("ag-hidden",!t),r||Fo(n,!t)}function Ha(n,t,e){e===void 0&&(e={});var r=e.skipAriaHidden;n.classList.toggle("ag-invisible",!t),r||Fo(n,!t)}function vr(n,t){var e="disabled",r=t?function(o){return o.setAttribute(e,"")}:function(o){return o.removeAttribute(e)};r(n),Rn(n.querySelectorAll("input"),function(o){return r(o)})}function Xt(n,t,e){for(var r=0;n;){if(n.classList.contains(t))return!0;if(n=n.parentElement,typeof e=="number"){if(++r>e)break}else if(n===e)break}return!1}function bt(n){var t=window.getComputedStyle(n),e=t.height,r=t.width,o=t.borderTopWidth,i=t.borderRightWidth,s=t.borderBottomWidth,a=t.borderLeftWidth,l=t.paddingTop,u=t.paddingRight,c=t.paddingBottom,p=t.paddingLeft,d=t.marginTop,f=t.marginRight,g=t.marginBottom,y=t.marginLeft,m=t.boxSizing;return{height:parseFloat(e),width:parseFloat(r),borderTopWidth:parseFloat(o),borderRightWidth:parseFloat(i),borderBottomWidth:parseFloat(s),borderLeftWidth:parseFloat(a),paddingTop:parseFloat(l),paddingRight:parseFloat(u),paddingBottom:parseFloat(c),paddingLeft:parseFloat(p),marginTop:parseFloat(d),marginRight:parseFloat(f),marginBottom:parseFloat(g),marginLeft:parseFloat(y),boxSizing:m}}function Br(n){var t=bt(n);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function Vo(n){var t=bt(n);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function gn(n){var t=bt(n),e=t.marginBottom+t.marginTop;return Math.ceil(n.offsetHeight+e)}function Bo(n){var t=bt(n),e=t.marginLeft+t.marginRight;return Math.ceil(n.offsetWidth+e)}function yn(n){var t=n.getBoundingClientRect(),e=bt(n),r=e.borderTopWidth,o=e.borderLeftWidth,i=e.borderRightWidth,s=e.borderBottomWidth;return{top:t.top+(r||0),left:t.left+(o||0),right:t.right+(i||0),bottom:t.bottom+(s||0)}}function Wr(){if(typeof Ho=="boolean")return Ho;var n=document.createElement("div");return n.style.direction="rtl",n.style.width="1px",n.style.height="1px",n.style.position="fixed",n.style.top="0px",n.style.overflow="hidden",n.dir="rtl",n.innerHTML=`
-
`,document.body.appendChild(n),n.scrollLeft=1,Ho=Math.floor(n.scrollLeft)===0,document.body.removeChild(n),Ho}function jr(n,t){var e=n.scrollLeft;return t&&(e=Math.abs(e),Mo()&&!Wr()&&(e=n.scrollWidth-n.clientWidth-e)),e}function kr(n,t,e){e&&(Wr()?t*=-1:(He()||Mo())&&(t=n.scrollWidth-n.clientWidth-t)),n.scrollLeft=t}function Ae(n){for(;n&&n.firstChild;)n.removeChild(n.firstChild)}function np(n,t){yt(n.querySelector(t))}function yt(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function Ct(n){return n.offsetParent!==null}function pe(n){var t=document.createElement("div");return t.innerHTML=(n||"").trim(),t.firstChild}function sp(n,t){n.lastChild?n.insertAdjacentHTML("afterbegin",t):n.innerHTML=t}function ap(n,t){if(n.attributes&&n.attributes[t]){var e=n.attributes[t];return e.value}return null}function Cn(n){return n&&n.clientHeight?n.clientHeight:0}function mn(n){return n&&n.clientWidth?n.clientWidth:0}function wn(n,t,e){if(!(e&&e.nextSibling===t)){var r=document.activeElement,o=t.contains(r);e?e.nextSibling?n.insertBefore(t,e.nextSibling):n.appendChild(t):n.firstChild&&n.firstChild!==t&&n.insertAdjacentElement("afterbegin",t),o&&r&&Io()&&r.focus({preventScroll:!0})}}function Sn(n,t){for(var e=0;e-1||typeof o=="object"&&o["ag-icon"])return r}var i=document.createElement("span");return i.appendChild(r),i}function oe(n,t,e,r){var o=null,i=e&&e.getColDef().icons;if(i&&(o=i[n]),t&&!o){var s=t.get("icons");s&&(o=s[n])}if(o){var a=void 0;if(typeof o=="function")a=o();else if(typeof o=="string")a=o;else throw new Error("icon from grid options needs to be a string or a function");if(typeof a=="string")return pe(a);if(zr(a))return a;console.warn("AG Grid: iconRenderer should return back a string or a dom object")}else{var l=document.createElement("span"),u=Ua[n];return u||(r?u=n:(console.warn("AG Grid: Did not find icon "+n),u="")),l.setAttribute("class","ag-icon ag-icon-"+u),l.setAttribute("unselectable","on"),le(l,"presentation"),l}}var pp=Object.freeze({__proto__:null,iconNameClassMap:Ua,createIcon:We,createIconNoSpan:oe}),R=function(){function n(){}return n.BACKSPACE="Backspace",n.TAB="Tab",n.ENTER="Enter",n.ESCAPE="Escape",n.SPACE=" ",n.LEFT="ArrowLeft",n.UP="ArrowUp",n.RIGHT="ArrowRight",n.DOWN="ArrowDown",n.DELETE="Delete",n.F2="F2",n.PAGE_UP="PageUp",n.PAGE_DOWN="PageDown",n.PAGE_HOME="Home",n.PAGE_END="End",n.A="KeyA",n.C="KeyC",n.D="KeyD",n.V="KeyV",n.X="KeyX",n.Y="KeyY",n.Z="KeyZ",n}(),dp=65,hp=67,fp=86,vp=68,gp=90,yp=89;function On(n){if(n.altKey||n.ctrlKey||n.metaKey)return!1;var t=n.key.length===1;return t}function Wo(n,t,e,r,o){var i=r?r.getColDef().suppressKeyboardEvent:void 0;if(!i)return!1;var s={event:t,editing:o,column:r,api:n.api,node:e,data:e.data,colDef:r.getColDef(),context:n.context,columnApi:n.columnApi};if(i){var a=i(s);if(a)return!0}return!1}function za(n,t,e,r){var o=r.getDefinition(),i=o&&o.suppressHeaderKeyboardEvent;if(!O(i))return!1;var s={api:n.api,columnApi:n.columnApi,context:n.context,colDef:o,column:r,headerRowIndex:e,event:t};return!!i(s)}function $a(n){var t=n.keyCode,e;switch(t){case dp:e=R.A;break;case hp:e=R.C;break;case fp:e=R.V;break;case vp:e=R.D;break;case gp:e=R.Z;break;case yp:e=R.Y;break;default:e=n.code}return e}function Ka(n,t){return t===void 0&&(t=!1),n===R.DELETE?!0:!t&&n===R.BACKSPACE?cn():!1}var Cp=Object.freeze({__proto__:null,isEventFromPrintableCharacter:On,isUserSuppressingKeyboardEvent:Wo,isUserSuppressingHeaderKeyboardEvent:za,normaliseQwertyAzerty:$a,isDeleteKey:Ka});function Tn(n,t,e){if(e===0)return!1;var r=Math.abs(n.clientX-t.clientX),o=Math.abs(n.clientY-t.clientY);return Math.max(r,o)<=e}var mp=Object.freeze({__proto__:null,areEventsNear:Tn});function wp(n,t){if(!n)return!1;for(var e=function(a,l){var u=t[a.id],c=t[l.id],p=u!==void 0,d=c!==void 0,f=p&&d,g=!p&&!d;return f?u-c:g?a.__objectId-l.__objectId:p?1:-1},r,o,i=!1,s=0;s0){i=!0;break}return i?(n.sort(e),!0):!1}function Sp(n,t){var e=[];r(n);function r(o){o&&o.forEach(function(i){if(i.group||i.hasChildren()){e.push(i.key);var s=e.join("|");t(i,s),r(i.childrenAfterGroup),e.pop()}})}}var Ep=Object.freeze({__proto__:null,sortRowNodesByOrder:wp,traverseNodesWithKey:Sp});function Pn(n){var t=new Set;return n.forEach(function(e){return t.add(e)}),t}var _p=Object.freeze({__proto__:null,convertToSet:Pn}),ie=function(){return ie=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Qe;(function(n){n[n.NOTHING=0]="NOTHING",n[n.WAITING_TO_SHOW=1]="WAITING_TO_SHOW",n[n.SHOWING=2]="SHOWING"})(Qe||(Qe={}));var bn=function(n){Op(t,n);function t(e){var r=n.call(this)||this;return r.DEFAULT_SHOW_TOOLTIP_DELAY=2e3,r.DEFAULT_HIDE_TOOLTIP_DELAY=1e4,r.SHOW_QUICK_TOOLTIP_DIFF=1e3,r.FADE_OUT_TOOLTIP_TIMEOUT=1e3,r.state=Qe.NOTHING,r.tooltipInstanceCount=0,r.tooltipMouseTrack=!1,r.parentComp=e,r}return t.prototype.postConstruct=function(){this.tooltipShowDelay=this.getTooltipDelay("show")||this.DEFAULT_SHOW_TOOLTIP_DELAY,this.tooltipHideDelay=this.getTooltipDelay("hide")||this.DEFAULT_HIDE_TOOLTIP_DELAY,this.tooltipMouseTrack=this.gridOptionsService.is("tooltipMouseTrack");var e=this.parentComp.getGui();this.addManagedListener(e,"mouseenter",this.onMouseEnter.bind(this)),this.addManagedListener(e,"mouseleave",this.onMouseLeave.bind(this)),this.addManagedListener(e,"mousemove",this.onMouseMove.bind(this)),this.addManagedListener(e,"mousedown",this.onMouseDown.bind(this)),this.addManagedListener(e,"keydown",this.onKeyDown.bind(this))},t.prototype.destroy=function(){this.setToDoNothing(),n.prototype.destroy.call(this)},t.prototype.onMouseEnter=function(e){if(!At()&&this.state==Qe.NOTHING){var r=this.isLastTooltipHiddenRecently()?200:this.tooltipShowDelay;this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),r),this.lastMouseEvent=e,this.state=Qe.WAITING_TO_SHOW}},t.prototype.onMouseLeave=function(){this.setToDoNothing()},t.prototype.onKeyDown=function(){this.setToDoNothing()},t.prototype.setToDoNothing=function(){this.state===Qe.SHOWING&&this.hideTooltip(),this.clearTimeouts(),this.state=Qe.NOTHING},t.prototype.onMouseMove=function(e){this.lastMouseEvent=e,this.tooltipMouseTrack&&this.state===Qe.SHOWING&&this.tooltipComp&&this.positionTooltipUnderLastMouseEvent()},t.prototype.onMouseDown=function(){this.setToDoNothing()},t.prototype.getTooltipDelay=function(e){var r=this.gridOptionsService.getNum("tooltipShowDelay"),o=this.gridOptionsService.getNum("tooltipHideDelay"),i=e==="show"?r:o,s=ua(e);return O(i)?(i<0&&z(function(){return console.warn("AG Grid: tooltip"+s+"Delay should not be lower than 0")},"tooltip"+s+"DelayWarn"),Math.max(200,i)):null},t.prototype.hideTooltip=function(){this.tooltipComp&&(this.destroyTooltipComp(),t.lastTooltipHideTime=new Date().getTime()),this.state=Qe.NOTHING},t.prototype.destroyTooltipComp=function(){var e=this;this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");var r=this.tooltipPopupDestroyFunc,o=this.tooltipComp;window.setTimeout(function(){r(),e.getContext().destroyBean(o)},this.FADE_OUT_TOOLTIP_TIMEOUT),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0},t.prototype.isLastTooltipHiddenRecently=function(){var e=new Date().getTime(),r=t.lastTooltipHideTime;return e-r1){r.forEach(function(s){return e.addCssClass(s)});return}var o=this.cssClassStates[t]!==!0;if(o&&t.length){var i=this.getGui();i&&i.classList.add(t),this.cssClassStates[t]=!0}},n.prototype.removeCssClass=function(t){var e=this,r=(t||"").split(" ");if(r.length>1){r.forEach(function(s){return e.removeCssClass(s)});return}var o=this.cssClassStates[t]!==!1;if(o&&t.length){var i=this.getGui();i&&i.classList.remove(t),this.cssClassStates[t]=!1}},n.prototype.containsCssClass=function(t){var e=this.getGui();return e?e.classList.contains(t):!1},n.prototype.addOrRemoveCssClass=function(t,e){var r=this;if(t){if(t.indexOf(" ")>=0){var o=(t||"").split(" ");if(o.length>1){o.forEach(function(a){return r.addOrRemoveCssClass(a,e)});return}}var i=this.cssClassStates[t]!==e;if(i&&t.length){var s=this.getGui();s&&s.classList.toggle(t,e),this.cssClassStates[t]=e}}},n}(),Pp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Fn=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Dp=new gr,W=function(n){Pp(t,n);function t(e){var r=n.call(this)||this;return r.displayed=!0,r.visible=!0,r.compId=Dp.next(),r.cssClassManager=new Tp(function(){return r.eGui}),e&&r.setTemplate(e),r}return t.prototype.preConstructOnComponent=function(){this.usingBrowserTooltips=this.gridOptionsService.is("enableBrowserTooltips")},t.prototype.getCompId=function(){return this.compId},t.prototype.getTooltipParams=function(){return{value:this.tooltipText,location:"UNKNOWN"}},t.prototype.setTooltip=function(e){var r=this,o=function(){r.usingBrowserTooltips?r.getGui().removeAttribute("title"):r.tooltipFeature=r.destroyBean(r.tooltipFeature)},i=function(){r.usingBrowserTooltips?r.getGui().setAttribute("title",r.tooltipText):r.tooltipFeature=r.createBean(new bn(r))};this.tooltipText!=e&&(this.tooltipText&&o(),e!=null&&(this.tooltipText=e,this.tooltipText&&i()))},t.prototype.createChildComponentsFromTags=function(e,r){var o=this,i=ja(e.childNodes);i.forEach(function(s){if(s instanceof HTMLElement){var a=o.createComponentFromElement(s,function(u){var c=u.getGui();c&&o.copyAttributesFromNode(s,u.getGui())},r);if(a){if(a.addItems&&s.children.length){o.createChildComponentsFromTags(s,r);var l=Array.prototype.slice.call(s.children);a.addItems(l)}o.swapComponentForNode(a,e,s)}else s.childNodes&&o.createChildComponentsFromTags(s,r)}})},t.prototype.createComponentFromElement=function(e,r,o){var i=e.nodeName,s=o?o[e.getAttribute("ref")]:void 0,a=this.agStackComponentsRegistry.getComponentClass(i);if(a){t.elementGettingCreated=e;var l=new a(s);return l.setParentComponent(this),this.createBean(l,null,r),l}return null},t.prototype.copyAttributesFromNode=function(e,r){ka(e.attributes,function(o,i){return r.setAttribute(o,i)})},t.prototype.swapComponentForNode=function(e,r,o){var i=e.getGui();r.replaceChild(i,o),r.insertBefore(document.createComment(o.nodeName),i),this.addDestroyFunc(this.destroyBean.bind(this,e)),this.swapInComponentForQuerySelectors(e,o)},t.prototype.swapInComponentForQuerySelectors=function(e,r){var o=this;this.iterateOverQuerySelectors(function(i){o[i.attributeName]===r&&(o[i.attributeName]=e)})},t.prototype.iterateOverQuerySelectors=function(e){for(var r=Object.getPrototypeOf(this);r!=null;){var o=r.__agComponentMetaData,i=So(r.constructor);o&&o[i]&&o[i].querySelectors&&o[i].querySelectors.forEach(function(s){return e(s)}),r=Object.getPrototypeOf(r)}},t.prototype.activateTabIndex=function(e){var r=this.gridOptionsService.getNum("tabIndex")||0;e||(e=[]),e.length||e.push(this.getGui()),e.forEach(function(o){return o.setAttribute("tabindex",r.toString())})},t.prototype.setTemplate=function(e,r){var o=pe(e);this.setTemplateFromElement(o,r)},t.prototype.setTemplateFromElement=function(e,r){this.eGui=e,this.eGui.__agComponent=this,this.wireQuerySelectors(),this.getContext()&&this.createChildComponentsFromTags(this.getGui(),r)},t.prototype.createChildComponentsPreConstruct=function(){this.getGui()&&this.createChildComponentsFromTags(this.getGui())},t.prototype.wireQuerySelectors=function(){var e=this;if(this.eGui){var r=this;this.iterateOverQuerySelectors(function(o){var i=function(l){return r[o.attributeName]=l},s=o.refSelector&&e.getAttribute("ref")===o.refSelector;if(s)i(e.eGui);else{var a=e.eGui.querySelector(o.querySelector);a&&i(a.__agComponent||a)}})}},t.prototype.getGui=function(){return this.eGui},t.prototype.getFocusableElement=function(){return this.eGui},t.prototype.setParentComponent=function(e){this.parentComponent=e},t.prototype.getParentComponent=function(){return this.parentComponent},t.prototype.setGui=function(e){this.eGui=e},t.prototype.queryForHtmlElement=function(e){return this.eGui.querySelector(e)},t.prototype.queryForHtmlInputElement=function(e){return this.eGui.querySelector(e)},t.prototype.appendChild=function(e,r){if(e!=null)if(r||(r=this.eGui),zr(e))r.appendChild(e);else{var o=e;r.appendChild(o.getGui())}},t.prototype.isDisplayed=function(){return this.displayed},t.prototype.setVisible=function(e,r){if(r===void 0&&(r={}),e!==this.visible){this.visible=e;var o=r.skipAriaHidden;Ha(this.eGui,e,{skipAriaHidden:o})}},t.prototype.setDisplayed=function(e,r){if(r===void 0&&(r={}),e!==this.displayed){this.displayed=e;var o=r.skipAriaHidden;U(this.eGui,e,{skipAriaHidden:o});var i={type:t.EVENT_DISPLAYED_CHANGED,visible:this.displayed};this.dispatchEvent(i)}},t.prototype.destroy=function(){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.parentComponent&&(this.parentComponent=void 0);var e=this.eGui;e&&e.__agComponent&&(e.__agComponent=void 0),n.prototype.destroy.call(this)},t.prototype.addGuiEventListener=function(e,r,o){var i=this;this.eGui.addEventListener(e,r,o),this.addDestroyFunc(function(){return i.eGui.removeEventListener(e,r)})},t.prototype.addCssClass=function(e){this.cssClassManager.addCssClass(e)},t.prototype.removeCssClass=function(e){this.cssClassManager.removeCssClass(e)},t.prototype.containsCssClass=function(e){return this.cssClassManager.containsCssClass(e)},t.prototype.addOrRemoveCssClass=function(e,r){this.cssClassManager.addOrRemoveCssClass(e,r)},t.prototype.getAttribute=function(e){var r=this.eGui;return r?r.getAttribute(e):null},t.prototype.getRefElement=function(e){return this.queryForHtmlElement('[ref="'+e+'"]')},t.EVENT_DISPLAYED_CHANGED="displayedChanged",Fn([h("agStackComponentsRegistry")],t.prototype,"agStackComponentsRegistry",void 0),Fn([qs],t.prototype,"preConstructOnComponent",null),Fn([qs],t.prototype,"createChildComponentsPreConstruct",null),t}(T);function D(n){return Ap.bind(this,"[ref="+n+"]",n)}function Ap(n,t,e,r,o){if(n===null){console.error("AG Grid: QuerySelector selector should not be null");return}if(typeof o=="number"){console.error("AG Grid: QuerySelector should be on an attribute");return}bp(e,"querySelectors",{attributeName:r,querySelector:n,refSelector:t})}function bp(n,t,e){var r=Fp(n,So(n.constructor));r[t]||(r[t]=[]),r[t].push(e)}function Fp(n,t){return n.__agComponentMetaData||(n.__agComponentMetaData={}),n.__agComponentMetaData[t]||(n.__agComponentMetaData[t]={}),n.__agComponentMetaData[t]}var xp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ya=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Lp=function(n){xp(t,n);function t(){return n.call(this,` +
`,document.body.appendChild(n),n.scrollLeft=1,Ho=Math.floor(n.scrollLeft)===0,document.body.removeChild(n),Ho}function jr(n,t){var e=n.scrollLeft;return t&&(e=Math.abs(e),Io()&&!Wr()&&(e=n.scrollWidth-n.clientWidth-e)),e}function kr(n,t,e){e&&(Wr()?t*=-1:(He()||Io())&&(t=n.scrollWidth-n.clientWidth-t)),n.scrollLeft=t}function Ae(n){for(;n&&n.firstChild;)n.removeChild(n.firstChild)}function np(n,t){yt(n.querySelector(t))}function yt(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function Ct(n){return n.offsetParent!==null}function pe(n){var t=document.createElement("div");return t.innerHTML=(n||"").trim(),t.firstChild}function sp(n,t){n.lastChild?n.insertAdjacentHTML("afterbegin",t):n.innerHTML=t}function ap(n,t){if(n.attributes&&n.attributes[t]){var e=n.attributes[t];return e.value}return null}function Cn(n){return n&&n.clientHeight?n.clientHeight:0}function mn(n){return n&&n.clientWidth?n.clientWidth:0}function wn(n,t,e){if(!(e&&e.nextSibling===t)){var r=document.activeElement,o=t.contains(r);e?e.nextSibling?n.insertBefore(t,e.nextSibling):n.appendChild(t):n.firstChild&&n.firstChild!==t&&n.insertAdjacentElement("afterbegin",t),o&&r&&Mo()&&r.focus({preventScroll:!0})}}function Sn(n,t){for(var e=0;e-1||typeof o=="object"&&o["ag-icon"])return r}var i=document.createElement("span");return i.appendChild(r),i}function oe(n,t,e,r){var o=null,i=e&&e.getColDef().icons;if(i&&(o=i[n]),t&&!o){var s=t.get("icons");s&&(o=s[n])}if(o){var a=void 0;if(typeof o=="function")a=o();else if(typeof o=="string")a=o;else throw new Error("icon from grid options needs to be a string or a function");if(typeof a=="string")return pe(a);if(zr(a))return a;console.warn("AG Grid: iconRenderer should return back a string or a dom object")}else{var l=document.createElement("span"),u=Ua[n];return u||(r?u=n:(console.warn("AG Grid: Did not find icon "+n),u="")),l.setAttribute("class","ag-icon ag-icon-"+u),l.setAttribute("unselectable","on"),le(l,"presentation"),l}}var pp=Object.freeze({__proto__:null,iconNameClassMap:Ua,createIcon:We,createIconNoSpan:oe}),R=function(){function n(){}return n.BACKSPACE="Backspace",n.TAB="Tab",n.ENTER="Enter",n.ESCAPE="Escape",n.SPACE=" ",n.LEFT="ArrowLeft",n.UP="ArrowUp",n.RIGHT="ArrowRight",n.DOWN="ArrowDown",n.DELETE="Delete",n.F2="F2",n.PAGE_UP="PageUp",n.PAGE_DOWN="PageDown",n.PAGE_HOME="Home",n.PAGE_END="End",n.A="KeyA",n.C="KeyC",n.D="KeyD",n.V="KeyV",n.X="KeyX",n.Y="KeyY",n.Z="KeyZ",n}(),dp=65,hp=67,fp=86,vp=68,gp=90,yp=89;function On(n){if(n.altKey||n.ctrlKey||n.metaKey)return!1;var t=n.key.length===1;return t}function Wo(n,t,e,r,o){var i=r?r.getColDef().suppressKeyboardEvent:void 0;if(!i)return!1;var s={event:t,editing:o,column:r,api:n.api,node:e,data:e.data,colDef:r.getColDef(),context:n.context,columnApi:n.columnApi};if(i){var a=i(s);if(a)return!0}return!1}function za(n,t,e,r){var o=r.getDefinition(),i=o&&o.suppressHeaderKeyboardEvent;if(!O(i))return!1;var s={api:n.api,columnApi:n.columnApi,context:n.context,colDef:o,column:r,headerRowIndex:e,event:t};return!!i(s)}function $a(n){var t=n.keyCode,e;switch(t){case dp:e=R.A;break;case hp:e=R.C;break;case fp:e=R.V;break;case vp:e=R.D;break;case gp:e=R.Z;break;case yp:e=R.Y;break;default:e=n.code}return e}function Ka(n,t){return t===void 0&&(t=!1),n===R.DELETE?!0:!t&&n===R.BACKSPACE?cn():!1}var Cp=Object.freeze({__proto__:null,isEventFromPrintableCharacter:On,isUserSuppressingKeyboardEvent:Wo,isUserSuppressingHeaderKeyboardEvent:za,normaliseQwertyAzerty:$a,isDeleteKey:Ka});function Tn(n,t,e){if(e===0)return!1;var r=Math.abs(n.clientX-t.clientX),o=Math.abs(n.clientY-t.clientY);return Math.max(r,o)<=e}var mp=Object.freeze({__proto__:null,areEventsNear:Tn});function wp(n,t){if(!n)return!1;for(var e=function(a,l){var u=t[a.id],c=t[l.id],p=u!==void 0,d=c!==void 0,f=p&&d,g=!p&&!d;return f?u-c:g?a.__objectId-l.__objectId:p?1:-1},r,o,i=!1,s=0;s0){i=!0;break}return i?(n.sort(e),!0):!1}function Sp(n,t){var e=[];r(n);function r(o){o&&o.forEach(function(i){if(i.group||i.hasChildren()){e.push(i.key);var s=e.join("|");t(i,s),r(i.childrenAfterGroup),e.pop()}})}}var Ep=Object.freeze({__proto__:null,sortRowNodesByOrder:wp,traverseNodesWithKey:Sp});function Pn(n){var t=new Set;return n.forEach(function(e){return t.add(e)}),t}var _p=Object.freeze({__proto__:null,convertToSet:Pn}),ie=function(){return ie=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Qe;(function(n){n[n.NOTHING=0]="NOTHING",n[n.WAITING_TO_SHOW=1]="WAITING_TO_SHOW",n[n.SHOWING=2]="SHOWING"})(Qe||(Qe={}));var bn=function(n){Op(t,n);function t(e){var r=n.call(this)||this;return r.DEFAULT_SHOW_TOOLTIP_DELAY=2e3,r.DEFAULT_HIDE_TOOLTIP_DELAY=1e4,r.SHOW_QUICK_TOOLTIP_DIFF=1e3,r.FADE_OUT_TOOLTIP_TIMEOUT=1e3,r.state=Qe.NOTHING,r.tooltipInstanceCount=0,r.tooltipMouseTrack=!1,r.parentComp=e,r}return t.prototype.postConstruct=function(){this.tooltipShowDelay=this.getTooltipDelay("show")||this.DEFAULT_SHOW_TOOLTIP_DELAY,this.tooltipHideDelay=this.getTooltipDelay("hide")||this.DEFAULT_HIDE_TOOLTIP_DELAY,this.tooltipMouseTrack=this.gridOptionsService.is("tooltipMouseTrack");var e=this.parentComp.getGui();this.addManagedListener(e,"mouseenter",this.onMouseEnter.bind(this)),this.addManagedListener(e,"mouseleave",this.onMouseLeave.bind(this)),this.addManagedListener(e,"mousemove",this.onMouseMove.bind(this)),this.addManagedListener(e,"mousedown",this.onMouseDown.bind(this)),this.addManagedListener(e,"keydown",this.onKeyDown.bind(this))},t.prototype.destroy=function(){this.setToDoNothing(),n.prototype.destroy.call(this)},t.prototype.onMouseEnter=function(e){if(!At()&&this.state==Qe.NOTHING){var r=this.isLastTooltipHiddenRecently()?200:this.tooltipShowDelay;this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),r),this.lastMouseEvent=e,this.state=Qe.WAITING_TO_SHOW}},t.prototype.onMouseLeave=function(){this.setToDoNothing()},t.prototype.onKeyDown=function(){this.setToDoNothing()},t.prototype.setToDoNothing=function(){this.state===Qe.SHOWING&&this.hideTooltip(),this.clearTimeouts(),this.state=Qe.NOTHING},t.prototype.onMouseMove=function(e){this.lastMouseEvent=e,this.tooltipMouseTrack&&this.state===Qe.SHOWING&&this.tooltipComp&&this.positionTooltipUnderLastMouseEvent()},t.prototype.onMouseDown=function(){this.setToDoNothing()},t.prototype.getTooltipDelay=function(e){var r=this.gridOptionsService.getNum("tooltipShowDelay"),o=this.gridOptionsService.getNum("tooltipHideDelay"),i=e==="show"?r:o,s=ua(e);return O(i)?(i<0&&z(function(){return console.warn("AG Grid: tooltip"+s+"Delay should not be lower than 0")},"tooltip"+s+"DelayWarn"),Math.max(200,i)):null},t.prototype.hideTooltip=function(){this.tooltipComp&&(this.destroyTooltipComp(),t.lastTooltipHideTime=new Date().getTime()),this.state=Qe.NOTHING},t.prototype.destroyTooltipComp=function(){var e=this;this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");var r=this.tooltipPopupDestroyFunc,o=this.tooltipComp;window.setTimeout(function(){r(),e.getContext().destroyBean(o)},this.FADE_OUT_TOOLTIP_TIMEOUT),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0},t.prototype.isLastTooltipHiddenRecently=function(){var e=new Date().getTime(),r=t.lastTooltipHideTime;return e-r1){r.forEach(function(s){return e.addCssClass(s)});return}var o=this.cssClassStates[t]!==!0;if(o&&t.length){var i=this.getGui();i&&i.classList.add(t),this.cssClassStates[t]=!0}},n.prototype.removeCssClass=function(t){var e=this,r=(t||"").split(" ");if(r.length>1){r.forEach(function(s){return e.removeCssClass(s)});return}var o=this.cssClassStates[t]!==!1;if(o&&t.length){var i=this.getGui();i&&i.classList.remove(t),this.cssClassStates[t]=!1}},n.prototype.containsCssClass=function(t){var e=this.getGui();return e?e.classList.contains(t):!1},n.prototype.addOrRemoveCssClass=function(t,e){var r=this;if(t){if(t.indexOf(" ")>=0){var o=(t||"").split(" ");if(o.length>1){o.forEach(function(a){return r.addOrRemoveCssClass(a,e)});return}}var i=this.cssClassStates[t]!==e;if(i&&t.length){var s=this.getGui();s&&s.classList.toggle(t,e),this.cssClassStates[t]=e}}},n}(),Pp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Fn=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Dp=new gr,W=function(n){Pp(t,n);function t(e){var r=n.call(this)||this;return r.displayed=!0,r.visible=!0,r.compId=Dp.next(),r.cssClassManager=new Tp(function(){return r.eGui}),e&&r.setTemplate(e),r}return t.prototype.preConstructOnComponent=function(){this.usingBrowserTooltips=this.gridOptionsService.is("enableBrowserTooltips")},t.prototype.getCompId=function(){return this.compId},t.prototype.getTooltipParams=function(){return{value:this.tooltipText,location:"UNKNOWN"}},t.prototype.setTooltip=function(e){var r=this,o=function(){r.usingBrowserTooltips?r.getGui().removeAttribute("title"):r.tooltipFeature=r.destroyBean(r.tooltipFeature)},i=function(){r.usingBrowserTooltips?r.getGui().setAttribute("title",r.tooltipText):r.tooltipFeature=r.createBean(new bn(r))};this.tooltipText!=e&&(this.tooltipText&&o(),e!=null&&(this.tooltipText=e,this.tooltipText&&i()))},t.prototype.createChildComponentsFromTags=function(e,r){var o=this,i=ja(e.childNodes);i.forEach(function(s){if(s instanceof HTMLElement){var a=o.createComponentFromElement(s,function(u){var c=u.getGui();c&&o.copyAttributesFromNode(s,u.getGui())},r);if(a){if(a.addItems&&s.children.length){o.createChildComponentsFromTags(s,r);var l=Array.prototype.slice.call(s.children);a.addItems(l)}o.swapComponentForNode(a,e,s)}else s.childNodes&&o.createChildComponentsFromTags(s,r)}})},t.prototype.createComponentFromElement=function(e,r,o){var i=e.nodeName,s=o?o[e.getAttribute("ref")]:void 0,a=this.agStackComponentsRegistry.getComponentClass(i);if(a){t.elementGettingCreated=e;var l=new a(s);return l.setParentComponent(this),this.createBean(l,null,r),l}return null},t.prototype.copyAttributesFromNode=function(e,r){ka(e.attributes,function(o,i){return r.setAttribute(o,i)})},t.prototype.swapComponentForNode=function(e,r,o){var i=e.getGui();r.replaceChild(i,o),r.insertBefore(document.createComment(o.nodeName),i),this.addDestroyFunc(this.destroyBean.bind(this,e)),this.swapInComponentForQuerySelectors(e,o)},t.prototype.swapInComponentForQuerySelectors=function(e,r){var o=this;this.iterateOverQuerySelectors(function(i){o[i.attributeName]===r&&(o[i.attributeName]=e)})},t.prototype.iterateOverQuerySelectors=function(e){for(var r=Object.getPrototypeOf(this);r!=null;){var o=r.__agComponentMetaData,i=So(r.constructor);o&&o[i]&&o[i].querySelectors&&o[i].querySelectors.forEach(function(s){return e(s)}),r=Object.getPrototypeOf(r)}},t.prototype.activateTabIndex=function(e){var r=this.gridOptionsService.getNum("tabIndex")||0;e||(e=[]),e.length||e.push(this.getGui()),e.forEach(function(o){return o.setAttribute("tabindex",r.toString())})},t.prototype.setTemplate=function(e,r){var o=pe(e);this.setTemplateFromElement(o,r)},t.prototype.setTemplateFromElement=function(e,r){this.eGui=e,this.eGui.__agComponent=this,this.wireQuerySelectors(),this.getContext()&&this.createChildComponentsFromTags(this.getGui(),r)},t.prototype.createChildComponentsPreConstruct=function(){this.getGui()&&this.createChildComponentsFromTags(this.getGui())},t.prototype.wireQuerySelectors=function(){var e=this;if(this.eGui){var r=this;this.iterateOverQuerySelectors(function(o){var i=function(l){return r[o.attributeName]=l},s=o.refSelector&&e.getAttribute("ref")===o.refSelector;if(s)i(e.eGui);else{var a=e.eGui.querySelector(o.querySelector);a&&i(a.__agComponent||a)}})}},t.prototype.getGui=function(){return this.eGui},t.prototype.getFocusableElement=function(){return this.eGui},t.prototype.setParentComponent=function(e){this.parentComponent=e},t.prototype.getParentComponent=function(){return this.parentComponent},t.prototype.setGui=function(e){this.eGui=e},t.prototype.queryForHtmlElement=function(e){return this.eGui.querySelector(e)},t.prototype.queryForHtmlInputElement=function(e){return this.eGui.querySelector(e)},t.prototype.appendChild=function(e,r){if(e!=null)if(r||(r=this.eGui),zr(e))r.appendChild(e);else{var o=e;r.appendChild(o.getGui())}},t.prototype.isDisplayed=function(){return this.displayed},t.prototype.setVisible=function(e,r){if(r===void 0&&(r={}),e!==this.visible){this.visible=e;var o=r.skipAriaHidden;Ha(this.eGui,e,{skipAriaHidden:o})}},t.prototype.setDisplayed=function(e,r){if(r===void 0&&(r={}),e!==this.displayed){this.displayed=e;var o=r.skipAriaHidden;U(this.eGui,e,{skipAriaHidden:o});var i={type:t.EVENT_DISPLAYED_CHANGED,visible:this.displayed};this.dispatchEvent(i)}},t.prototype.destroy=function(){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.parentComponent&&(this.parentComponent=void 0);var e=this.eGui;e&&e.__agComponent&&(e.__agComponent=void 0),n.prototype.destroy.call(this)},t.prototype.addGuiEventListener=function(e,r,o){var i=this;this.eGui.addEventListener(e,r,o),this.addDestroyFunc(function(){return i.eGui.removeEventListener(e,r)})},t.prototype.addCssClass=function(e){this.cssClassManager.addCssClass(e)},t.prototype.removeCssClass=function(e){this.cssClassManager.removeCssClass(e)},t.prototype.containsCssClass=function(e){return this.cssClassManager.containsCssClass(e)},t.prototype.addOrRemoveCssClass=function(e,r){this.cssClassManager.addOrRemoveCssClass(e,r)},t.prototype.getAttribute=function(e){var r=this.eGui;return r?r.getAttribute(e):null},t.prototype.getRefElement=function(e){return this.queryForHtmlElement('[ref="'+e+'"]')},t.EVENT_DISPLAYED_CHANGED="displayedChanged",Fn([h("agStackComponentsRegistry")],t.prototype,"agStackComponentsRegistry",void 0),Fn([qs],t.prototype,"preConstructOnComponent",null),Fn([qs],t.prototype,"createChildComponentsPreConstruct",null),t}(T);function D(n){return Ap.bind(this,"[ref="+n+"]",n)}function Ap(n,t,e,r,o){if(n===null){console.error("AG Grid: QuerySelector selector should not be null");return}if(typeof o=="number"){console.error("AG Grid: QuerySelector should be on an attribute");return}bp(e,"querySelectors",{attributeName:r,querySelector:n,refSelector:t})}function bp(n,t,e){var r=Fp(n,So(n.constructor));r[t]||(r[t]=[]),r[t].push(e)}function Fp(n,t){return n.__agComponentMetaData||(n.__agComponentMetaData={}),n.__agComponentMetaData[t]||(n.__agComponentMetaData[t]={}),n.__agComponentMetaData[t]}var xp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ya=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Lp=function(n){xp(t,n);function t(){return n.call(this,` `)||this}return t.prototype.destroy=function(){n.prototype.destroy.call(this)},t.prototype.init=function(e){this.params=e;var r=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),o=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(r+" "+o("ariaFilterInput","Filter Input"))},t.prototype.onParentModelChanged=function(e){var r=this;if(!e){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(function(o){if(o.getModelAsString){var i=o.getModelAsString(e);r.eFloatingFilterText.setValue(i)}})},Ya([D("eFloatingFilterText")],t.prototype,"eFloatingFilterText",void 0),Ya([h("columnModel")],t.prototype,"columnModel",void 0),t}(W),qa=function(){function n(t,e,r,o){var i=this;this.alive=!0,this.context=t,this.eParent=o;var s=e.getDateCompDetails(r),a=s.newAgStackInstance();a.then(function(l){if(!i.alive){t.destroyBean(l);return}i.dateComp=l,l&&(o.appendChild(l.getGui()),l.afterGuiAttached&&l.afterGuiAttached(),i.tempValue&&l.setDate(i.tempValue),i.disabled!=null&&i.setDateCompDisabled(i.disabled))})}return n.prototype.destroy=function(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)},n.prototype.getDate=function(){return this.dateComp?this.dateComp.getDate():this.tempValue},n.prototype.setDate=function(t){this.dateComp?this.dateComp.setDate(t):this.tempValue=t},n.prototype.setDisabled=function(t){this.dateComp?this.setDateCompDisabled(t):this.disabled=t},n.prototype.setDisplayed=function(t){U(this.eParent,t)},n.prototype.setInputPlaceholder=function(t){this.dateComp&&this.dateComp.setInputPlaceholder&&this.dateComp.setInputPlaceholder(t)},n.prototype.setInputAriaLabel=function(t){this.dateComp&&this.dateComp.setInputAriaLabel&&this.dateComp.setInputAriaLabel(t)},n.prototype.afterGuiAttached=function(t){this.dateComp&&typeof this.dateComp.afterGuiAttached=="function"&&this.dateComp.afterGuiAttached(t)},n.prototype.setDateCompDisabled=function(t){this.dateComp!=null&&this.dateComp.setDisabled!=null&&this.dateComp.setDisabled(t)},n}(),Qa=function(){function n(){this.customFilterOptions={}}return n.prototype.init=function(t,e){this.filterOptions=t.filterOptions||e,this.mapCustomOptions(),this.selectDefaultItem(t)},n.prototype.getFilterOptions=function(){return this.filterOptions},n.prototype.mapCustomOptions=function(){var t=this;this.filterOptions&&this.filterOptions.forEach(function(e){if(typeof e!="string"){var r=[["displayKey"],["displayName"],["predicate","test"]],o=function(i){return i.some(function(s){return e[s]!=null})?!0:(console.warn("AG Grid: ignoring FilterOptionDef as it doesn't contain one of '"+i+"'"),!1)};if(!r.every(o)){t.filterOptions=t.filterOptions.filter(function(i){return i===e})||[];return}t.customFilterOptions[e.displayKey]=e}})},n.prototype.selectDefaultItem=function(t){if(t.defaultOption)this.defaultOption=t.defaultOption;else if(this.filterOptions.length>=1){var e=this.filterOptions[0];typeof e=="string"?this.defaultOption=e:e.displayKey?this.defaultOption=e.displayKey:console.warn("AG Grid: invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'")}else console.warn("AG Grid: no filter options for filter")},n.prototype.getDefaultOption=function(){return this.defaultOption},n.prototype.getCustomOption=function(t){return this.customFilterOptions[t]},n}(),Xa={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:"Not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"In range",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equals",greaterThanOrEqual:"Greater than or equals",contains:"Contains",notContains:"Not contains",startsWith:"Starts with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"},Mp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),xn=function(){return xn=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},xt=function(n){Mp(t,n);function t(e,r){r===void 0&&(r={});var o=n.call(this)||this;return o.eFocusableElement=e,o.callbacks=r,o.callbacks=xn({shouldStopEventPropagation:function(){return!1},onTabKeyDown:function(i){if(!i.defaultPrevented){var s=o.focusService.findNextFocusableElement(o.eFocusableElement,!1,i.shiftKey);s&&(s.focus(),i.preventDefault())}}},r),o}return t.prototype.postConstruct=function(){this.eFocusableElement.classList.add(t.FOCUS_MANAGED_CLASS),this.addKeyDownListeners(this.eFocusableElement),this.callbacks.onFocusIn&&this.addManagedListener(this.eFocusableElement,"focusin",this.callbacks.onFocusIn),this.callbacks.onFocusOut&&this.addManagedListener(this.eFocusableElement,"focusout",this.callbacks.onFocusOut)},t.prototype.addKeyDownListeners=function(e){var r=this;this.addManagedListener(e,"keydown",function(o){if(!(o.defaultPrevented||ot(o))){if(r.callbacks.shouldStopEventPropagation(o)){ft(o);return}o.key===R.TAB?r.callbacks.onTabKeyDown(o):r.callbacks.handleKeyDown&&r.callbacks.handleKeyDown(o)}})},t.FOCUS_MANAGED_CLASS="ag-focus-managed",Ja([h("focusService")],t.prototype,"focusService",void 0),Ja([P],t.prototype,"postConstruct",null),t}(T),Ip=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ln=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Za="ag-resizer-wrapper",Np='
+
`)||this}return t.prototype.destroy=function(){n.prototype.destroy.call(this)},t.prototype.init=function(e){this.params=e;var r=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),o=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(r+" "+o("ariaFilterInput","Filter Input"))},t.prototype.onParentModelChanged=function(e){var r=this;if(!e){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(function(o){if(o.getModelAsString){var i=o.getModelAsString(e);r.eFloatingFilterText.setValue(i)}})},Ya([D("eFloatingFilterText")],t.prototype,"eFloatingFilterText",void 0),Ya([h("columnModel")],t.prototype,"columnModel",void 0),t}(W),qa=function(){function n(t,e,r,o){var i=this;this.alive=!0,this.context=t,this.eParent=o;var s=e.getDateCompDetails(r),a=s.newAgStackInstance();a.then(function(l){if(!i.alive){t.destroyBean(l);return}i.dateComp=l,l&&(o.appendChild(l.getGui()),l.afterGuiAttached&&l.afterGuiAttached(),i.tempValue&&l.setDate(i.tempValue),i.disabled!=null&&i.setDateCompDisabled(i.disabled))})}return n.prototype.destroy=function(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)},n.prototype.getDate=function(){return this.dateComp?this.dateComp.getDate():this.tempValue},n.prototype.setDate=function(t){this.dateComp?this.dateComp.setDate(t):this.tempValue=t},n.prototype.setDisabled=function(t){this.dateComp?this.setDateCompDisabled(t):this.disabled=t},n.prototype.setDisplayed=function(t){U(this.eParent,t)},n.prototype.setInputPlaceholder=function(t){this.dateComp&&this.dateComp.setInputPlaceholder&&this.dateComp.setInputPlaceholder(t)},n.prototype.setInputAriaLabel=function(t){this.dateComp&&this.dateComp.setInputAriaLabel&&this.dateComp.setInputAriaLabel(t)},n.prototype.afterGuiAttached=function(t){this.dateComp&&typeof this.dateComp.afterGuiAttached=="function"&&this.dateComp.afterGuiAttached(t)},n.prototype.setDateCompDisabled=function(t){this.dateComp!=null&&this.dateComp.setDisabled!=null&&this.dateComp.setDisabled(t)},n}(),Qa=function(){function n(){this.customFilterOptions={}}return n.prototype.init=function(t,e){this.filterOptions=t.filterOptions||e,this.mapCustomOptions(),this.selectDefaultItem(t)},n.prototype.getFilterOptions=function(){return this.filterOptions},n.prototype.mapCustomOptions=function(){var t=this;this.filterOptions&&this.filterOptions.forEach(function(e){if(typeof e!="string"){var r=[["displayKey"],["displayName"],["predicate","test"]],o=function(i){return i.some(function(s){return e[s]!=null})?!0:(console.warn("AG Grid: ignoring FilterOptionDef as it doesn't contain one of '"+i+"'"),!1)};if(!r.every(o)){t.filterOptions=t.filterOptions.filter(function(i){return i===e})||[];return}t.customFilterOptions[e.displayKey]=e}})},n.prototype.selectDefaultItem=function(t){if(t.defaultOption)this.defaultOption=t.defaultOption;else if(this.filterOptions.length>=1){var e=this.filterOptions[0];typeof e=="string"?this.defaultOption=e:e.displayKey?this.defaultOption=e.displayKey:console.warn("AG Grid: invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'")}else console.warn("AG Grid: no filter options for filter")},n.prototype.getDefaultOption=function(){return this.defaultOption},n.prototype.getCustomOption=function(t){return this.customFilterOptions[t]},n}(),Xa={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:"Not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"In range",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equals",greaterThanOrEqual:"Greater than or equals",contains:"Contains",notContains:"Not contains",startsWith:"Starts with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"},Ip=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),xn=function(){return xn=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},xt=function(n){Ip(t,n);function t(e,r){r===void 0&&(r={});var o=n.call(this)||this;return o.eFocusableElement=e,o.callbacks=r,o.callbacks=xn({shouldStopEventPropagation:function(){return!1},onTabKeyDown:function(i){if(!i.defaultPrevented){var s=o.focusService.findNextFocusableElement(o.eFocusableElement,!1,i.shiftKey);s&&(s.focus(),i.preventDefault())}}},r),o}return t.prototype.postConstruct=function(){this.eFocusableElement.classList.add(t.FOCUS_MANAGED_CLASS),this.addKeyDownListeners(this.eFocusableElement),this.callbacks.onFocusIn&&this.addManagedListener(this.eFocusableElement,"focusin",this.callbacks.onFocusIn),this.callbacks.onFocusOut&&this.addManagedListener(this.eFocusableElement,"focusout",this.callbacks.onFocusOut)},t.prototype.addKeyDownListeners=function(e){var r=this;this.addManagedListener(e,"keydown",function(o){if(!(o.defaultPrevented||ot(o))){if(r.callbacks.shouldStopEventPropagation(o)){ft(o);return}o.key===R.TAB?r.callbacks.onTabKeyDown(o):r.callbacks.handleKeyDown&&r.callbacks.handleKeyDown(o)}})},t.FOCUS_MANAGED_CLASS="ag-focus-managed",Ja([h("focusService")],t.prototype,"focusService",void 0),Ja([P],t.prototype,"postConstruct",null),t}(T),Mp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ln=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Za="ag-resizer-wrapper",Np='
@@ -35,7 +35,7 @@ For more info see: https://www.ag-grid.com/javascript-grid/packages/`;return z(f
-
`,el=function(n){Ip(t,n);function t(e,r){var o=n.call(this)||this;return o.element=e,o.dragStartPosition={x:0,y:0},o.position={x:0,y:0},o.lastSize={width:-1,height:-1},o.positioned=!1,o.resizersAdded=!1,o.resizeListeners=[],o.boundaryEl=null,o.isResizing=!1,o.isMoving=!1,o.resizable={},o.movable=!1,o.currentResizer=null,o.config=Object.assign({},{popup:!1},r),o}return t.prototype.center=function(){var e=this.offsetParent,r=e.clientHeight,o=e.clientWidth,i=o/2-this.getWidth()/2,s=r/2-this.getHeight()/2;this.offsetElement(i,s)},t.prototype.initialisePosition=function(){if(!this.positioned){var e=this.config,r=e.centered,o=e.forcePopupParentAsOffsetParent,i=e.minWidth,s=e.width,a=e.minHeight,l=e.height,u=e.x,c=e.y;this.offsetParent||this.setOffsetParent();var p=0,d=0,f=!!this.element.offsetParent;if(f){var g=this.findBoundaryElement(),y=window.getComputedStyle(g);if(y.minWidth!=null){var m=g.offsetWidth-this.element.offsetWidth;d=parseInt(y.minWidth,10)-m}if(y.minHeight!=null){var C=g.offsetHeight-this.element.offsetHeight;p=parseInt(y.minHeight,10)-C}}if(this.minHeight=a||p,this.minWidth=i||d,s&&this.setWidth(s),l&&this.setHeight(l),(!s||!l)&&this.refreshSize(),r)this.center();else if(u||c)this.offsetElement(u,c);else if(f&&o){var g=this.boundaryEl,w=!0;if(g||(g=this.findBoundaryElement(),w=!1),g){var S=parseFloat(g.style.top),E=parseFloat(g.style.left);w?this.offsetElement(isNaN(E)?0:E,isNaN(S)?0:S):this.setPosition(E,S)}}this.positioned=!!this.offsetParent}},t.prototype.isPositioned=function(){return this.positioned},t.prototype.getPosition=function(){return this.position},t.prototype.setMovable=function(e,r){if(!(!this.config.popup||e===this.movable)){this.movable=e;var o=this.moveElementDragListener||{eElement:r,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragService.addDragSource(o),this.moveElementDragListener=o):(this.dragService.removeDragSource(o),this.moveElementDragListener=void 0)}},t.prototype.setResizable=function(e){var r=this;if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e=="boolean"){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(function(o){var i=e,s=!!i[o],a=r.getResizerElement(o),l={dragStartPixels:0,eElement:a,onDragStart:function(u){return r.onResizeStart(u,o)},onDragging:r.onResize.bind(r),onDragStop:function(u){return r.onResizeEnd(u,o)}};(s||!r.isAlive()&&!s)&&(s?(r.dragService.addDragSource(l),r.resizeListeners.push(l),a.style.pointerEvents="all"):a.style.pointerEvents="none",r.resizable[o]=s)})},t.prototype.removeSizeFromEl=function(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")},t.prototype.restoreLastSize=function(){this.element.style.flex="0 0 auto";var e=this.lastSize,r=e.height,o=e.width;o!==-1&&(this.element.style.width=o+"px"),r!==-1&&(this.element.style.height=r+"px")},t.prototype.getHeight=function(){return this.element.offsetHeight},t.prototype.setHeight=function(e){var r=this.config.popup,o=this.element,i=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)Jt(o,e),e=gn(o),i=!0;else if(e=Math.max(this.minHeight,e),this.positioned){var s=this.getAvailableHeight();s&&e>s&&(e=s)}this.getHeight()!==e&&(i?(o.style.maxHeight="unset",o.style.minHeight="unset"):r?Jt(o,e):(o.style.height=e+"px",o.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:parseFloat(e)))},t.prototype.getAvailableHeight=function(){var e=this.config,r=e.popup,o=e.forcePopupParentAsOffsetParent;this.positioned||this.initialisePosition();var i=this.offsetParent.clientHeight;if(!i)return null;var s=this.element.getBoundingClientRect(),a=this.offsetParent.getBoundingClientRect(),l=r?this.position.y:s.top,u=r?0:a.top,c=0;if(o){var p=this.element.parentElement;if(p){var d=p.getBoundingClientRect().bottom;c=d-s.bottom}}var f=i+u-l-c;return f},t.prototype.getWidth=function(){return this.element.offsetWidth},t.prototype.setWidth=function(e){var r=this.element,o=this.config.popup,i=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)Be(r,e),e=Bo(r),i=!0;else if(this.positioned){e=Math.max(this.minWidth,e);var s=this.offsetParent.clientWidth,a=o?this.position.x:this.element.getBoundingClientRect().left;s&&e+a>s&&(e=s-a)}this.getWidth()!==e&&(i?(r.style.maxWidth="unset",r.style.minWidth="unset"):this.config.popup?Be(r,e):(r.style.width=e+"px",r.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:parseFloat(e)))},t.prototype.offsetElement=function(e,r){e===void 0&&(e=0),r===void 0&&(r=0);var o=this.config.forcePopupParentAsOffsetParent,i=o?this.boundaryEl:this.element;i&&(this.popupService.positionPopup({ePopup:i,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:function(){return{x:e,y:r}}}),this.setPosition(parseFloat(i.style.left),parseFloat(i.style.top)))},t.prototype.constrainSizeToAvailableHeight=function(e){var r=this;if(this.config.forcePopupParentAsOffsetParent){var o=function(){var i=r.getAvailableHeight();r.element.style.setProperty("max-height",i+"px")};e?this.resizeObserverSubscriber=this.resizeObserverService.observeResize(this.popupService.getPopupParent(),o):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}},t.prototype.setPosition=function(e,r){this.position.x=e,this.position.y=r},t.prototype.updateDragStartPosition=function(e,r){this.dragStartPosition={x:e,y:r}},t.prototype.calculateMouseMovement=function(e){var r=e.e,o=e.isLeft,i=e.isTop,s=e.anywhereWithin,a=e.topBuffer,l=r.clientX-this.dragStartPosition.x,u=r.clientY-this.dragStartPosition.y,c=this.shouldSkipX(r,!!o,!!s,l)?0:l,p=this.shouldSkipY(r,!!i,a,u)?0:u;return{movementX:c,movementY:p}},t.prototype.shouldSkipX=function(e,r,o,i){var s=this.element.getBoundingClientRect(),a=this.offsetParent.getBoundingClientRect(),l=this.boundaryEl.getBoundingClientRect(),u=this.config.popup?this.position.x:s.left,c=u<=0&&a.left>=e.clientX||a.right<=e.clientX&&a.right<=l.right;return c?!0:(r?c=i<0&&e.clientX>u+a.left||i>0&&e.clientXl.right||i>0&&e.clientXl.right||i>0&&e.clientX=e.clientY||a.bottom<=e.clientY&&a.bottom<=l.bottom;return c?!0:(r?c=i<0&&e.clientY>u+a.top+o||i>0&&e.clientYl.bottom||i>0&&e.clientYthis.element.parentElement.offsetHeight&&(V=!0),V||this.setHeight(I)}this.updateDragStartPosition(e.clientX,e.clientY),((o||i)&&w||S)&&this.offsetElement(m+w,C+S)}},t.prototype.onResizeEnd=function(e,r){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null;var o={type:"resize",api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi};this.element.classList.remove("ag-resizing"),this.resizerMap[r].element.classList.remove("ag-active"),this.dispatchEvent(o)},t.prototype.refreshSize=function(){var e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))},t.prototype.onMoveStart=function(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)},t.prototype.onMove=function(e){if(this.isMoving){var r=this.position,o=r.x,i=r.y,s;this.config.calculateTopBuffer&&(s=this.config.calculateTopBuffer());var a=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:s}),l=a.movementX,u=a.movementY;this.offsetElement(o+l,i+u),this.updateDragStartPosition(e.clientX,e.clientY)}},t.prototype.onMoveEnd=function(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")},t.prototype.setOffsetParent=function(){this.config.forcePopupParentAsOffsetParent?this.offsetParent=this.popupService.getPopupParent():this.offsetParent=this.element.offsetParent},t.prototype.findBoundaryElement=function(){for(var e=this.element;e;){if(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element},t.prototype.clearResizeListeners=function(){for(;this.resizeListeners.length;){var e=this.resizeListeners.pop();this.dragService.removeDragSource(e)}},t.prototype.destroy=function(){n.prototype.destroy.call(this),this.moveElementDragListener&&this.dragService.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()},Ln([h("popupService")],t.prototype,"popupService",void 0),Ln([h("resizeObserverService")],t.prototype,"resizeObserverService",void 0),Ln([h("dragService")],t.prototype,"dragService",void 0),t}(T),Gp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Mn=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},jo=function(n){Gp(t,n);function t(e){var r=n.call(this)||this;return r.filterNameKey=e,r.applyActive=!1,r.hidePopup=null,r.debouncePending=!1,r.appliedModel=null,r}return t.prototype.postConstruct=function(){this.resetTemplate(),this.createManagedBean(new xt(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new el(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)},t.prototype.handleKeyDown=function(e){},t.prototype.getFilterTitle=function(){return this.translate(this.filterNameKey)},t.prototype.isFilterActive=function(){return!!this.appliedModel},t.prototype.resetTemplate=function(e){var r=this.getGui();r&&r.removeEventListener("submit",this.onFormSubmit);var o=` + `,el=function(n){Mp(t,n);function t(e,r){var o=n.call(this)||this;return o.element=e,o.dragStartPosition={x:0,y:0},o.position={x:0,y:0},o.lastSize={width:-1,height:-1},o.positioned=!1,o.resizersAdded=!1,o.resizeListeners=[],o.boundaryEl=null,o.isResizing=!1,o.isMoving=!1,o.resizable={},o.movable=!1,o.currentResizer=null,o.config=Object.assign({},{popup:!1},r),o}return t.prototype.center=function(){var e=this.offsetParent,r=e.clientHeight,o=e.clientWidth,i=o/2-this.getWidth()/2,s=r/2-this.getHeight()/2;this.offsetElement(i,s)},t.prototype.initialisePosition=function(){if(!this.positioned){var e=this.config,r=e.centered,o=e.forcePopupParentAsOffsetParent,i=e.minWidth,s=e.width,a=e.minHeight,l=e.height,u=e.x,c=e.y;this.offsetParent||this.setOffsetParent();var p=0,d=0,f=!!this.element.offsetParent;if(f){var g=this.findBoundaryElement(),y=window.getComputedStyle(g);if(y.minWidth!=null){var m=g.offsetWidth-this.element.offsetWidth;d=parseInt(y.minWidth,10)-m}if(y.minHeight!=null){var C=g.offsetHeight-this.element.offsetHeight;p=parseInt(y.minHeight,10)-C}}if(this.minHeight=a||p,this.minWidth=i||d,s&&this.setWidth(s),l&&this.setHeight(l),(!s||!l)&&this.refreshSize(),r)this.center();else if(u||c)this.offsetElement(u,c);else if(f&&o){var g=this.boundaryEl,w=!0;if(g||(g=this.findBoundaryElement(),w=!1),g){var S=parseFloat(g.style.top),E=parseFloat(g.style.left);w?this.offsetElement(isNaN(E)?0:E,isNaN(S)?0:S):this.setPosition(E,S)}}this.positioned=!!this.offsetParent}},t.prototype.isPositioned=function(){return this.positioned},t.prototype.getPosition=function(){return this.position},t.prototype.setMovable=function(e,r){if(!(!this.config.popup||e===this.movable)){this.movable=e;var o=this.moveElementDragListener||{eElement:r,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragService.addDragSource(o),this.moveElementDragListener=o):(this.dragService.removeDragSource(o),this.moveElementDragListener=void 0)}},t.prototype.setResizable=function(e){var r=this;if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e=="boolean"){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(function(o){var i=e,s=!!i[o],a=r.getResizerElement(o),l={dragStartPixels:0,eElement:a,onDragStart:function(u){return r.onResizeStart(u,o)},onDragging:r.onResize.bind(r),onDragStop:function(u){return r.onResizeEnd(u,o)}};(s||!r.isAlive()&&!s)&&(s?(r.dragService.addDragSource(l),r.resizeListeners.push(l),a.style.pointerEvents="all"):a.style.pointerEvents="none",r.resizable[o]=s)})},t.prototype.removeSizeFromEl=function(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")},t.prototype.restoreLastSize=function(){this.element.style.flex="0 0 auto";var e=this.lastSize,r=e.height,o=e.width;o!==-1&&(this.element.style.width=o+"px"),r!==-1&&(this.element.style.height=r+"px")},t.prototype.getHeight=function(){return this.element.offsetHeight},t.prototype.setHeight=function(e){var r=this.config.popup,o=this.element,i=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)Jt(o,e),e=gn(o),i=!0;else if(e=Math.max(this.minHeight,e),this.positioned){var s=this.getAvailableHeight();s&&e>s&&(e=s)}this.getHeight()!==e&&(i?(o.style.maxHeight="unset",o.style.minHeight="unset"):r?Jt(o,e):(o.style.height=e+"px",o.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:parseFloat(e)))},t.prototype.getAvailableHeight=function(){var e=this.config,r=e.popup,o=e.forcePopupParentAsOffsetParent;this.positioned||this.initialisePosition();var i=this.offsetParent.clientHeight;if(!i)return null;var s=this.element.getBoundingClientRect(),a=this.offsetParent.getBoundingClientRect(),l=r?this.position.y:s.top,u=r?0:a.top,c=0;if(o){var p=this.element.parentElement;if(p){var d=p.getBoundingClientRect().bottom;c=d-s.bottom}}var f=i+u-l-c;return f},t.prototype.getWidth=function(){return this.element.offsetWidth},t.prototype.setWidth=function(e){var r=this.element,o=this.config.popup,i=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)Be(r,e),e=Bo(r),i=!0;else if(this.positioned){e=Math.max(this.minWidth,e);var s=this.offsetParent.clientWidth,a=o?this.position.x:this.element.getBoundingClientRect().left;s&&e+a>s&&(e=s-a)}this.getWidth()!==e&&(i?(r.style.maxWidth="unset",r.style.minWidth="unset"):this.config.popup?Be(r,e):(r.style.width=e+"px",r.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:parseFloat(e)))},t.prototype.offsetElement=function(e,r){e===void 0&&(e=0),r===void 0&&(r=0);var o=this.config.forcePopupParentAsOffsetParent,i=o?this.boundaryEl:this.element;i&&(this.popupService.positionPopup({ePopup:i,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:function(){return{x:e,y:r}}}),this.setPosition(parseFloat(i.style.left),parseFloat(i.style.top)))},t.prototype.constrainSizeToAvailableHeight=function(e){var r=this;if(this.config.forcePopupParentAsOffsetParent){var o=function(){var i=r.getAvailableHeight();r.element.style.setProperty("max-height",i+"px")};e?this.resizeObserverSubscriber=this.resizeObserverService.observeResize(this.popupService.getPopupParent(),o):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}},t.prototype.setPosition=function(e,r){this.position.x=e,this.position.y=r},t.prototype.updateDragStartPosition=function(e,r){this.dragStartPosition={x:e,y:r}},t.prototype.calculateMouseMovement=function(e){var r=e.e,o=e.isLeft,i=e.isTop,s=e.anywhereWithin,a=e.topBuffer,l=r.clientX-this.dragStartPosition.x,u=r.clientY-this.dragStartPosition.y,c=this.shouldSkipX(r,!!o,!!s,l)?0:l,p=this.shouldSkipY(r,!!i,a,u)?0:u;return{movementX:c,movementY:p}},t.prototype.shouldSkipX=function(e,r,o,i){var s=this.element.getBoundingClientRect(),a=this.offsetParent.getBoundingClientRect(),l=this.boundaryEl.getBoundingClientRect(),u=this.config.popup?this.position.x:s.left,c=u<=0&&a.left>=e.clientX||a.right<=e.clientX&&a.right<=l.right;return c?!0:(r?c=i<0&&e.clientX>u+a.left||i>0&&e.clientXl.right||i>0&&e.clientXl.right||i>0&&e.clientX=e.clientY||a.bottom<=e.clientY&&a.bottom<=l.bottom;return c?!0:(r?c=i<0&&e.clientY>u+a.top+o||i>0&&e.clientYl.bottom||i>0&&e.clientYthis.element.parentElement.offsetHeight&&(V=!0),V||this.setHeight(M)}this.updateDragStartPosition(e.clientX,e.clientY),((o||i)&&w||S)&&this.offsetElement(m+w,C+S)}},t.prototype.onResizeEnd=function(e,r){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null;var o={type:"resize",api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi};this.element.classList.remove("ag-resizing"),this.resizerMap[r].element.classList.remove("ag-active"),this.dispatchEvent(o)},t.prototype.refreshSize=function(){var e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))},t.prototype.onMoveStart=function(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)},t.prototype.onMove=function(e){if(this.isMoving){var r=this.position,o=r.x,i=r.y,s;this.config.calculateTopBuffer&&(s=this.config.calculateTopBuffer());var a=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:s}),l=a.movementX,u=a.movementY;this.offsetElement(o+l,i+u),this.updateDragStartPosition(e.clientX,e.clientY)}},t.prototype.onMoveEnd=function(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")},t.prototype.setOffsetParent=function(){this.config.forcePopupParentAsOffsetParent?this.offsetParent=this.popupService.getPopupParent():this.offsetParent=this.element.offsetParent},t.prototype.findBoundaryElement=function(){for(var e=this.element;e;){if(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element},t.prototype.clearResizeListeners=function(){for(;this.resizeListeners.length;){var e=this.resizeListeners.pop();this.dragService.removeDragSource(e)}},t.prototype.destroy=function(){n.prototype.destroy.call(this),this.moveElementDragListener&&this.dragService.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()},Ln([h("popupService")],t.prototype,"popupService",void 0),Ln([h("resizeObserverService")],t.prototype,"resizeObserverService",void 0),Ln([h("dragService")],t.prototype,"dragService",void 0),t}(T),Gp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),In=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},jo=function(n){Gp(t,n);function t(e){var r=n.call(this)||this;return r.filterNameKey=e,r.applyActive=!1,r.hidePopup=null,r.debouncePending=!1,r.appliedModel=null,r}return t.prototype.postConstruct=function(){this.resetTemplate(),this.createManagedBean(new xt(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new el(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)},t.prototype.handleKeyDown=function(e){},t.prototype.getFilterTitle=function(){return this.translate(this.filterNameKey)},t.prototype.isFilterActive=function(){return!!this.appliedModel},t.prototype.resetTemplate=function(e){var r=this.getGui();r&&r.removeEventListener("submit",this.onFormSubmit);var o=`
`+this.createBodyTemplate()+` @@ -45,7 +45,7 @@ For more info see: https://www.ag-grid.com/javascript-grid/packages/`;return z(f ref="`+s+`FilterButton" class="ag-button ag-standard-button ag-filter-apply-panel-button" >`+a+` - `);o.appendChild(c),e.addManagedListener(c,"click",l)};Pn(r).forEach(function(s){return i(s)}),this.getGui().appendChild(o)}},t.prototype.getDefaultDebounceMs=function(){return 0},t.prototype.setupOnBtApplyDebounce=function(){var e=this,r=t.getDebounceMs(this.providedFilterParams,this.getDefaultDebounceMs()),o=rt(this.checkApplyDebounce.bind(this),r);this.onBtApplyDebounce=function(){e.debouncePending=!0,o()}},t.prototype.checkApplyDebounce=function(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())},t.prototype.getModel=function(){return this.appliedModel?this.appliedModel:null},t.prototype.setModel=function(e){var r=this,o=e!=null?this.setModelIntoUi(e):this.resetUiToDefaults();return o.then(function(){r.updateUiVisibility(),r.applyModel("api")})},t.prototype.onBtCancel=function(e){var r=this;this.resetUiToActiveModel(this.getModel(),function(){r.handleCancelEnd(e)})},t.prototype.handleCancelEnd=function(e){this.providedFilterParams.closeOnApply&&this.close(e)},t.prototype.resetUiToActiveModel=function(e,r){var o=this,i=function(){o.onUiChanged(!1,"prevent"),r==null||r()};e!=null?this.setModelIntoUi(e).then(i):this.resetUiToDefaults().then(i)},t.prototype.onBtClear=function(){var e=this;this.resetUiToDefaults().then(function(){return e.onUiChanged()})},t.prototype.onBtReset=function(){this.onBtClear(),this.onBtApply()},t.prototype.applyModel=function(e){var r=this.getModelFromUi();if(!this.isModelValid(r))return!1;var o=this.appliedModel;return this.appliedModel=r,!this.areModelsEqual(o,r)},t.prototype.isModelValid=function(e){return!0},t.prototype.onFormSubmit=function(e){e.preventDefault()},t.prototype.onBtApply=function(e,r,o){e===void 0&&(e=!1),r===void 0&&(r=!1),o&&o.preventDefault(),this.applyModel(r?"rowDataUpdated":"ui")&&this.providedFilterParams.filterChangedCallback({afterFloatingFilter:e,afterDataChange:r});var i=this.providedFilterParams.closeOnApply;i&&this.applyActive&&!e&&!r&&this.close(o)},t.prototype.onNewRowsLoaded=function(){},t.prototype.close=function(e){if(this.hidePopup){var r=e,o=r&&r.key,i;(o==="Enter"||o==="Space")&&(i={keyboardEvent:r}),this.hidePopup(i),this.hidePopup=null}},t.prototype.onUiChanged=function(e,r){if(e===void 0&&(e=!1),this.updateUiVisibility(),this.providedFilterParams.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){var o=this.isModelValid(this.getModelFromUi());vr(this.getRefElement("applyFilterButton"),!o)}e&&!r||r==="immediately"?this.onBtApply(e):(!this.applyActive&&!r||r==="debounce")&&this.onBtApplyDebounce()},t.prototype.afterGuiAttached=function(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(e==null?void 0:e.container)},t.prototype.refreshFilterResizer=function(e){if(!(!this.positionableFeature||e==="toolPanel")){var r=e==="floatingFilter",o=this,i=o.positionableFeature,s=o.gridOptionsService;r?(i.restoreLastSize(),i.setResizable(s.is("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(this.positionableFeature.removeSizeFromEl(),this.positionableFeature.setResizable(!1)),this.positionableFeature.constrainSizeToAvailableHeight(!0)}},t.prototype.afterGuiDetached=function(){this.checkApplyDebounce(),this.positionableFeature&&this.positionableFeature.constrainSizeToAvailableHeight(!1)},t.getDebounceMs=function(e,r){return t.isUseApplyButton(e)?(e.debounceMs!=null&&console.warn("AG Grid: debounceMs is ignored when apply button is present"),0):e.debounceMs!=null?e.debounceMs:r},t.isUseApplyButton=function(e){return!!e.buttons&&e.buttons.indexOf("apply")>=0},t.prototype.destroy=function(){var e=this.getGui();e&&e.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),n.prototype.destroy.call(this)},t.prototype.translate=function(e){var r=this.localeService.getLocaleTextFunc();return r(e,Xa[e])},t.prototype.getCellValue=function(e){var r=this.providedFilterParams,o=r.api,i=r.colDef,s=r.column,a=r.columnApi,l=r.context;return this.providedFilterParams.valueGetter({api:o,colDef:i,column:s,columnApi:a,context:l,data:e.data,getValue:function(u){return e.data[u]},node:e})},t.prototype.getPositionableElement=function(){return this.eFilterBody},Mn([h("rowModel")],t.prototype,"rowModel",void 0),Mn([D("eFilterBody")],t.prototype,"eFilterBody",void 0),Mn([P],t.prototype,"postConstruct",null),t}(W),Hp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Vp=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},tl=function(n){Hp(t,n);function t(e,r){var o=n.call(this,r)||this;return o.labelSeparator="",o.labelAlignment="left",o.disabled=!1,o.label="",o.config=e||{},o}return t.prototype.postConstruct=function(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");var e=this.config,r=e.labelSeparator,o=e.label,i=e.labelWidth,s=e.labelAlignment;r!=null&&this.setLabelSeparator(r),o!=null&&this.setLabel(o),i!=null&&this.setLabelWidth(i),this.setLabelAlignment(s||this.labelAlignment),this.refreshLabel()},t.prototype.refreshLabel=function(){Ae(this.eLabel),typeof this.label=="string"?this.eLabel.innerText=this.label+this.labelSeparator:this.label&&this.eLabel.appendChild(this.label),this.label===""?(U(this.eLabel,!1),le(this.eLabel,"presentation")):(U(this.eLabel,!0),le(this.eLabel,null))},t.prototype.setLabelSeparator=function(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)},t.prototype.getLabelId=function(){return this.eLabel.id=this.eLabel.id||"ag-"+this.getCompId()+"-label",this.eLabel.id},t.prototype.getLabel=function(){return this.label},t.prototype.setLabel=function(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)},t.prototype.setLabelAlignment=function(e){var r=this.getGui(),o=r.classList;return o.toggle("ag-label-align-left",e==="left"),o.toggle("ag-label-align-right",e==="right"),o.toggle("ag-label-align-top",e==="top"),this},t.prototype.setLabelEllipsis=function(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this},t.prototype.setLabelWidth=function(e){return this.label==null?this:(Ur(this.eLabel,e),this)},t.prototype.setDisabled=function(e){e=!!e;var r=this.getGui();return vr(r,e),r.classList.toggle("ag-disabled",e),this.disabled=e,this},t.prototype.isDisabled=function(){return!!this.disabled},Vp([P],t.prototype,"postConstruct",null),t}(W),Bp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Cr=function(n){Bp(t,n);function t(e,r,o){var i=n.call(this,e,r)||this;return i.className=o,i}return t.prototype.postConstruct=function(){n.prototype.postConstruct.call(this),this.className&&this.addCssClass(this.className)},t.prototype.onValueChange=function(e){var r=this;return this.addManagedListener(this,t.EVENT_CHANGED,function(){return e(r.getValue())}),this},t.prototype.getWidth=function(){return this.getGui().clientWidth},t.prototype.setWidth=function(e){return Be(this.getGui(),e),this},t.prototype.getPreviousValue=function(){return this.previousValue},t.prototype.getValue=function(){return this.value},t.prototype.setValue=function(e,r){return this.value===e?this:(this.previousValue=this.value,this.value=e,r||this.dispatchEvent({type:t.EVENT_CHANGED}),this)},t.EVENT_CHANGED="valueChange",t}(tl),Wp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ko=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},jp=function(n){Wp(t,n);function t(e,r,o,i){var s=n.call(this,e,``,r)||this;return s.pickerIcon=o,s.isPickerDisplayed=!1,s.isDestroyingPicker=!1,s.skipClick=!1,s}return t.prototype.postConstruct=function(){var e=this;n.prototype.postConstruct.call(this);var r="ag-"+this.getCompId()+"-display";this.eDisplayField.setAttribute("id",r),wa(this.eWrapper,r);var o=function(){if(e.skipClick){e.skipClick=!1;return}e.isDisabled()||(e.pickerComponent=e.showPicker())},i=this.getGui();if(this.addManagedListener(i,"mousedown",function(a){!e.skipClick&&e.pickerComponent&&e.pickerComponent.isAlive()&&Ct(e.pickerComponent.getGui())&&i.contains(a.target)&&(e.skipClick=!0)}),this.addManagedListener(i,"keydown",function(a){switch(a.key){case R.UP:case R.DOWN:case R.ENTER:case R.SPACE:o();case R.ESCAPE:e.isPickerDisplayed&&a.preventDefault();break}}),this.addManagedListener(this.eWrapper,"click",o),this.addManagedListener(this.eLabel,"click",o),this.pickerIcon){var s=oe(this.pickerIcon,this.gridOptionsService);s&&this.eIcon.appendChild(s)}},t.prototype.refreshLabel=function(){O(this.getLabel())?bo(this.eWrapper,this.getLabelId()):this.eWrapper.removeAttribute("aria-labelledby"),n.prototype.refreshLabel.call(this)},t.prototype.setAriaLabel=function(e){return Dt(this.eWrapper,e),this},t.prototype.setInputWidth=function(e){return Ur(this.eWrapper,e),this},t.prototype.getFocusableElement=function(){return this.eWrapper},ko([D("eLabel")],t.prototype,"eLabel",void 0),ko([D("eWrapper")],t.prototype,"eWrapper",void 0),ko([D("eDisplayField")],t.prototype,"eDisplayField",void 0),ko([D("eIcon")],t.prototype,"eIcon",void 0),t}(Cr),kp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Up=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},rl=function(n){kp(t,n);function t(e){e===void 0&&(e="default");var r=n.call(this,'
')||this;return r.cssIdentifier=e,r.options=[],r.itemEls=[],r}return t.prototype.init=function(){this.addManagedListener(this.getGui(),"keydown",this.handleKeyDown.bind(this))},t.prototype.handleKeyDown=function(e){var r=e.key;switch(r){case R.ENTER:if(!this.highlightedEl)this.setValue(this.getValue());else{var o=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(o)}break;case R.DOWN:case R.UP:var i=r===R.DOWN,s=void 0;if(e.preventDefault(),!this.highlightedEl)s=this.itemEls[i?0:this.itemEls.length-1];else{var a=this.itemEls.indexOf(this.highlightedEl),l=a+(i?1:-1);l=Math.min(Math.max(l,0),this.itemEls.length-1),s=this.itemEls[l]}this.highlightItem(s);break}},t.prototype.addOptions=function(e){var r=this;return e.forEach(function(o){return r.addOption(o)}),this},t.prototype.addOption=function(e){var r=e.value,o=e.text,i=it(o||r);return this.options.push({value:r,text:i}),this.renderOption(r,i),this.updateIndices(),this},t.prototype.updateIndices=function(){var e=this.getGui().querySelectorAll(".ag-list-item");e.forEach(function(r,o){Xi(r,o+1),Qi(r,e.length)})},t.prototype.renderOption=function(e,r){var o=this,i=document.createElement("div");le(i,"option"),i.classList.add("ag-list-item","ag-"+this.cssIdentifier+"-list-item"),i.innerHTML=""+r+"",i.tabIndex=-1,this.itemEls.push(i),this.addManagedListener(i,"mouseover",function(){return o.highlightItem(i)}),this.addManagedListener(i,"mouseleave",function(){return o.clearHighlighted()}),this.addManagedListener(i,"click",function(){return o.setValue(e)}),this.getGui().appendChild(i)},t.prototype.setValue=function(e,r){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(),this;var o=this.options.findIndex(function(s){return s.value===e});if(o!==-1){var i=this.options[o];this.value=i.value,this.displayValue=i.text!=null?i.text:i.value,this.highlightItem(this.itemEls[o]),r||this.fireChangeEvent()}return this},t.prototype.setValueByIndex=function(e){return this.setValue(this.options[e].value)},t.prototype.getValue=function(){return this.value},t.prototype.getDisplayValue=function(){return this.displayValue},t.prototype.refreshHighlighted=function(){var e=this;this.clearHighlighted();var r=this.options.findIndex(function(o){return o.value===e.value});r!==-1&&this.highlightItem(this.itemEls[r])},t.prototype.reset=function(){this.value=null,this.displayValue=null,this.clearHighlighted(),this.fireChangeEvent()},t.prototype.highlightItem=function(e){e.offsetParent&&(this.clearHighlighted(),this.highlightedEl=e,this.highlightedEl.classList.add(t.ACTIVE_CLASS),dr(this.highlightedEl,!0),this.highlightedEl.focus())},t.prototype.clearHighlighted=function(){!this.highlightedEl||!this.highlightedEl.offsetParent||(this.highlightedEl.classList.remove(t.ACTIVE_CLASS),dr(this.highlightedEl,!1),this.highlightedEl=null)},t.prototype.fireChangeEvent=function(){this.dispatchEvent({type:Cr.EVENT_CHANGED}),this.fireItemSelected()},t.prototype.fireItemSelected=function(){this.dispatchEvent({type:t.EVENT_ITEM_SELECTED})},t.EVENT_ITEM_SELECTED="selectedItem",t.ACTIVE_CLASS="ag-active-item",Up([P],t.prototype,"init",null),t}(W),zp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ol=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},In=function(n){zp(t,n);function t(e){return n.call(this,e,"ag-select","smallDown","listbox")||this}return t.prototype.init=function(){var e=this;this.listComponent=this.createBean(new rl("select")),this.listComponent.setParentComponent(this),this.eWrapper.tabIndex=0,this.listComponent.addManagedListener(this.listComponent,rl.EVENT_ITEM_SELECTED,function(){e.hideList&&e.hideList(),e.dispatchEvent({type:t.EVENT_ITEM_SELECTED})}),this.listComponent.addManagedListener(this.listComponent,Cr.EVENT_CHANGED,function(){e.setValue(e.listComponent.getValue(),!1,!0),e.hideList&&e.hideList()})},t.prototype.showPicker=function(){var e=this,r=this.listComponent.getGui(),o=this.gridOptionsService.getDocument(),i=this.addManagedListener(o.body,"wheel",function(u){!r.contains(u.target)&&e.hideList&&e.hideList()}),s=this.addManagedListener(r,"focusout",function(u){!r.contains(u.relatedTarget)&&e.hideList&&e.hideList()}),a=this.localeService.getLocaleTextFunc(),l=this.popupService.addPopup({modal:!0,eChild:r,closeOnEsc:!0,closedCallback:function(){e.hideList=null,e.isPickerDisplayed=!1,s(),i(),e.isAlive()&&(Ke(e.eWrapper,!1),e.getFocusableElement().focus())},ariaLabel:a("ariaLabelSelectField","Select Field")});return l&&(this.hideList=l.hideFunc),this.isPickerDisplayed=!0,Ur(r,Bo(this.eWrapper)),Ke(this.eWrapper,!0),r.style.maxHeight=Br(this.popupService.getPopupParent())+"px",r.style.position="absolute",this.popupService.positionPopupByComponent({type:"ag-list",eventSource:this.eWrapper,ePopup:r,position:"under",keepWithinBounds:!0}),this.listComponent.refreshHighlighted(),this.listComponent},t.prototype.addOptions=function(e){var r=this;return e.forEach(function(o){return r.addOption(o)}),this},t.prototype.addOption=function(e){return this.listComponent.addOption(e),this},t.prototype.setValue=function(e,r,o){if(this.value===e)return this;o||this.listComponent.setValue(e,!0);var i=this.listComponent.getValue();return i===this.getValue()?this:(this.eDisplayField.innerHTML=this.listComponent.getDisplayValue(),n.prototype.setValue.call(this,e,r))},t.prototype.destroy=function(){this.hideList&&this.hideList(),this.destroyBean(this.listComponent),n.prototype.destroy.call(this)},t.EVENT_ITEM_SELECTED="selectedItem",ol([h("popupService")],t.prototype,"popupService",void 0),ol([P],t.prototype,"init",null),t}(jp),$p=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Nn=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Lt=function(n){$p(t,n);function t(e,r,o,i){o===void 0&&(o="text"),i===void 0&&(i="input");var s=n.call(this,e,` +
`,r)||this;return s.pickerIcon=o,s.isPickerDisplayed=!1,s.isDestroyingPicker=!1,s.skipClick=!1,s}return t.prototype.postConstruct=function(){var e=this;n.prototype.postConstruct.call(this);var r="ag-"+this.getCompId()+"-display";this.eDisplayField.setAttribute("id",r),wa(this.eWrapper,r);var o=function(){if(e.skipClick){e.skipClick=!1;return}e.isDisabled()||(e.pickerComponent=e.showPicker())},i=this.getGui();if(this.addManagedListener(i,"mousedown",function(a){!e.skipClick&&e.pickerComponent&&e.pickerComponent.isAlive()&&Ct(e.pickerComponent.getGui())&&i.contains(a.target)&&(e.skipClick=!0)}),this.addManagedListener(i,"keydown",function(a){switch(a.key){case R.UP:case R.DOWN:case R.ENTER:case R.SPACE:o();case R.ESCAPE:e.isPickerDisplayed&&a.preventDefault();break}}),this.addManagedListener(this.eWrapper,"click",o),this.addManagedListener(this.eLabel,"click",o),this.pickerIcon){var s=oe(this.pickerIcon,this.gridOptionsService);s&&this.eIcon.appendChild(s)}},t.prototype.refreshLabel=function(){O(this.getLabel())?bo(this.eWrapper,this.getLabelId()):this.eWrapper.removeAttribute("aria-labelledby"),n.prototype.refreshLabel.call(this)},t.prototype.setAriaLabel=function(e){return Dt(this.eWrapper,e),this},t.prototype.setInputWidth=function(e){return Ur(this.eWrapper,e),this},t.prototype.getFocusableElement=function(){return this.eWrapper},ko([D("eLabel")],t.prototype,"eLabel",void 0),ko([D("eWrapper")],t.prototype,"eWrapper",void 0),ko([D("eDisplayField")],t.prototype,"eDisplayField",void 0),ko([D("eIcon")],t.prototype,"eIcon",void 0),t}(Cr),kp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Up=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},rl=function(n){kp(t,n);function t(e){e===void 0&&(e="default");var r=n.call(this,'
')||this;return r.cssIdentifier=e,r.options=[],r.itemEls=[],r}return t.prototype.init=function(){this.addManagedListener(this.getGui(),"keydown",this.handleKeyDown.bind(this))},t.prototype.handleKeyDown=function(e){var r=e.key;switch(r){case R.ENTER:if(!this.highlightedEl)this.setValue(this.getValue());else{var o=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(o)}break;case R.DOWN:case R.UP:var i=r===R.DOWN,s=void 0;if(e.preventDefault(),!this.highlightedEl)s=this.itemEls[i?0:this.itemEls.length-1];else{var a=this.itemEls.indexOf(this.highlightedEl),l=a+(i?1:-1);l=Math.min(Math.max(l,0),this.itemEls.length-1),s=this.itemEls[l]}this.highlightItem(s);break}},t.prototype.addOptions=function(e){var r=this;return e.forEach(function(o){return r.addOption(o)}),this},t.prototype.addOption=function(e){var r=e.value,o=e.text,i=it(o||r);return this.options.push({value:r,text:i}),this.renderOption(r,i),this.updateIndices(),this},t.prototype.updateIndices=function(){var e=this.getGui().querySelectorAll(".ag-list-item");e.forEach(function(r,o){Xi(r,o+1),Qi(r,e.length)})},t.prototype.renderOption=function(e,r){var o=this,i=document.createElement("div");le(i,"option"),i.classList.add("ag-list-item","ag-"+this.cssIdentifier+"-list-item"),i.innerHTML=""+r+"",i.tabIndex=-1,this.itemEls.push(i),this.addManagedListener(i,"mouseover",function(){return o.highlightItem(i)}),this.addManagedListener(i,"mouseleave",function(){return o.clearHighlighted()}),this.addManagedListener(i,"click",function(){return o.setValue(e)}),this.getGui().appendChild(i)},t.prototype.setValue=function(e,r){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(),this;var o=this.options.findIndex(function(s){return s.value===e});if(o!==-1){var i=this.options[o];this.value=i.value,this.displayValue=i.text!=null?i.text:i.value,this.highlightItem(this.itemEls[o]),r||this.fireChangeEvent()}return this},t.prototype.setValueByIndex=function(e){return this.setValue(this.options[e].value)},t.prototype.getValue=function(){return this.value},t.prototype.getDisplayValue=function(){return this.displayValue},t.prototype.refreshHighlighted=function(){var e=this;this.clearHighlighted();var r=this.options.findIndex(function(o){return o.value===e.value});r!==-1&&this.highlightItem(this.itemEls[r])},t.prototype.reset=function(){this.value=null,this.displayValue=null,this.clearHighlighted(),this.fireChangeEvent()},t.prototype.highlightItem=function(e){e.offsetParent&&(this.clearHighlighted(),this.highlightedEl=e,this.highlightedEl.classList.add(t.ACTIVE_CLASS),dr(this.highlightedEl,!0),this.highlightedEl.focus())},t.prototype.clearHighlighted=function(){!this.highlightedEl||!this.highlightedEl.offsetParent||(this.highlightedEl.classList.remove(t.ACTIVE_CLASS),dr(this.highlightedEl,!1),this.highlightedEl=null)},t.prototype.fireChangeEvent=function(){this.dispatchEvent({type:Cr.EVENT_CHANGED}),this.fireItemSelected()},t.prototype.fireItemSelected=function(){this.dispatchEvent({type:t.EVENT_ITEM_SELECTED})},t.EVENT_ITEM_SELECTED="selectedItem",t.ACTIVE_CLASS="ag-active-item",Up([P],t.prototype,"init",null),t}(W),zp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ol=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Mn=function(n){zp(t,n);function t(e){return n.call(this,e,"ag-select","smallDown","listbox")||this}return t.prototype.init=function(){var e=this;this.listComponent=this.createBean(new rl("select")),this.listComponent.setParentComponent(this),this.eWrapper.tabIndex=0,this.listComponent.addManagedListener(this.listComponent,rl.EVENT_ITEM_SELECTED,function(){e.hideList&&e.hideList(),e.dispatchEvent({type:t.EVENT_ITEM_SELECTED})}),this.listComponent.addManagedListener(this.listComponent,Cr.EVENT_CHANGED,function(){e.setValue(e.listComponent.getValue(),!1,!0),e.hideList&&e.hideList()})},t.prototype.showPicker=function(){var e=this,r=this.listComponent.getGui(),o=this.gridOptionsService.getDocument(),i=this.addManagedListener(o.body,"wheel",function(u){!r.contains(u.target)&&e.hideList&&e.hideList()}),s=this.addManagedListener(r,"focusout",function(u){!r.contains(u.relatedTarget)&&e.hideList&&e.hideList()}),a=this.localeService.getLocaleTextFunc(),l=this.popupService.addPopup({modal:!0,eChild:r,closeOnEsc:!0,closedCallback:function(){e.hideList=null,e.isPickerDisplayed=!1,s(),i(),e.isAlive()&&(Ke(e.eWrapper,!1),e.getFocusableElement().focus())},ariaLabel:a("ariaLabelSelectField","Select Field")});return l&&(this.hideList=l.hideFunc),this.isPickerDisplayed=!0,Ur(r,Bo(this.eWrapper)),Ke(this.eWrapper,!0),r.style.maxHeight=Br(this.popupService.getPopupParent())+"px",r.style.position="absolute",this.popupService.positionPopupByComponent({type:"ag-list",eventSource:this.eWrapper,ePopup:r,position:"under",keepWithinBounds:!0}),this.listComponent.refreshHighlighted(),this.listComponent},t.prototype.addOptions=function(e){var r=this;return e.forEach(function(o){return r.addOption(o)}),this},t.prototype.addOption=function(e){return this.listComponent.addOption(e),this},t.prototype.setValue=function(e,r,o){if(this.value===e)return this;o||this.listComponent.setValue(e,!0);var i=this.listComponent.getValue();return i===this.getValue()?this:(this.eDisplayField.innerHTML=this.listComponent.getDisplayValue(),n.prototype.setValue.call(this,e,r))},t.prototype.destroy=function(){this.hideList&&this.hideList(),this.destroyBean(this.listComponent),n.prototype.destroy.call(this)},t.EVENT_ITEM_SELECTED="selectedItem",ol([h("popupService")],t.prototype,"popupService",void 0),ol([P],t.prototype,"init",null),t}(jp),$p=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Nn=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Lt=function(n){$p(t,n);function t(e,r,o,i){o===void 0&&(o="text"),i===void 0&&(i="input");var s=n.call(this,e,`
-
`,r)||this;return s.inputType=o,s.displayFieldTag=i,s}return t.prototype.postConstruct=function(){n.prototype.postConstruct.call(this),this.setInputType(),this.eLabel.classList.add(this.className+"-label"),this.eWrapper.classList.add(this.className+"-input-wrapper"),this.eInput.classList.add(this.className+"-input"),this.addCssClass("ag-input-field"),this.eInput.id=this.eInput.id||"ag-"+this.getCompId()+"-input";var e=this.config,r=e.width,o=e.value;r!=null&&this.setWidth(r),o!=null&&this.setValue(o),this.addInputListeners(),this.activateTabIndex([this.eInput])},t.prototype.refreshLabel=function(){O(this.getLabel())?bo(this.eInput,this.getLabelId()):this.eInput.removeAttribute("aria-labelledby"),n.prototype.refreshLabel.call(this)},t.prototype.addInputListeners=function(){var e=this;this.addManagedListener(this.eInput,"input",function(r){return e.setValue(r.target.value)})},t.prototype.setInputType=function(){this.displayFieldTag==="input"&&this.eInput.setAttribute("type",this.inputType)},t.prototype.getInputElement=function(){return this.eInput},t.prototype.setInputWidth=function(e){return Ur(this.eWrapper,e),this},t.prototype.setInputName=function(e){return this.getInputElement().setAttribute("name",e),this},t.prototype.getFocusableElement=function(){return this.eInput},t.prototype.setMaxLength=function(e){var r=this.eInput;return r.maxLength=e,this},t.prototype.setInputPlaceholder=function(e){return Ft(this.eInput,"placeholder",e),this},t.prototype.setInputAriaLabel=function(e){return Dt(this.eInput,e),this},t.prototype.setDisabled=function(e){return vr(this.eInput,e),n.prototype.setDisabled.call(this,e)},Nn([D("eLabel")],t.prototype,"eLabel",void 0),Nn([D("eWrapper")],t.prototype,"eWrapper",void 0),Nn([D("eInput")],t.prototype,"eInput",void 0),t}(Cr),Kp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),mr=function(n){Kp(t,n);function t(e,r,o){r===void 0&&(r="ag-checkbox"),o===void 0&&(o="checkbox");var i=n.call(this,e,r,o)||this;return i.labelAlignment="right",i.selected=!1,i.readOnly=!1,i.passive=!1,i}return t.prototype.addInputListeners=function(){this.addManagedListener(this.eInput,"click",this.onCheckboxClick.bind(this)),this.addManagedListener(this.eLabel,"click",this.toggle.bind(this))},t.prototype.getNextValue=function(){return this.selected===void 0?!0:!this.selected},t.prototype.setPassive=function(e){this.passive=e},t.prototype.isReadOnly=function(){return this.readOnly},t.prototype.setReadOnly=function(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e},t.prototype.setDisabled=function(e){return this.eWrapper.classList.toggle("ag-disabled",e),n.prototype.setDisabled.call(this,e)},t.prototype.toggle=function(){if(!this.eInput.disabled){var e=this.isSelected(),r=this.getNextValue();this.passive?this.dispatchChange(r,e):this.setValue(r)}},t.prototype.getValue=function(){return this.isSelected()},t.prototype.setValue=function(e,r){return this.refreshSelectedClass(e),this.setSelected(e,r),this},t.prototype.setName=function(e){var r=this.getInputElement();return r.name=e,this},t.prototype.isSelected=function(){return this.selected},t.prototype.setSelected=function(e,r){this.isSelected()!==e&&(this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0,this.eInput.checked=e,this.eInput.indeterminate=e===void 0,r||this.dispatchChange(this.selected,this.previousValue))},t.prototype.dispatchChange=function(e,r,o){this.dispatchEvent({type:t.EVENT_CHANGED,selected:e,previousValue:r,event:o});var i=this.getInputElement(),s={type:v.EVENT_CHECKBOX_CHANGED,id:i.id,name:i.name,selected:e,previousValue:r};this.eventService.dispatchEvent(s)},t.prototype.onCheckboxClick=function(e){if(!(this.passive||this.eInput.disabled)){var r=this.isSelected(),o=this.selected=e.target.checked;this.refreshSelectedClass(o),this.dispatchChange(o,r,e)}},t.prototype.refreshSelectedClass=function(e){this.eWrapper.classList.toggle("ag-checked",e===!0),this.eWrapper.classList.toggle("ag-indeterminate",e==null)},t}(Lt),Yp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),il=function(n){Yp(t,n);function t(e){return n.call(this,e,"ag-radio-button","radio")||this}return t.prototype.isSelected=function(){return this.eInput.checked},t.prototype.toggle=function(){this.eInput.disabled||this.isSelected()||this.setValue(!0)},t.prototype.addInputListeners=function(){n.prototype.addInputListeners.call(this),this.addManagedListener(this.eventService,v.EVENT_CHECKBOX_CHANGED,this.onChange.bind(this))},t.prototype.onChange=function(e){e.selected&&e.name&&this.eInput.name&&this.eInput.name===e.name&&e.id&&this.eInput.id!==e.id&&this.setValue(!1,!0)},t}(mr),qp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Qp=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Xp=function(n,t){for(var e=0,r=t.length,o=n.length;e=0?0:e===t.IN_RANGE?2:1},t.prototype.onFloatingFilterChanged=function(e,r){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(r),this.onUiChanged(!0)},t.prototype.setTypeFromFloatingFilter=function(e){var r=this;this.eTypes.forEach(function(o,i){i===0?o.setValue(e,!0):o.setValue(r.optionsFactory.getDefaultOption(),!0)})},t.prototype.getModelFromUi=function(){var e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.getFilterType(),operator:this.getJoinOperator(),condition1:e[0],condition2:e[1],conditions:e}:e[0]},t.prototype.getConditionTypes=function(){return this.eTypes.map(function(e){return e.getValue()})},t.prototype.getConditionType=function(e){return this.eTypes[e].getValue()},t.prototype.getJoinOperator=function(){return this.eJoinOperatorsOr.length===0?this.defaultJoinOperator:this.eJoinOperatorsOr[0].getValue()===!0?"OR":"AND"},t.prototype.areModelsEqual=function(e,r){var o=this;if(!e&&!r)return!0;if(!e&&r||e&&!r)return!1;var i=!e.operator,s=!r.operator,a=!i&&s||i&&!s;if(a)return!1;var l;if(i){var u=e,c=r;l=this.areSimpleModelsEqual(u,c)}else{var p=e,d=r;l=p.operator===d.operator&&_t(p.conditions,d.conditions,function(f,g){return o.areSimpleModelsEqual(f,g)})}return l},t.prototype.setModelIntoUi=function(e){var r=this,o=e.operator;if(o){var i=e;i.conditions||(i.conditions=[i.condition1,i.condition2]);var s=this.validateAndUpdateConditions(i.conditions),a=this.getNumConditions();if(sa)for(var l=a;l1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(c.type,!0),this.setConditionIntoUi(c,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.onUiChanged(),qe.resolve()},t.prototype.validateAndUpdateConditions=function(e){var r=e.length;return r>this.maxNumConditions&&(e.splice(this.maxNumConditions),z(function(){return console.warn('AG Grid: Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.')},"simpleFilterSetModelMaxNumConditions"),r=this.maxNumConditions),r},t.prototype.doesFilterPass=function(e){var r=this,o,i=this.getModel();if(i==null)return!0;var s=i.operator,a=[];if(s){var l=i;a.push.apply(a,Xp([],Qp((o=l.conditions)!==null&&o!==void 0?o:[])))}else a.push(i);var u=s&&s==="OR"?"some":"every";return a[u](function(c){return r.individualConditionPasses(e,c)})},t.prototype.setParams=function(e){n.prototype.setParams.call(this,e),this.setNumConditions(e),this.defaultJoinOperator=this.getDefaultJoinOperator(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.optionsFactory=new Qa,this.optionsFactory.init(e,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators()},t.prototype.setNumConditions=function(e){var r,o;e.suppressAndOrCondition!=null&&z(function(){return console.warn('AG Grid: Since v29.2 "filterParams.suppressAndOrCondition" is deprecated. Use "filterParams.maxNumConditions = 1" instead.')},"simpleFilterSuppressAndOrCondition"),e.alwaysShowBothConditions!=null&&z(function(){return console.warn('AG Grid: Since v29.2 "filterParams.alwaysShowBothConditions" is deprecated. Use "filterParams.numAlwaysVisibleConditions = 2" instead.')},"simpleFilterAlwaysShowBothConditions"),this.maxNumConditions=(r=e.maxNumConditions)!==null&&r!==void 0?r:e.suppressAndOrCondition?1:2,this.maxNumConditions<1&&(z(function(){return console.warn('AG Grid: "filterParams.maxNumConditions" must be greater than or equal to zero.')},"simpleFilterMaxNumConditions"),this.maxNumConditions=1),this.numAlwaysVisibleConditions=(o=e.numAlwaysVisibleConditions)!==null&&o!==void 0?o:e.alwaysShowBothConditions?2:1,this.numAlwaysVisibleConditions<1&&(z(function(){return console.warn('AG Grid: "filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.')},"simpleFilterNumAlwaysVisibleConditions"),this.numAlwaysVisibleConditions=1),this.numAlwaysVisibleConditions>this.maxNumConditions&&(z(function(){return console.warn('AG Grid: "filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".')},"simpleFilterNumAlwaysVisibleGreaterThanMaxNumConditions"),this.numAlwaysVisibleConditions=this.maxNumConditions)},t.prototype.createOption=function(){var e=this,r=this.createManagedBean(new In);this.eTypes.push(r),r.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(r.getGui());var o=this.createValueElement();this.eConditionBodies.push(o),this.eFilterBody.appendChild(o),this.putOptionsIntoDropdown(r),this.resetType(r);var i=this.getNumConditions()-1;this.forEachPositionInput(i,function(s){return e.resetInput(s)}),this.addChangedListeners(r,i)},t.prototype.createJoinOperatorPanel=function(){var e=document.createElement("div");this.eJoinOperatorPanels.push(e),e.classList.add("ag-filter-condition");var r=this.createJoinOperator(this.eJoinOperatorsAnd,e,"and"),o=this.createJoinOperator(this.eJoinOperatorsOr,e,"or");this.eFilterBody.appendChild(e);var i=this.eJoinOperatorPanels.length-1,s=this.joinOperatorId++;this.resetJoinOperatorAnd(r,i,s),this.resetJoinOperatorOr(o,i,s),this.isReadOnly()||(r.onValueChange(this.listener),o.onValueChange(this.listener))},t.prototype.createJoinOperator=function(e,r,o){var i=this.createManagedBean(new il);return e.push(i),i.addCssClass("ag-filter-condition-operator"),i.addCssClass("ag-filter-condition-operator-"+o),r.appendChild(i.getGui()),i},t.prototype.getDefaultJoinOperator=function(e){return e==="AND"||e==="OR"?e:"AND"},t.prototype.createFilterListOptions=function(){var e=this,r=this.optionsFactory.getFilterOptions();this.filterListOptions=r.map(function(o){return typeof o=="string"?e.createBoilerplateListOption(o):e.createCustomListOption(o)})},t.prototype.putOptionsIntoDropdown=function(e){this.filterListOptions.forEach(function(r){e.addOption(r)}),e.setDisabled(this.filterListOptions.length<=1)},t.prototype.createBoilerplateListOption=function(e){return{value:e,text:this.translate(e)}},t.prototype.createCustomListOption=function(e){var r=e.displayKey,o=this.optionsFactory.getCustomOption(e.displayKey);return{value:r,text:o?this.localeService.getLocaleTextFunc()(o.displayKey,o.displayName):this.translate(r)}},t.prototype.isAllowTwoConditions=function(){return this.maxNumConditions>=2},t.prototype.createBodyTemplate=function(){return""},t.prototype.getCssIdentifier=function(){return"simple-filter"},t.prototype.updateUiVisibility=function(){var e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)},t.prototype.updateNumConditions=function(){for(var e,r=-1,o=!0,i=0;i0&&this.removeConditionsAndOperators(a,l),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=r},t.prototype.updateConditionStatusesAndValues=function(e,r){var o=this;this.eTypes.forEach(function(s,a){var l=o.isConditionDisabled(a,e);s.setDisabled(l||o.filterListOptions.length<=1),a===1&&(vr(o.eJoinOperatorPanels[0],l),o.eJoinOperatorsAnd[0].setDisabled(l),o.eJoinOperatorsOr[0].setDisabled(l))}),this.eConditionBodies.forEach(function(s,a){U(s,o.isConditionBodyVisible(a))});var i=(r??this.getJoinOperator())==="OR";this.eJoinOperatorsAnd.forEach(function(s,a){s.setValue(!i,!0)}),this.eJoinOperatorsOr.forEach(function(s,a){s.setValue(i,!0)}),this.forEachInput(function(s,a,l,u){o.setElementDisplayed(s,a=this.getNumConditions())){this.removeComponents(this.eTypes,e,r),this.removeElements(this.eConditionBodies,e,r),this.removeValueElements(e,r);var o=Math.max(e-1,0);this.removeElements(this.eJoinOperatorPanels,o,r),this.removeComponents(this.eJoinOperatorsAnd,o,r),this.removeComponents(this.eJoinOperatorsOr,o,r)}},t.prototype.removeElements=function(e,r,o){var i=this.removeItems(e,r,o);i.forEach(function(s){return yt(s)})},t.prototype.removeComponents=function(e,r,o){var i=this,s=this.removeItems(e,r,o);s.forEach(function(a){yt(a.getGui()),i.destroyBean(a)})},t.prototype.removeItems=function(e,r,o){return o==null?e.splice(r):e.splice(r,o)},t.prototype.afterGuiAttached=function(e){if(n.prototype.afterGuiAttached.call(this,e),this.resetPlaceholder(),!e||!e.suppressFocus&&!this.isReadOnly()){var r=this.getInputs(0)[0];if(!r)return;r instanceof Lt&&r.getInputElement().focus()}},t.prototype.afterGuiDetached=function(){n.prototype.afterGuiDetached.call(this);var e=this.getModel();(!this.areModelsEqual(e,this.getModelFromUi())||this.hasInvalidInputs())&&this.resetUiToActiveModel(e);for(var r=-1,o=-1,i=!1,s=this.getJoinOperator(),a=this.getNumConditions()-1;a>=0;a--)if(this.isConditionUiComplete(a))r===-1&&(r=a,o=a);else{var l=a>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(a-1),u=a1?"inRangeStart":i===0?"filterOoo":"inRangeEnd",u=i===0&&a>1?r("ariaFilterFromValue","Filter from value"):i===0?r("ariaFilterValue","Filter Value"):r("ariaFilterToValue","Filter to Value");o.setInputPlaceholder(e.getPlaceholderText(l,s)),o.setInputAriaLabel(u)}})},t.prototype.setElementValue=function(e,r){e instanceof Lt&&e.setValue(r!=null?String(r):null,!0)},t.prototype.setElementDisplayed=function(e,r){e instanceof W&&U(e.getGui(),r)},t.prototype.setElementDisabled=function(e,r){e instanceof W&&vr(e.getGui(),r)},t.prototype.attachElementOnChange=function(e,r){e instanceof Lt&&e.onValueChange(r)},t.prototype.forEachInput=function(e){var r=this;this.getConditionTypes().forEach(function(o,i){r.forEachPositionTypeInput(i,o,e)})},t.prototype.forEachPositionInput=function(e,r){var o=this.getConditionType(e);this.forEachPositionTypeInput(e,o,r)},t.prototype.forEachPositionTypeInput=function(e,r,o){for(var i=this.getNumberOfInputs(r),s=this.getInputs(e),a=0;ar+1},t.prototype.isConditionBodyVisible=function(e){var r=this.getConditionType(e),o=this.getNumberOfInputs(r);return o>0},t.prototype.isConditionUiComplete=function(e){if(e>=this.getNumConditions())return!1;var r=this.getConditionType(e);return!(r===t.EMPTY||this.getValues(e).some(function(o){return o==null}))},t.prototype.getNumConditions=function(){return this.eTypes.length},t.prototype.getUiCompleteConditions=function(){for(var e=[],r=0;r0)},t.prototype.resetInput=function(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())},t.prototype.setConditionIntoUi=function(e,r){var o=this,i=this.mapValuesFromModel(e);this.forEachInput(function(s,a,l,u){l===r&&o.setElementValue(s,i[a]!=null?i[a]:null)})},t.prototype.setValueFromFloatingFilter=function(e){var r=this;this.forEachInput(function(o,i,s,a){r.setElementValue(o,i===0&&s===0?e:null)})},t.prototype.isDefaultOperator=function(e){return e===this.defaultJoinOperator},t.prototype.addChangedListeners=function(e,r){var o=this;this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(r,function(i){o.attachElementOnChange(i,o.listener)}))},t.prototype.individualConditionPasses=function(e,r){var o=this.getCellValue(e.node),i=this.mapValuesFromModel(r),s=this.optionsFactory.getCustomOption(r.type),a=this.evaluateCustomFilter(s,i,o);return a??(o==null?this.evaluateNullValue(r.type):this.evaluateNonNullValue(i,o,r,e))},t.prototype.evaluateCustomFilter=function(e,r,o){if(e!=null){var i=e.predicate;if(i!=null&&!r.some(function(s){return s==null}))return i(r,o)}},t.prototype.isBlank=function(e){return e==null||typeof e=="string"&&e.trim().length===0},t.prototype.hasInvalidInputs=function(){return!1},t.EMPTY="empty",t.BLANK="blank",t.NOT_BLANK="notBlank",t.EQUALS="equals",t.NOT_EQUAL="notEqual",t.LESS_THAN="lessThan",t.LESS_THAN_OR_EQUAL="lessThanOrEqual",t.GREATER_THAN="greaterThan",t.GREATER_THAN_OR_EQUAL="greaterThanOrEqual",t.IN_RANGE="inRange",t.CONTAINS="contains",t.NOT_CONTAINS="notContains",t.STARTS_WITH="startsWith",t.ENDS_WITH="endsWith",t}(jo),Jp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ue=function(n){Jp(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.setParams=function(e){n.prototype.setParams.call(this,e),this.scalarFilterParams=e},t.prototype.evaluateNullValue=function(e){switch(e){case t.EQUALS:case t.NOT_EQUAL:if(this.scalarFilterParams.includeBlanksInEquals)return!0;break;case t.GREATER_THAN:case t.GREATER_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInGreaterThan)return!0;break;case t.LESS_THAN:case t.LESS_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInLessThan)return!0;break;case t.IN_RANGE:if(this.scalarFilterParams.includeBlanksInRange)return!0;break;case t.BLANK:return!0;case t.NOT_BLANK:return!1}return!1},t.prototype.evaluateNonNullValue=function(e,r,o){var i=this.comparator(),s=e[0]!=null?i(e[0],r):0;switch(o.type){case t.EQUALS:return s===0;case t.NOT_EQUAL:return s!==0;case t.GREATER_THAN:return s>0;case t.GREATER_THAN_OR_EQUAL:return s>=0;case t.LESS_THAN:return s<0;case t.LESS_THAN_OR_EQUAL:return s<=0;case t.IN_RANGE:{var a=i(e[1],r);return this.scalarFilterParams.inRangeInclusive?s>=0&&a<=0:s>0&&a<0}case t.BLANK:return this.isBlank(r);case t.NOT_BLANK:return!this.isBlank(r);default:return console.warn('AG Grid: Unexpected type of filter "'+o.type+'", it looks like the filter was configured with incorrect Filter Options'),!0}},t}(ee),nl=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Hn=function(){return Hn=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},sl=1e3,al=1/0,ll=function(n){nl(t,n);function t(e,r,o){var i=n.call(this,r,o)||this;return i.dateFilterParams=e,i}return t.prototype.conditionToString=function(e,r){var o=e.type,i=(r||{}).numberOfInputs,s=o==ee.IN_RANGE||i===2,a=Ye(e.dateFrom),l=Ye(e.dateTo),u=this.dateFilterParams.inRangeFloatingFilterDateFormat;if(s){var c=a!==null?Go(a,u):"null",p=l!==null?Go(l,u):"null";return c+"-"+p}return a!=null?Go(a,u):""+o},t}(Gn),ul=function(n){nl(t,n);function t(){var e=n.call(this,"dateFilter")||this;return e.eConditionPanelsFrom=[],e.eConditionPanelsTo=[],e.dateConditionFromComps=[],e.dateConditionToComps=[],e.minValidYear=sl,e.maxValidYear=al,e}return t.prototype.afterGuiAttached=function(e){n.prototype.afterGuiAttached.call(this,e),this.dateConditionFromComps[0].afterGuiAttached(e)},t.prototype.mapValuesFromModel=function(e){var r=e||{},o=r.dateFrom,i=r.dateTo,s=r.type;return[o&&Ye(o)||null,i&&Ye(i)||null].slice(0,this.getNumberOfInputs(s))},t.prototype.comparator=function(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this)},t.prototype.defaultComparator=function(e,r){var o=r;return r==null||oe?1:0},t.prototype.setParams=function(e){this.dateFilterParams=e,n.prototype.setParams.call(this,e);var r=function(o,i){if(e[o]!=null)if(isNaN(e[o]))console.warn("AG Grid: DateFilter "+o+" is not a number");else return e[o]==null?i:Number(e[o]);return i};this.minValidYear=r("minValidYear",sl),this.maxValidYear=r("maxValidYear",al),this.minValidYear>this.maxValidYear&&console.warn("AG Grid: DateFilter minValidYear should be <= maxValidYear"),this.filterModelFormatter=new ll(this.dateFilterParams,this.localeService,this.optionsFactory)},t.prototype.createDateCompWrapper=function(e){var r=this,o=new qa(this.getContext(),this.userComponentFactory,{onDateChanged:function(){return r.onUiChanged()},filterParams:this.dateFilterParams},e);return this.addDestroyFunc(function(){return o.destroy()}),o},t.prototype.setElementValue=function(e,r){e.setDate(r)},t.prototype.setElementDisplayed=function(e,r){e.setDisplayed(r)},t.prototype.setElementDisabled=function(e,r){e.setDisabled(r)},t.prototype.getDefaultFilterOptions=function(){return t.DEFAULT_FILTER_OPTIONS},t.prototype.createValueElement=function(){var e=document.createElement("div");return e.classList.add("ag-filter-body"),this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e},t.prototype.createFromToElement=function(e,r,o,i){var s=document.createElement("div");s.classList.add("ag-filter-"+i),s.classList.add("ag-filter-date-"+i),r.push(s),e.appendChild(s),o.push(this.createDateCompWrapper(s))},t.prototype.removeValueElements=function(e,r){this.removeDateComps(this.dateConditionFromComps,e,r),this.removeDateComps(this.dateConditionToComps,e,r),this.removeItems(this.eConditionPanelsFrom,e,r),this.removeItems(this.eConditionPanelsTo,e,r)},t.prototype.removeDateComps=function(e,r,o){var i=this.removeItems(e,r,o);i.forEach(function(s){return s.destroy()})},t.prototype.isConditionUiComplete=function(e){var r=this;if(!n.prototype.isConditionUiComplete.call(this,e))return!1;var o=function(s){return s!=null&&s.getUTCFullYear()>=r.minValidYear&&s.getUTCFullYear()<=r.maxValidYear},i=!0;return this.forEachInput(function(s,a,l,u){l!==e||!i||a>=u||(i=i&&o(s.getDate()))}),i},t.prototype.areSimpleModelsEqual=function(e,r){return e.dateFrom===r.dateFrom&&e.dateTo===r.dateTo&&e.type===r.type},t.prototype.getFilterType=function(){return"date"},t.prototype.createCondition=function(e){var r=this.getConditionType(e),o={},i=this.getValues(e);return i.length>0&&(o.dateFrom=Ve(i[0])),i.length>1&&(o.dateTo=Ve(i[1])),Hn({dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:r},o)},t.prototype.resetPlaceholder=function(){var e=this.localeService.getLocaleTextFunc(),r=this.translate("dateFormatOoo"),o=e("ariaFilterValue","Filter Value");this.forEachInput(function(i){i.setInputPlaceholder(r),i.setInputAriaLabel(o)})},t.prototype.getInputs=function(e){return e>=this.dateConditionFromComps.length?[null,null]:[this.dateConditionFromComps[e],this.dateConditionToComps[e]]},t.prototype.getValues=function(e){var r=[];return this.forEachPositionInput(e,function(o,i,s,a){i=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},rd=function(n){td(t,n);function t(){return n.call(this,` + `,r)||this;return s.inputType=o,s.displayFieldTag=i,s}return t.prototype.postConstruct=function(){n.prototype.postConstruct.call(this),this.setInputType(),this.eLabel.classList.add(this.className+"-label"),this.eWrapper.classList.add(this.className+"-input-wrapper"),this.eInput.classList.add(this.className+"-input"),this.addCssClass("ag-input-field"),this.eInput.id=this.eInput.id||"ag-"+this.getCompId()+"-input";var e=this.config,r=e.width,o=e.value;r!=null&&this.setWidth(r),o!=null&&this.setValue(o),this.addInputListeners(),this.activateTabIndex([this.eInput])},t.prototype.refreshLabel=function(){O(this.getLabel())?bo(this.eInput,this.getLabelId()):this.eInput.removeAttribute("aria-labelledby"),n.prototype.refreshLabel.call(this)},t.prototype.addInputListeners=function(){var e=this;this.addManagedListener(this.eInput,"input",function(r){return e.setValue(r.target.value)})},t.prototype.setInputType=function(){this.displayFieldTag==="input"&&this.eInput.setAttribute("type",this.inputType)},t.prototype.getInputElement=function(){return this.eInput},t.prototype.setInputWidth=function(e){return Ur(this.eWrapper,e),this},t.prototype.setInputName=function(e){return this.getInputElement().setAttribute("name",e),this},t.prototype.getFocusableElement=function(){return this.eInput},t.prototype.setMaxLength=function(e){var r=this.eInput;return r.maxLength=e,this},t.prototype.setInputPlaceholder=function(e){return Ft(this.eInput,"placeholder",e),this},t.prototype.setInputAriaLabel=function(e){return Dt(this.eInput,e),this},t.prototype.setDisabled=function(e){return vr(this.eInput,e),n.prototype.setDisabled.call(this,e)},Nn([D("eLabel")],t.prototype,"eLabel",void 0),Nn([D("eWrapper")],t.prototype,"eWrapper",void 0),Nn([D("eInput")],t.prototype,"eInput",void 0),t}(Cr),Kp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),mr=function(n){Kp(t,n);function t(e,r,o){r===void 0&&(r="ag-checkbox"),o===void 0&&(o="checkbox");var i=n.call(this,e,r,o)||this;return i.labelAlignment="right",i.selected=!1,i.readOnly=!1,i.passive=!1,i}return t.prototype.addInputListeners=function(){this.addManagedListener(this.eInput,"click",this.onCheckboxClick.bind(this)),this.addManagedListener(this.eLabel,"click",this.toggle.bind(this))},t.prototype.getNextValue=function(){return this.selected===void 0?!0:!this.selected},t.prototype.setPassive=function(e){this.passive=e},t.prototype.isReadOnly=function(){return this.readOnly},t.prototype.setReadOnly=function(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e},t.prototype.setDisabled=function(e){return this.eWrapper.classList.toggle("ag-disabled",e),n.prototype.setDisabled.call(this,e)},t.prototype.toggle=function(){if(!this.eInput.disabled){var e=this.isSelected(),r=this.getNextValue();this.passive?this.dispatchChange(r,e):this.setValue(r)}},t.prototype.getValue=function(){return this.isSelected()},t.prototype.setValue=function(e,r){return this.refreshSelectedClass(e),this.setSelected(e,r),this},t.prototype.setName=function(e){var r=this.getInputElement();return r.name=e,this},t.prototype.isSelected=function(){return this.selected},t.prototype.setSelected=function(e,r){this.isSelected()!==e&&(this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0,this.eInput.checked=e,this.eInput.indeterminate=e===void 0,r||this.dispatchChange(this.selected,this.previousValue))},t.prototype.dispatchChange=function(e,r,o){this.dispatchEvent({type:t.EVENT_CHANGED,selected:e,previousValue:r,event:o});var i=this.getInputElement(),s={type:v.EVENT_CHECKBOX_CHANGED,id:i.id,name:i.name,selected:e,previousValue:r};this.eventService.dispatchEvent(s)},t.prototype.onCheckboxClick=function(e){if(!(this.passive||this.eInput.disabled)){var r=this.isSelected(),o=this.selected=e.target.checked;this.refreshSelectedClass(o),this.dispatchChange(o,r,e)}},t.prototype.refreshSelectedClass=function(e){this.eWrapper.classList.toggle("ag-checked",e===!0),this.eWrapper.classList.toggle("ag-indeterminate",e==null)},t}(Lt),Yp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),il=function(n){Yp(t,n);function t(e){return n.call(this,e,"ag-radio-button","radio")||this}return t.prototype.isSelected=function(){return this.eInput.checked},t.prototype.toggle=function(){this.eInput.disabled||this.isSelected()||this.setValue(!0)},t.prototype.addInputListeners=function(){n.prototype.addInputListeners.call(this),this.addManagedListener(this.eventService,v.EVENT_CHECKBOX_CHANGED,this.onChange.bind(this))},t.prototype.onChange=function(e){e.selected&&e.name&&this.eInput.name&&this.eInput.name===e.name&&e.id&&this.eInput.id!==e.id&&this.setValue(!1,!0)},t}(mr),qp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Qp=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Xp=function(n,t){for(var e=0,r=t.length,o=n.length;e=0?0:e===t.IN_RANGE?2:1},t.prototype.onFloatingFilterChanged=function(e,r){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(r),this.onUiChanged(!0)},t.prototype.setTypeFromFloatingFilter=function(e){var r=this;this.eTypes.forEach(function(o,i){i===0?o.setValue(e,!0):o.setValue(r.optionsFactory.getDefaultOption(),!0)})},t.prototype.getModelFromUi=function(){var e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.getFilterType(),operator:this.getJoinOperator(),condition1:e[0],condition2:e[1],conditions:e}:e[0]},t.prototype.getConditionTypes=function(){return this.eTypes.map(function(e){return e.getValue()})},t.prototype.getConditionType=function(e){return this.eTypes[e].getValue()},t.prototype.getJoinOperator=function(){return this.eJoinOperatorsOr.length===0?this.defaultJoinOperator:this.eJoinOperatorsOr[0].getValue()===!0?"OR":"AND"},t.prototype.areModelsEqual=function(e,r){var o=this;if(!e&&!r)return!0;if(!e&&r||e&&!r)return!1;var i=!e.operator,s=!r.operator,a=!i&&s||i&&!s;if(a)return!1;var l;if(i){var u=e,c=r;l=this.areSimpleModelsEqual(u,c)}else{var p=e,d=r;l=p.operator===d.operator&&_t(p.conditions,d.conditions,function(f,g){return o.areSimpleModelsEqual(f,g)})}return l},t.prototype.setModelIntoUi=function(e){var r=this,o=e.operator;if(o){var i=e;i.conditions||(i.conditions=[i.condition1,i.condition2]);var s=this.validateAndUpdateConditions(i.conditions),a=this.getNumConditions();if(sa)for(var l=a;l1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(c.type,!0),this.setConditionIntoUi(c,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.onUiChanged(),qe.resolve()},t.prototype.validateAndUpdateConditions=function(e){var r=e.length;return r>this.maxNumConditions&&(e.splice(this.maxNumConditions),z(function(){return console.warn('AG Grid: Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.')},"simpleFilterSetModelMaxNumConditions"),r=this.maxNumConditions),r},t.prototype.doesFilterPass=function(e){var r=this,o,i=this.getModel();if(i==null)return!0;var s=i.operator,a=[];if(s){var l=i;a.push.apply(a,Xp([],Qp((o=l.conditions)!==null&&o!==void 0?o:[])))}else a.push(i);var u=s&&s==="OR"?"some":"every";return a[u](function(c){return r.individualConditionPasses(e,c)})},t.prototype.setParams=function(e){n.prototype.setParams.call(this,e),this.setNumConditions(e),this.defaultJoinOperator=this.getDefaultJoinOperator(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.optionsFactory=new Qa,this.optionsFactory.init(e,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators()},t.prototype.setNumConditions=function(e){var r,o;e.suppressAndOrCondition!=null&&z(function(){return console.warn('AG Grid: Since v29.2 "filterParams.suppressAndOrCondition" is deprecated. Use "filterParams.maxNumConditions = 1" instead.')},"simpleFilterSuppressAndOrCondition"),e.alwaysShowBothConditions!=null&&z(function(){return console.warn('AG Grid: Since v29.2 "filterParams.alwaysShowBothConditions" is deprecated. Use "filterParams.numAlwaysVisibleConditions = 2" instead.')},"simpleFilterAlwaysShowBothConditions"),this.maxNumConditions=(r=e.maxNumConditions)!==null&&r!==void 0?r:e.suppressAndOrCondition?1:2,this.maxNumConditions<1&&(z(function(){return console.warn('AG Grid: "filterParams.maxNumConditions" must be greater than or equal to zero.')},"simpleFilterMaxNumConditions"),this.maxNumConditions=1),this.numAlwaysVisibleConditions=(o=e.numAlwaysVisibleConditions)!==null&&o!==void 0?o:e.alwaysShowBothConditions?2:1,this.numAlwaysVisibleConditions<1&&(z(function(){return console.warn('AG Grid: "filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.')},"simpleFilterNumAlwaysVisibleConditions"),this.numAlwaysVisibleConditions=1),this.numAlwaysVisibleConditions>this.maxNumConditions&&(z(function(){return console.warn('AG Grid: "filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".')},"simpleFilterNumAlwaysVisibleGreaterThanMaxNumConditions"),this.numAlwaysVisibleConditions=this.maxNumConditions)},t.prototype.createOption=function(){var e=this,r=this.createManagedBean(new Mn);this.eTypes.push(r),r.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(r.getGui());var o=this.createValueElement();this.eConditionBodies.push(o),this.eFilterBody.appendChild(o),this.putOptionsIntoDropdown(r),this.resetType(r);var i=this.getNumConditions()-1;this.forEachPositionInput(i,function(s){return e.resetInput(s)}),this.addChangedListeners(r,i)},t.prototype.createJoinOperatorPanel=function(){var e=document.createElement("div");this.eJoinOperatorPanels.push(e),e.classList.add("ag-filter-condition");var r=this.createJoinOperator(this.eJoinOperatorsAnd,e,"and"),o=this.createJoinOperator(this.eJoinOperatorsOr,e,"or");this.eFilterBody.appendChild(e);var i=this.eJoinOperatorPanels.length-1,s=this.joinOperatorId++;this.resetJoinOperatorAnd(r,i,s),this.resetJoinOperatorOr(o,i,s),this.isReadOnly()||(r.onValueChange(this.listener),o.onValueChange(this.listener))},t.prototype.createJoinOperator=function(e,r,o){var i=this.createManagedBean(new il);return e.push(i),i.addCssClass("ag-filter-condition-operator"),i.addCssClass("ag-filter-condition-operator-"+o),r.appendChild(i.getGui()),i},t.prototype.getDefaultJoinOperator=function(e){return e==="AND"||e==="OR"?e:"AND"},t.prototype.createFilterListOptions=function(){var e=this,r=this.optionsFactory.getFilterOptions();this.filterListOptions=r.map(function(o){return typeof o=="string"?e.createBoilerplateListOption(o):e.createCustomListOption(o)})},t.prototype.putOptionsIntoDropdown=function(e){this.filterListOptions.forEach(function(r){e.addOption(r)}),e.setDisabled(this.filterListOptions.length<=1)},t.prototype.createBoilerplateListOption=function(e){return{value:e,text:this.translate(e)}},t.prototype.createCustomListOption=function(e){var r=e.displayKey,o=this.optionsFactory.getCustomOption(e.displayKey);return{value:r,text:o?this.localeService.getLocaleTextFunc()(o.displayKey,o.displayName):this.translate(r)}},t.prototype.isAllowTwoConditions=function(){return this.maxNumConditions>=2},t.prototype.createBodyTemplate=function(){return""},t.prototype.getCssIdentifier=function(){return"simple-filter"},t.prototype.updateUiVisibility=function(){var e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)},t.prototype.updateNumConditions=function(){for(var e,r=-1,o=!0,i=0;i0&&this.removeConditionsAndOperators(a,l),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=r},t.prototype.updateConditionStatusesAndValues=function(e,r){var o=this;this.eTypes.forEach(function(s,a){var l=o.isConditionDisabled(a,e);s.setDisabled(l||o.filterListOptions.length<=1),a===1&&(vr(o.eJoinOperatorPanels[0],l),o.eJoinOperatorsAnd[0].setDisabled(l),o.eJoinOperatorsOr[0].setDisabled(l))}),this.eConditionBodies.forEach(function(s,a){U(s,o.isConditionBodyVisible(a))});var i=(r??this.getJoinOperator())==="OR";this.eJoinOperatorsAnd.forEach(function(s,a){s.setValue(!i,!0)}),this.eJoinOperatorsOr.forEach(function(s,a){s.setValue(i,!0)}),this.forEachInput(function(s,a,l,u){o.setElementDisplayed(s,a=this.getNumConditions())){this.removeComponents(this.eTypes,e,r),this.removeElements(this.eConditionBodies,e,r),this.removeValueElements(e,r);var o=Math.max(e-1,0);this.removeElements(this.eJoinOperatorPanels,o,r),this.removeComponents(this.eJoinOperatorsAnd,o,r),this.removeComponents(this.eJoinOperatorsOr,o,r)}},t.prototype.removeElements=function(e,r,o){var i=this.removeItems(e,r,o);i.forEach(function(s){return yt(s)})},t.prototype.removeComponents=function(e,r,o){var i=this,s=this.removeItems(e,r,o);s.forEach(function(a){yt(a.getGui()),i.destroyBean(a)})},t.prototype.removeItems=function(e,r,o){return o==null?e.splice(r):e.splice(r,o)},t.prototype.afterGuiAttached=function(e){if(n.prototype.afterGuiAttached.call(this,e),this.resetPlaceholder(),!e||!e.suppressFocus&&!this.isReadOnly()){var r=this.getInputs(0)[0];if(!r)return;r instanceof Lt&&r.getInputElement().focus()}},t.prototype.afterGuiDetached=function(){n.prototype.afterGuiDetached.call(this);var e=this.getModel();(!this.areModelsEqual(e,this.getModelFromUi())||this.hasInvalidInputs())&&this.resetUiToActiveModel(e);for(var r=-1,o=-1,i=!1,s=this.getJoinOperator(),a=this.getNumConditions()-1;a>=0;a--)if(this.isConditionUiComplete(a))r===-1&&(r=a,o=a);else{var l=a>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(a-1),u=a1?"inRangeStart":i===0?"filterOoo":"inRangeEnd",u=i===0&&a>1?r("ariaFilterFromValue","Filter from value"):i===0?r("ariaFilterValue","Filter Value"):r("ariaFilterToValue","Filter to Value");o.setInputPlaceholder(e.getPlaceholderText(l,s)),o.setInputAriaLabel(u)}})},t.prototype.setElementValue=function(e,r){e instanceof Lt&&e.setValue(r!=null?String(r):null,!0)},t.prototype.setElementDisplayed=function(e,r){e instanceof W&&U(e.getGui(),r)},t.prototype.setElementDisabled=function(e,r){e instanceof W&&vr(e.getGui(),r)},t.prototype.attachElementOnChange=function(e,r){e instanceof Lt&&e.onValueChange(r)},t.prototype.forEachInput=function(e){var r=this;this.getConditionTypes().forEach(function(o,i){r.forEachPositionTypeInput(i,o,e)})},t.prototype.forEachPositionInput=function(e,r){var o=this.getConditionType(e);this.forEachPositionTypeInput(e,o,r)},t.prototype.forEachPositionTypeInput=function(e,r,o){for(var i=this.getNumberOfInputs(r),s=this.getInputs(e),a=0;ar+1},t.prototype.isConditionBodyVisible=function(e){var r=this.getConditionType(e),o=this.getNumberOfInputs(r);return o>0},t.prototype.isConditionUiComplete=function(e){if(e>=this.getNumConditions())return!1;var r=this.getConditionType(e);return!(r===t.EMPTY||this.getValues(e).some(function(o){return o==null}))},t.prototype.getNumConditions=function(){return this.eTypes.length},t.prototype.getUiCompleteConditions=function(){for(var e=[],r=0;r0)},t.prototype.resetInput=function(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())},t.prototype.setConditionIntoUi=function(e,r){var o=this,i=this.mapValuesFromModel(e);this.forEachInput(function(s,a,l,u){l===r&&o.setElementValue(s,i[a]!=null?i[a]:null)})},t.prototype.setValueFromFloatingFilter=function(e){var r=this;this.forEachInput(function(o,i,s,a){r.setElementValue(o,i===0&&s===0?e:null)})},t.prototype.isDefaultOperator=function(e){return e===this.defaultJoinOperator},t.prototype.addChangedListeners=function(e,r){var o=this;this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(r,function(i){o.attachElementOnChange(i,o.listener)}))},t.prototype.individualConditionPasses=function(e,r){var o=this.getCellValue(e.node),i=this.mapValuesFromModel(r),s=this.optionsFactory.getCustomOption(r.type),a=this.evaluateCustomFilter(s,i,o);return a??(o==null?this.evaluateNullValue(r.type):this.evaluateNonNullValue(i,o,r,e))},t.prototype.evaluateCustomFilter=function(e,r,o){if(e!=null){var i=e.predicate;if(i!=null&&!r.some(function(s){return s==null}))return i(r,o)}},t.prototype.isBlank=function(e){return e==null||typeof e=="string"&&e.trim().length===0},t.prototype.hasInvalidInputs=function(){return!1},t.EMPTY="empty",t.BLANK="blank",t.NOT_BLANK="notBlank",t.EQUALS="equals",t.NOT_EQUAL="notEqual",t.LESS_THAN="lessThan",t.LESS_THAN_OR_EQUAL="lessThanOrEqual",t.GREATER_THAN="greaterThan",t.GREATER_THAN_OR_EQUAL="greaterThanOrEqual",t.IN_RANGE="inRange",t.CONTAINS="contains",t.NOT_CONTAINS="notContains",t.STARTS_WITH="startsWith",t.ENDS_WITH="endsWith",t}(jo),Jp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ue=function(n){Jp(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.setParams=function(e){n.prototype.setParams.call(this,e),this.scalarFilterParams=e},t.prototype.evaluateNullValue=function(e){switch(e){case t.EQUALS:case t.NOT_EQUAL:if(this.scalarFilterParams.includeBlanksInEquals)return!0;break;case t.GREATER_THAN:case t.GREATER_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInGreaterThan)return!0;break;case t.LESS_THAN:case t.LESS_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInLessThan)return!0;break;case t.IN_RANGE:if(this.scalarFilterParams.includeBlanksInRange)return!0;break;case t.BLANK:return!0;case t.NOT_BLANK:return!1}return!1},t.prototype.evaluateNonNullValue=function(e,r,o){var i=this.comparator(),s=e[0]!=null?i(e[0],r):0;switch(o.type){case t.EQUALS:return s===0;case t.NOT_EQUAL:return s!==0;case t.GREATER_THAN:return s>0;case t.GREATER_THAN_OR_EQUAL:return s>=0;case t.LESS_THAN:return s<0;case t.LESS_THAN_OR_EQUAL:return s<=0;case t.IN_RANGE:{var a=i(e[1],r);return this.scalarFilterParams.inRangeInclusive?s>=0&&a<=0:s>0&&a<0}case t.BLANK:return this.isBlank(r);case t.NOT_BLANK:return!this.isBlank(r);default:return console.warn('AG Grid: Unexpected type of filter "'+o.type+'", it looks like the filter was configured with incorrect Filter Options'),!0}},t}(ee),nl=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Hn=function(){return Hn=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},sl=1e3,al=1/0,ll=function(n){nl(t,n);function t(e,r,o){var i=n.call(this,r,o)||this;return i.dateFilterParams=e,i}return t.prototype.conditionToString=function(e,r){var o=e.type,i=(r||{}).numberOfInputs,s=o==ee.IN_RANGE||i===2,a=Ye(e.dateFrom),l=Ye(e.dateTo),u=this.dateFilterParams.inRangeFloatingFilterDateFormat;if(s){var c=a!==null?Go(a,u):"null",p=l!==null?Go(l,u):"null";return c+"-"+p}return a!=null?Go(a,u):""+o},t}(Gn),ul=function(n){nl(t,n);function t(){var e=n.call(this,"dateFilter")||this;return e.eConditionPanelsFrom=[],e.eConditionPanelsTo=[],e.dateConditionFromComps=[],e.dateConditionToComps=[],e.minValidYear=sl,e.maxValidYear=al,e}return t.prototype.afterGuiAttached=function(e){n.prototype.afterGuiAttached.call(this,e),this.dateConditionFromComps[0].afterGuiAttached(e)},t.prototype.mapValuesFromModel=function(e){var r=e||{},o=r.dateFrom,i=r.dateTo,s=r.type;return[o&&Ye(o)||null,i&&Ye(i)||null].slice(0,this.getNumberOfInputs(s))},t.prototype.comparator=function(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this)},t.prototype.defaultComparator=function(e,r){var o=r;return r==null||oe?1:0},t.prototype.setParams=function(e){this.dateFilterParams=e,n.prototype.setParams.call(this,e);var r=function(o,i){if(e[o]!=null)if(isNaN(e[o]))console.warn("AG Grid: DateFilter "+o+" is not a number");else return e[o]==null?i:Number(e[o]);return i};this.minValidYear=r("minValidYear",sl),this.maxValidYear=r("maxValidYear",al),this.minValidYear>this.maxValidYear&&console.warn("AG Grid: DateFilter minValidYear should be <= maxValidYear"),this.filterModelFormatter=new ll(this.dateFilterParams,this.localeService,this.optionsFactory)},t.prototype.createDateCompWrapper=function(e){var r=this,o=new qa(this.getContext(),this.userComponentFactory,{onDateChanged:function(){return r.onUiChanged()},filterParams:this.dateFilterParams},e);return this.addDestroyFunc(function(){return o.destroy()}),o},t.prototype.setElementValue=function(e,r){e.setDate(r)},t.prototype.setElementDisplayed=function(e,r){e.setDisplayed(r)},t.prototype.setElementDisabled=function(e,r){e.setDisabled(r)},t.prototype.getDefaultFilterOptions=function(){return t.DEFAULT_FILTER_OPTIONS},t.prototype.createValueElement=function(){var e=document.createElement("div");return e.classList.add("ag-filter-body"),this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e},t.prototype.createFromToElement=function(e,r,o,i){var s=document.createElement("div");s.classList.add("ag-filter-"+i),s.classList.add("ag-filter-date-"+i),r.push(s),e.appendChild(s),o.push(this.createDateCompWrapper(s))},t.prototype.removeValueElements=function(e,r){this.removeDateComps(this.dateConditionFromComps,e,r),this.removeDateComps(this.dateConditionToComps,e,r),this.removeItems(this.eConditionPanelsFrom,e,r),this.removeItems(this.eConditionPanelsTo,e,r)},t.prototype.removeDateComps=function(e,r,o){var i=this.removeItems(e,r,o);i.forEach(function(s){return s.destroy()})},t.prototype.isConditionUiComplete=function(e){var r=this;if(!n.prototype.isConditionUiComplete.call(this,e))return!1;var o=function(s){return s!=null&&s.getUTCFullYear()>=r.minValidYear&&s.getUTCFullYear()<=r.maxValidYear},i=!0;return this.forEachInput(function(s,a,l,u){l!==e||!i||a>=u||(i=i&&o(s.getDate()))}),i},t.prototype.areSimpleModelsEqual=function(e,r){return e.dateFrom===r.dateFrom&&e.dateTo===r.dateTo&&e.type===r.type},t.prototype.getFilterType=function(){return"date"},t.prototype.createCondition=function(e){var r=this.getConditionType(e),o={},i=this.getValues(e);return i.length>0&&(o.dateFrom=Ve(i[0])),i.length>1&&(o.dateTo=Ve(i[1])),Hn({dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:r},o)},t.prototype.resetPlaceholder=function(){var e=this.localeService.getLocaleTextFunc(),r=this.translate("dateFormatOoo"),o=e("ariaFilterValue","Filter Value");this.forEachInput(function(i){i.setInputPlaceholder(r),i.setInputAriaLabel(o)})},t.prototype.getInputs=function(e){return e>=this.dateConditionFromComps.length?[null,null]:[this.dateConditionFromComps[e],this.dateConditionToComps[e]]},t.prototype.getValues=function(e){var r=[];return this.forEachPositionInput(e,function(o,i,s,a){i=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},rd=function(n){td(t,n);function t(){return n.call(this,` `)||this}return t.prototype.getDefaultFilterOptions=function(){return ul.DEFAULT_FILTER_OPTIONS},t.prototype.init=function(e){n.prototype.init.call(this,e),this.params=e,this.filterParams=e.filterParams,this.createDateComponent();var r=this.localeService.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(r("ariaDateFilterInput","Date Filter Input")),this.filterModelFormatter=new ll(this.filterParams,this.localeService,this.optionsFactory)},t.prototype.setEditable=function(e){U(this.eDateWrapper,e),U(this.eReadOnlyText.getGui(),!e)},t.prototype.onParentModelChanged=function(e,r){if(!(this.isEventFromFloatingFilter(r)||this.isEventFromDataChange(r))){n.prototype.setLastTypeFromModel.call(this,e);var o=!this.isReadOnly()&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(o),o){if(e){var i=e;this.dateComp.setDate(Ye(i.dateFrom))}else this.dateComp.setDate(null);this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}},t.prototype.onDateChanged=function(){var e=this,r=this.dateComp.getDate(),o=Ve(r);this.params.parentFilterInstance(function(i){if(i){var s=Ye(o);i.onFloatingFilterChanged(e.getLastType()||null,s)}})},t.prototype.createDateComponent=function(){var e=this,r=jo.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs()),o={onDateChanged:rt(this.onDateChanged.bind(this),r),filterParams:this.params.column.getColDef().filterParams};this.dateComp=new qa(this.getContext(),this.userComponentFactory,o,this.eDateWrapper),this.addDestroyFunc(function(){return e.dateComp.destroy()})},t.prototype.getFilterModelFormatter=function(){return this.filterModelFormatter},Vn([h("userComponentFactory")],t.prototype,"userComponentFactory",void 0),Vn([D("eReadOnlyText")],t.prototype,"eReadOnlyText",void 0),Vn([D("eDateWrapper")],t.prototype,"eDateWrapper",void 0),t}(cl),od=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),id=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},nd=function(n){od(t,n);function t(){return n.call(this,`
-
`)||this}return t.prototype.destroy=function(){n.prototype.destroy.call(this)},t.prototype.init=function(e){var r=this,o=this.gridOptionsService.getDocument(),i=this.eDateInput.getInputElement(),s=this.shouldUseBrowserDatePicker(e);s&&(i.type="date");var a=s&&He();this.addManagedListener(i,"mousedown",function(){r.eDateInput.isDisabled()||a||i.focus()}),this.addManagedListener(i,"input",function(p){p.target===o.activeElement&&(r.eDateInput.isDisabled()||e.onDateChanged())});var l=e.filterParams||{},u=l.minValidYear,c=l.maxValidYear;u&&(i.min=u+"-01-01"),c&&(i.max=c+"-12-31")},t.prototype.getDate=function(){return Ye(this.eDateInput.getValue())},t.prototype.setDate=function(e){this.eDateInput.setValue(Ve(e,!1))},t.prototype.setInputPlaceholder=function(e){this.eDateInput.setInputPlaceholder(e)},t.prototype.setDisabled=function(e){this.eDateInput.setDisabled(e)},t.prototype.afterGuiAttached=function(e){(!e||!e.suppressFocus)&&this.eDateInput.getInputElement().focus()},t.prototype.shouldUseBrowserDatePicker=function(e){return e.filterParams&&e.filterParams.browserDatePicker!=null?e.filterParams.browserDatePicker:Mo()||un()||He()&&ln()>=14.1},id([D("eDateInput")],t.prototype,"eDateInput",void 0),t}(W),sd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Zt=function(n){sd(t,n);function t(e,r,o){return r===void 0&&(r="ag-text-field"),o===void 0&&(o="text"),n.call(this,e,r,o)||this}return t.prototype.postConstruct=function(){n.prototype.postConstruct.call(this),this.config.allowedCharPattern&&this.preventDisallowedCharacters()},t.prototype.setValue=function(e,r){var o=n.prototype.setValue.call(this,e,r);return this.eInput.value!==e&&(this.eInput.value=O(e)?e:""),o},t.prototype.setStartValue=function(e){this.setValue(e,!0)},t.prototype.preventDisallowedCharacters=function(){var e=new RegExp("["+this.config.allowedCharPattern+"]"),r=function(o){On(o)&&o.key&&!e.test(o.key)&&o.preventDefault()};this.addManagedListener(this.eInput,"keydown",r),this.addManagedListener(this.eInput,"paste",function(o){var i,s=(i=o.clipboardData)===null||i===void 0?void 0:i.getData("text");s&&s.split("").some(function(a){return!e.test(a)})&&o.preventDefault()})},t}(Lt),ad=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Bn=function(n){ad(t,n);function t(e){return n.call(this,e,"ag-number-field","number")||this}return t.prototype.postConstruct=function(){var e=this;n.prototype.postConstruct.call(this),this.addManagedListener(this.eInput,"blur",function(){var r=parseFloat(e.eInput.value),o=isNaN(r)?"":e.normalizeValue(r.toString());e.value!==o&&e.setValue(o)}),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this)),this.eInput.step="any"},t.prototype.onWheel=function(e){document.activeElement===this.eInput&&e.preventDefault()},t.prototype.normalizeValue=function(e){if(e==="")return"";this.precision!=null&&(e=this.adjustPrecision(e));var r=parseFloat(e);return this.min!=null&&rthis.max&&(e=this.max.toString()),e},t.prototype.adjustPrecision=function(e,r){if(this.precision==null)return e;if(r){var o=parseFloat(e).toFixed(this.precision);return parseFloat(o).toString()}var i=String(e).split(".");if(i.length>1){if(i[1].length<=this.precision)return e;if(this.precision>0)return i[0]+"."+i[1].slice(0,this.precision)}return i[0]},t.prototype.setMin=function(e){return this.min===e?this:(this.min=e,Ft(this.eInput,"min",e),this)},t.prototype.setMax=function(e){return this.max===e?this:(this.max=e,Ft(this.eInput,"max",e),this)},t.prototype.setPrecision=function(e){return this.precision=e,this},t.prototype.setStep=function(e){return this.step===e?this:(this.step=e,Ft(this.eInput,"step",e),this)},t.prototype.setValue=function(e,r){var o=this;return this.setValueOrInputValue(function(i){return n.prototype.setValue.call(o,i,r)},function(){return o},e)},t.prototype.setStartValue=function(e){var r=this;return this.setValueOrInputValue(function(o){return n.prototype.setValue.call(r,o,!0)},function(o){r.eInput.value=o},e)},t.prototype.setValueOrInputValue=function(e,r,o){if(O(o)){var i=this.isScientificNotation(o);if(i&&this.eInput.validity.valid)return e(o);if(!i){o=this.adjustPrecision(o);var s=this.normalizeValue(o);i=o!=s}if(i)return r(o)}return e(o)},t.prototype.getValue=function(){if(this.eInput.validity.valid){var e=this.eInput.value;return this.isScientificNotation(e)?this.adjustPrecision(e,!0):n.prototype.getValue.call(this)}},t.prototype.isScientificNotation=function(e){return typeof e=="string"&&e.includes("e")},t}(Zt),pl=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),dl=function(n){pl(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.conditionToString=function(e,r){var o=(r||{}).numberOfInputs,i=e.type==ee.IN_RANGE||o===2;return i?e.filter+"-"+e.filterTo:e.filter!=null?""+e.filter:""+e.type},t}(Gn);function hl(n){var t=(n??{}).allowedCharPattern;return t??null}var fl=function(n){pl(t,n);function t(){var e=n.call(this,"numberFilter")||this;return e.eValuesFrom=[],e.eValuesTo=[],e}return t.prototype.mapValuesFromModel=function(e){var r=e||{},o=r.filter,i=r.filterTo,s=r.type;return[this.processValue(o),this.processValue(i)].slice(0,this.getNumberOfInputs(s))},t.prototype.getDefaultDebounceMs=function(){return 500},t.prototype.comparator=function(){return function(e,r){return e===r?0:e0&&(o.filter=i[0]),i.length>1&&(o.filterTo=i[1]),o},t.prototype.getInputs=function(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]},t.prototype.getModelAsString=function(e){var r;return(r=this.filterModelFormatter.getModelAsString(e))!==null&&r!==void 0?r:""},t.prototype.hasInvalidInputs=function(){var e=!1;return this.forEachInput(function(r){if(!r.getInputElement().validity.valid){e=!0;return}}),e},t.DEFAULT_FILTER_OPTIONS=[ue.EQUALS,ue.NOT_EQUAL,ue.LESS_THAN,ue.LESS_THAN_OR_EQUAL,ue.GREATER_THAN,ue.GREATER_THAN_OR_EQUAL,ue.IN_RANGE,ue.BLANK,ue.NOT_BLANK],t}(ue),vl=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Uo=function(){return Uo=Object.assign||function(n){for(var t,e=1,r=arguments.length;e0&&(o.filter=i[0]),i.length>1&&(o.filterTo=i[1]),o},t.prototype.getFilterType=function(){return"text"},t.prototype.areSimpleModelsEqual=function(e,r){return e.filter===r.filter&&e.filterTo===r.filterTo&&e.type===r.type},t.prototype.getInputs=function(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]},t.prototype.getValues=function(e){var r=this,o=[];return this.forEachPositionInput(e,function(i,s,a,l){if(s=0:!1},t.prototype.evaluateNonNullValue=function(e,r,o,i){var s=this,a=e.map(function(C){return s.formatter(C)})||[],l=this.formatter(r),u=this.textFilterParams,c=u.api,p=u.colDef,d=u.column,f=u.columnApi,g=u.context,y=u.textFormatter;if(o.type===ee.BLANK)return this.isBlank(r);if(o.type===ee.NOT_BLANK)return!this.isBlank(r);var m={api:c,colDef:p,column:d,columnApi:f,context:g,node:i.node,data:i.data,filterOption:o.type,value:l,textFormatter:y};return a.some(function(C){return s.matcher(Uo(Uo({},m),{filterText:C}))})},t.prototype.getModelAsString=function(e){var r;return(r=this.filterModelFormatter.getModelAsString(e))!==null&&r!==void 0?r:""},t.DEFAULT_FILTER_OPTIONS=[ee.CONTAINS,ee.NOT_CONTAINS,ee.EQUALS,ee.NOT_EQUAL,ee.STARTS_WITH,ee.ENDS_WITH,ee.BLANK,ee.NOT_BLANK],t.DEFAULT_FORMATTER=function(e){return e},t.DEFAULT_LOWERCASE_FORMATTER=function(e){return e==null?null:e.toString().toLowerCase()},t.DEFAULT_MATCHER=function(e){var r=e.filterOption,o=e.value,i=e.filterText;if(i==null)return!1;switch(r){case t.CONTAINS:return o.indexOf(i)>=0;case t.NOT_CONTAINS:return o.indexOf(i)<0;case t.EQUALS:return o===i;case t.NOT_EQUAL:return o!=i;case t.STARTS_WITH:return o.indexOf(i)===0;case t.ENDS_WITH:var s=o.lastIndexOf(i);return s>=0&&s===o.length-i.length;default:return!1}},t}(ee),yl=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),jn=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Cl=function(n){yl(t,n);function t(e){var r=n.call(this)||this;return r.params=e,r}return t.prototype.setupGui=function(e){this.eFloatingFilterTextInput=this.createManagedBean(new Zt(this.params.config)),this.eFloatingFilterTextInput.setInputAriaLabel(this.params.ariaLabel),e.appendChild(this.eFloatingFilterTextInput.getGui())},t.prototype.setEditable=function(e){this.eFloatingFilterTextInput.setDisabled(!e)},t.prototype.getValue=function(){return this.eFloatingFilterTextInput.getValue()},t.prototype.setValue=function(e,r){this.eFloatingFilterTextInput.setValue(e,r)},t.prototype.addValueChangedListener=function(e){var r=this.eFloatingFilterTextInput.getGui();this.addManagedListener(r,"input",e),this.addManagedListener(r,"keydown",e)},t}(T),ml=function(n){yl(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.postConstruct=function(){this.setTemplate(` + `)||this}return t.prototype.destroy=function(){n.prototype.destroy.call(this)},t.prototype.init=function(e){var r=this,o=this.gridOptionsService.getDocument(),i=this.eDateInput.getInputElement(),s=this.shouldUseBrowserDatePicker(e);s&&(i.type="date");var a=s&&He();this.addManagedListener(i,"mousedown",function(){r.eDateInput.isDisabled()||a||i.focus()}),this.addManagedListener(i,"input",function(p){p.target===o.activeElement&&(r.eDateInput.isDisabled()||e.onDateChanged())});var l=e.filterParams||{},u=l.minValidYear,c=l.maxValidYear;u&&(i.min=u+"-01-01"),c&&(i.max=c+"-12-31")},t.prototype.getDate=function(){return Ye(this.eDateInput.getValue())},t.prototype.setDate=function(e){this.eDateInput.setValue(Ve(e,!1))},t.prototype.setInputPlaceholder=function(e){this.eDateInput.setInputPlaceholder(e)},t.prototype.setDisabled=function(e){this.eDateInput.setDisabled(e)},t.prototype.afterGuiAttached=function(e){(!e||!e.suppressFocus)&&this.eDateInput.getInputElement().focus()},t.prototype.shouldUseBrowserDatePicker=function(e){return e.filterParams&&e.filterParams.browserDatePicker!=null?e.filterParams.browserDatePicker:Io()||un()||He()&&ln()>=14.1},id([D("eDateInput")],t.prototype,"eDateInput",void 0),t}(W),sd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Zt=function(n){sd(t,n);function t(e,r,o){return r===void 0&&(r="ag-text-field"),o===void 0&&(o="text"),n.call(this,e,r,o)||this}return t.prototype.postConstruct=function(){n.prototype.postConstruct.call(this),this.config.allowedCharPattern&&this.preventDisallowedCharacters()},t.prototype.setValue=function(e,r){var o=n.prototype.setValue.call(this,e,r);return this.eInput.value!==e&&(this.eInput.value=O(e)?e:""),o},t.prototype.setStartValue=function(e){this.setValue(e,!0)},t.prototype.preventDisallowedCharacters=function(){var e=new RegExp("["+this.config.allowedCharPattern+"]"),r=function(o){On(o)&&o.key&&!e.test(o.key)&&o.preventDefault()};this.addManagedListener(this.eInput,"keydown",r),this.addManagedListener(this.eInput,"paste",function(o){var i,s=(i=o.clipboardData)===null||i===void 0?void 0:i.getData("text");s&&s.split("").some(function(a){return!e.test(a)})&&o.preventDefault()})},t}(Lt),ad=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Bn=function(n){ad(t,n);function t(e){return n.call(this,e,"ag-number-field","number")||this}return t.prototype.postConstruct=function(){var e=this;n.prototype.postConstruct.call(this),this.addManagedListener(this.eInput,"blur",function(){var r=parseFloat(e.eInput.value),o=isNaN(r)?"":e.normalizeValue(r.toString());e.value!==o&&e.setValue(o)}),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this)),this.eInput.step="any"},t.prototype.onWheel=function(e){document.activeElement===this.eInput&&e.preventDefault()},t.prototype.normalizeValue=function(e){if(e==="")return"";this.precision!=null&&(e=this.adjustPrecision(e));var r=parseFloat(e);return this.min!=null&&rthis.max&&(e=this.max.toString()),e},t.prototype.adjustPrecision=function(e,r){if(this.precision==null)return e;if(r){var o=parseFloat(e).toFixed(this.precision);return parseFloat(o).toString()}var i=String(e).split(".");if(i.length>1){if(i[1].length<=this.precision)return e;if(this.precision>0)return i[0]+"."+i[1].slice(0,this.precision)}return i[0]},t.prototype.setMin=function(e){return this.min===e?this:(this.min=e,Ft(this.eInput,"min",e),this)},t.prototype.setMax=function(e){return this.max===e?this:(this.max=e,Ft(this.eInput,"max",e),this)},t.prototype.setPrecision=function(e){return this.precision=e,this},t.prototype.setStep=function(e){return this.step===e?this:(this.step=e,Ft(this.eInput,"step",e),this)},t.prototype.setValue=function(e,r){var o=this;return this.setValueOrInputValue(function(i){return n.prototype.setValue.call(o,i,r)},function(){return o},e)},t.prototype.setStartValue=function(e){var r=this;return this.setValueOrInputValue(function(o){return n.prototype.setValue.call(r,o,!0)},function(o){r.eInput.value=o},e)},t.prototype.setValueOrInputValue=function(e,r,o){if(O(o)){var i=this.isScientificNotation(o);if(i&&this.eInput.validity.valid)return e(o);if(!i){o=this.adjustPrecision(o);var s=this.normalizeValue(o);i=o!=s}if(i)return r(o)}return e(o)},t.prototype.getValue=function(){if(this.eInput.validity.valid){var e=this.eInput.value;return this.isScientificNotation(e)?this.adjustPrecision(e,!0):n.prototype.getValue.call(this)}},t.prototype.isScientificNotation=function(e){return typeof e=="string"&&e.includes("e")},t}(Zt),pl=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),dl=function(n){pl(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.conditionToString=function(e,r){var o=(r||{}).numberOfInputs,i=e.type==ee.IN_RANGE||o===2;return i?e.filter+"-"+e.filterTo:e.filter!=null?""+e.filter:""+e.type},t}(Gn);function hl(n){var t=(n??{}).allowedCharPattern;return t??null}var fl=function(n){pl(t,n);function t(){var e=n.call(this,"numberFilter")||this;return e.eValuesFrom=[],e.eValuesTo=[],e}return t.prototype.mapValuesFromModel=function(e){var r=e||{},o=r.filter,i=r.filterTo,s=r.type;return[this.processValue(o),this.processValue(i)].slice(0,this.getNumberOfInputs(s))},t.prototype.getDefaultDebounceMs=function(){return 500},t.prototype.comparator=function(){return function(e,r){return e===r?0:e0&&(o.filter=i[0]),i.length>1&&(o.filterTo=i[1]),o},t.prototype.getInputs=function(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]},t.prototype.getModelAsString=function(e){var r;return(r=this.filterModelFormatter.getModelAsString(e))!==null&&r!==void 0?r:""},t.prototype.hasInvalidInputs=function(){var e=!1;return this.forEachInput(function(r){if(!r.getInputElement().validity.valid){e=!0;return}}),e},t.DEFAULT_FILTER_OPTIONS=[ue.EQUALS,ue.NOT_EQUAL,ue.LESS_THAN,ue.LESS_THAN_OR_EQUAL,ue.GREATER_THAN,ue.GREATER_THAN_OR_EQUAL,ue.IN_RANGE,ue.BLANK,ue.NOT_BLANK],t}(ue),vl=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Uo=function(){return Uo=Object.assign||function(n){for(var t,e=1,r=arguments.length;e0&&(o.filter=i[0]),i.length>1&&(o.filterTo=i[1]),o},t.prototype.getFilterType=function(){return"text"},t.prototype.areSimpleModelsEqual=function(e,r){return e.filter===r.filter&&e.filterTo===r.filterTo&&e.type===r.type},t.prototype.getInputs=function(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]},t.prototype.getValues=function(e){var r=this,o=[];return this.forEachPositionInput(e,function(i,s,a,l){if(s=0:!1},t.prototype.evaluateNonNullValue=function(e,r,o,i){var s=this,a=e.map(function(C){return s.formatter(C)})||[],l=this.formatter(r),u=this.textFilterParams,c=u.api,p=u.colDef,d=u.column,f=u.columnApi,g=u.context,y=u.textFormatter;if(o.type===ee.BLANK)return this.isBlank(r);if(o.type===ee.NOT_BLANK)return!this.isBlank(r);var m={api:c,colDef:p,column:d,columnApi:f,context:g,node:i.node,data:i.data,filterOption:o.type,value:l,textFormatter:y};return a.some(function(C){return s.matcher(Uo(Uo({},m),{filterText:C}))})},t.prototype.getModelAsString=function(e){var r;return(r=this.filterModelFormatter.getModelAsString(e))!==null&&r!==void 0?r:""},t.DEFAULT_FILTER_OPTIONS=[ee.CONTAINS,ee.NOT_CONTAINS,ee.EQUALS,ee.NOT_EQUAL,ee.STARTS_WITH,ee.ENDS_WITH,ee.BLANK,ee.NOT_BLANK],t.DEFAULT_FORMATTER=function(e){return e},t.DEFAULT_LOWERCASE_FORMATTER=function(e){return e==null?null:e.toString().toLowerCase()},t.DEFAULT_MATCHER=function(e){var r=e.filterOption,o=e.value,i=e.filterText;if(i==null)return!1;switch(r){case t.CONTAINS:return o.indexOf(i)>=0;case t.NOT_CONTAINS:return o.indexOf(i)<0;case t.EQUALS:return o===i;case t.NOT_EQUAL:return o!=i;case t.STARTS_WITH:return o.indexOf(i)===0;case t.ENDS_WITH:var s=o.lastIndexOf(i);return s>=0&&s===o.length-i.length;default:return!1}},t}(ee),yl=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),jn=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Cl=function(n){yl(t,n);function t(e){var r=n.call(this)||this;return r.params=e,r}return t.prototype.setupGui=function(e){this.eFloatingFilterTextInput=this.createManagedBean(new Zt(this.params.config)),this.eFloatingFilterTextInput.setInputAriaLabel(this.params.ariaLabel),e.appendChild(this.eFloatingFilterTextInput.getGui())},t.prototype.setEditable=function(e){this.eFloatingFilterTextInput.setDisabled(!e)},t.prototype.getValue=function(){return this.eFloatingFilterTextInput.getValue()},t.prototype.setValue=function(e,r){this.eFloatingFilterTextInput.setValue(e,r)},t.prototype.addValueChangedListener=function(e){var r=this.eFloatingFilterTextInput.getGui();this.addManagedListener(r,"input",e),this.addManagedListener(r,"keydown",e)},t}(T),ml=function(n){yl(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.postConstruct=function(){this.setTemplate(` `)},t.prototype.getDefaultDebounceMs=function(){return 500},t.prototype.onParentModelChanged=function(e,r){this.isEventFromFloatingFilter(r)||this.isEventFromDataChange(r)||(this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.floatingFilterInputService.setValue(this.getFilterModelFormatter().getModelAsString(e)))},t.prototype.init=function(e){this.params=e;var r=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),o=this.localeService.getLocaleTextFunc(),i=r+" "+o("ariaFilterInput","Filter Input");if(this.floatingFilterInputService=this.createFloatingFilterInputService(i),this.floatingFilterInputService.setupGui(this.eFloatingFilterInputContainer),n.prototype.init.call(this,e),this.applyActive=jo.isUseApplyButton(this.params.filterParams),!this.isReadOnly()){var s=jo.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs()),a=rt(this.syncUpWithParentFilter.bind(this),s);this.floatingFilterInputService.addValueChangedListener(a)}},t.prototype.syncUpWithParentFilter=function(e){var r=this,o=e.key===R.ENTER;if(!(this.applyActive&&!o)){var i=this.floatingFilterInputService.getValue();this.params.filterParams.trimInput&&(i=Wn.trimInput(i),this.floatingFilterInputService.setValue(i,!0)),this.params.parentFilterInstance(function(s){s&&s.onFloatingFilterChanged(r.getLastType()||null,i||null)})}},t.prototype.setEditable=function(e){this.floatingFilterInputService.setEditable(e)},jn([h("columnModel")],t.prototype,"columnModel",void 0),jn([D("eFloatingFilterInputContainer")],t.prototype,"eFloatingFilterInputContainer",void 0),jn([P],t.prototype,"postConstruct",null),t}(cl),wl=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ld=function(n){wl(t,n);function t(e){var r=n.call(this)||this;return r.params=e,r.numberInputActive=!0,r}return t.prototype.setupGui=function(e){this.eFloatingFilterNumberInput=this.createManagedBean(new Bn),this.eFloatingFilterTextInput=this.createManagedBean(new Zt),this.eFloatingFilterTextInput.setDisabled(!0),this.eFloatingFilterNumberInput.setInputAriaLabel(this.params.ariaLabel),this.eFloatingFilterTextInput.setInputAriaLabel(this.params.ariaLabel),e.appendChild(this.eFloatingFilterNumberInput.getGui()),e.appendChild(this.eFloatingFilterTextInput.getGui())},t.prototype.setEditable=function(e){this.numberInputActive=e,this.eFloatingFilterNumberInput.setDisplayed(this.numberInputActive),this.eFloatingFilterTextInput.setDisplayed(!this.numberInputActive)},t.prototype.getValue=function(){return this.getActiveInputElement().getValue()},t.prototype.setValue=function(e,r){this.getActiveInputElement().setValue(e,r)},t.prototype.getActiveInputElement=function(){return this.numberInputActive?this.eFloatingFilterNumberInput:this.eFloatingFilterTextInput},t.prototype.addValueChangedListener=function(e){this.setupListeners(this.eFloatingFilterNumberInput.getGui(),e),this.setupListeners(this.eFloatingFilterTextInput.getGui(),e)},t.prototype.setupListeners=function(e,r){this.addManagedListener(e,"input",r),this.addManagedListener(e,"keydown",r)},t}(T),ud=function(n){wl(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.init=function(e){n.prototype.init.call(this,e),this.filterModelFormatter=new dl(this.localeService,this.optionsFactory)},t.prototype.getDefaultFilterOptions=function(){return fl.DEFAULT_FILTER_OPTIONS},t.prototype.getFilterModelFormatter=function(){return this.filterModelFormatter},t.prototype.createFloatingFilterInputService=function(e){var r=hl(this.params.filterParams);return r?this.createManagedBean(new Cl({config:{allowedCharPattern:r},ariaLabel:e})):this.createManagedBean(new ld({ariaLabel:e}))},t}(ml),cd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),pd=function(n){cd(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.init=function(e){n.prototype.init.call(this,e),this.filterModelFormatter=new gl(this.localeService,this.optionsFactory)},t.prototype.getDefaultFilterOptions=function(){return Wn.DEFAULT_FILTER_OPTIONS},t.prototype.getFilterModelFormatter=function(){return this.filterModelFormatter},t.prototype.createFloatingFilterInputService=function(e){return this.createManagedBean(new Cl({ariaLabel:e}))},t}(ml),be=function(){function n(t,e){var r=this;e===void 0&&(e=!1),this.destroyFuncs=[],this.touching=!1,this.eventService=new Et,this.eElement=t,this.preventMouseClick=e;var o=this.onTouchStart.bind(this),i=this.onTouchMove.bind(this),s=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",o,{passive:!0}),this.eElement.addEventListener("touchmove",i,{passive:!0}),this.eElement.addEventListener("touchend",s,{passive:!1}),this.destroyFuncs.push(function(){r.eElement.removeEventListener("touchstart",o,{passive:!0}),r.eElement.removeEventListener("touchmove",i,{passive:!0}),r.eElement.removeEventListener("touchend",s,{passive:!1})})}return n.prototype.getActiveTouch=function(t){for(var e=0;e0){var e=t-this.lastTapTime;if(e>n.DOUBLE_TAP_MILLIS){var r={type:n.EVENT_DOUBLE_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(r),this.lastTapTime=null}else this.lastTapTime=t}else this.lastTapTime=t},n.prototype.destroy=function(){this.destroyFuncs.forEach(function(t){return t()})},n.EVENT_TAP="tap",n.EVENT_DOUBLE_TAP="doubleTap",n.EVENT_LONG_TAP="longTap",n.DOUBLE_TAP_MILLIS=500,n}(),dd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),er=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},kn=function(n){dd(t,n);function t(e){var r=n.call(this)||this;return e||r.setTemplate(t.TEMPLATE),r}return t.prototype.attachCustomElements=function(e,r,o,i,s){this.eSortOrder=e,this.eSortAsc=r,this.eSortDesc=o,this.eSortMixed=i,this.eSortNone=s},t.prototype.setupSort=function(e,r){var o=this;r===void 0&&(r=!1),this.column=e,this.suppressOrder=r,this.setupMultiSortIndicator();var i=!!this.column.getColDef().sortable;i&&(this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addManagedListener(this.eventService,v.EVENT_SORT_CHANGED,function(){return o.onSortChanged()}),this.addManagedListener(this.eventService,v.EVENT_COLUMN_ROW_GROUP_CHANGED,function(){return o.onSortChanged()}),this.onSortChanged())},t.prototype.addInIcon=function(e,r,o){if(r!=null){var i=oe(e,this.gridOptionsService,o);i&&r.appendChild(i)}},t.prototype.onSortChanged=function(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()},t.prototype.updateIcons=function(){var e=this.sortController.getDisplaySortForColumn(this.column);if(this.eSortAsc){var r=e==="asc";U(this.eSortAsc,r,{skipAriaHidden:!0})}if(this.eSortDesc){var o=e==="desc";U(this.eSortDesc,o,{skipAriaHidden:!0})}if(this.eSortNone){var i=!this.column.getColDef().unSortIcon&&!this.gridOptionsService.is("unSortIcon"),s=e==null;U(this.eSortNone,!i&&s,{skipAriaHidden:!0})}},t.prototype.setupMultiSortIndicator=function(){var e=this;this.addInIcon("sortUnSort",this.eSortMixed,this.column);var r=this.column.getColDef().showRowGroup,o=this.gridOptionsService.isColumnsSortingCoupledToGroup();o&&r&&(this.addManagedListener(this.eventService,v.EVENT_SORT_CHANGED,function(){return e.updateMultiSortIndicator()}),this.addManagedListener(this.eventService,v.EVENT_COLUMN_ROW_GROUP_CHANGED,function(){return e.updateMultiSortIndicator()}),this.updateMultiSortIndicator())},t.prototype.updateMultiSortIndicator=function(){if(this.eSortMixed){var e=this.sortController.getDisplaySortForColumn(this.column)==="mixed";U(this.eSortMixed,e,{skipAriaHidden:!0})}},t.prototype.updateSortOrder=function(){var e=this,r;if(this.eSortOrder){var o=this.sortController.getColumnsWithSortingOrdered(),i=(r=this.sortController.getDisplaySortIndexForColumn(this.column))!==null&&r!==void 0?r:-1,s=o.some(function(l){var u;return(u=e.sortController.getDisplaySortIndexForColumn(l))!==null&&u!==void 0?u:-1>=1}),a=i>=0&&s;U(this.eSortOrder,a,{skipAriaHidden:!0}),i>=0?this.eSortOrder.innerHTML=(i+1).toString():Ae(this.eSortOrder)}},t.TEMPLATE=` @@ -90,12 +90,12 @@ For more info see: https://www.ag-grid.com/javascript-grid/packages/`;return z(f `,Un([h("columnModel")],t.prototype,"columnModel",void 0),Un([D("agOpened")],t.prototype,"eOpenIcon",void 0),Un([D("agClosed")],t.prototype,"eCloseIcon",void 0),t}(W),yd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),wr=function(n){yd(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.isPopup=function(){return!0},t.prototype.setParentComponent=function(e){e.addCssClass("ag-has-popup"),n.prototype.setParentComponent.call(this,e)},t.prototype.destroy=function(){var e=this.parentComponent,r=e&&e.isAlive();r&&e.getGui().classList.remove("ag-has-popup"),n.prototype.destroy.call(this)},t}(W),Cd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),md=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},wd=function(n){Cd(t,n);function t(){return n.call(this,t.TEMPLATE)||this}return t.prototype.init=function(e){this.params=e,this.focusAfterAttached=e.cellStartedEdit,this.eTextArea.setMaxLength(e.maxLength||200).setCols(e.cols||60).setRows(e.rows||10),O(e.value,!0)&&this.eTextArea.setValue(e.value.toString(),!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()},t.prototype.onKeyDown=function(e){var r=e.key;(r===R.LEFT||r===R.UP||r===R.RIGHT||r===R.DOWN||e.shiftKey&&r===R.ENTER)&&e.stopPropagation()},t.prototype.afterGuiAttached=function(){var e=this.localeService.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(e("ariaInputEditor","Input Editor")),this.focusAfterAttached&&this.eTextArea.getFocusableElement().focus()},t.prototype.getValue=function(){var e=this.eTextArea.getValue();return!O(e)&&!O(this.params.value)?this.params.value:this.params.parseValue(e)},t.TEMPLATE=`
-
`,md([D("eTextArea")],t.prototype,"eTextArea",void 0),t}(wr),Sd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Sl=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Ed=function(n){Sd(t,n);function t(){var e=n.call(this,'
')||this;return e.startedByEnter=!1,e}return t.prototype.init=function(e){var r=this;if(this.focusAfterAttached=e.cellStartedEdit,N(e.values)){console.warn("AG Grid: no values found for select cellEditor");return}this.startedByEnter=e.eventKey!=null?e.eventKey===R.ENTER:!1;var o=!1;e.values.forEach(function(i){var s={value:i},a=r.valueFormatterService.formatValue(e.column,null,i),l=a!=null;s.text=l?a:i,r.eSelect.addOption(s),o=o||e.value===i}),o?this.eSelect.setValue(e.value,!0):e.values.length&&this.eSelect.setValue(e.values[0],!0),this.gridOptionsService.get("editType")!=="fullRow"&&this.addManagedListener(this.eSelect,In.EVENT_ITEM_SELECTED,function(){return e.stopEditing()})},t.prototype.afterGuiAttached=function(){this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&this.eSelect.showPicker()},t.prototype.focusIn=function(){this.eSelect.getFocusableElement().focus()},t.prototype.getValue=function(){return this.eSelect.getValue()},t.prototype.isPopup=function(){return!1},Sl([h("valueFormatterService")],t.prototype,"valueFormatterService",void 0),Sl([D("eSelect")],t.prototype,"eSelect",void 0),t}(wr),_d=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Rd=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},zo=function(n){_d(t,n);function t(e){var r=n.call(this,` + `,md([D("eTextArea")],t.prototype,"eTextArea",void 0),t}(wr),Sd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Sl=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Ed=function(n){Sd(t,n);function t(){var e=n.call(this,'
')||this;return e.startedByEnter=!1,e}return t.prototype.init=function(e){var r=this;if(this.focusAfterAttached=e.cellStartedEdit,N(e.values)){console.warn("AG Grid: no values found for select cellEditor");return}this.startedByEnter=e.eventKey!=null?e.eventKey===R.ENTER:!1;var o=!1;e.values.forEach(function(i){var s={value:i},a=r.valueFormatterService.formatValue(e.column,null,i),l=a!=null;s.text=l?a:i,r.eSelect.addOption(s),o=o||e.value===i}),o?this.eSelect.setValue(e.value,!0):e.values.length&&this.eSelect.setValue(e.values[0],!0),this.gridOptionsService.get("editType")!=="fullRow"&&this.addManagedListener(this.eSelect,Mn.EVENT_ITEM_SELECTED,function(){return e.stopEditing()})},t.prototype.afterGuiAttached=function(){this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&this.eSelect.showPicker()},t.prototype.focusIn=function(){this.eSelect.getFocusableElement().focus()},t.prototype.getValue=function(){return this.eSelect.getValue()},t.prototype.isPopup=function(){return!1},Sl([h("valueFormatterService")],t.prototype,"valueFormatterService",void 0),Sl([D("eSelect")],t.prototype,"eSelect",void 0),t}(wr),_d=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Rd=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},zo=function(n){_d(t,n);function t(e){var r=n.call(this,`
`+e.getTemplate()+` -
`)||this;return r.cellEditorInput=e,r}return t.prototype.init=function(e){this.params=e;var r=this.eInput;this.cellEditorInput.init(r,e);var o;if(e.cellStartedEdit){this.focusAfterAttached=!0;var i=e.eventKey;i===R.BACKSPACE||e.eventKey===R.DELETE?o="":i&&i.length===1?o=i:(o=this.cellEditorInput.getStartValue(),i!==R.F2&&(this.highlightAllOnFocus=!0))}else this.focusAfterAttached=!1,o=this.cellEditorInput.getStartValue();o!=null&&r.setStartValue(o),this.addManagedListener(r.getGui(),"keydown",function(s){var a=s.key;(a===R.PAGE_UP||a===R.PAGE_DOWN)&&s.preventDefault()})},t.prototype.afterGuiAttached=function(){var e,r,o=this.localeService.getLocaleTextFunc(),i=this.eInput;if(i.setInputAriaLabel(o("ariaInputEditor","Input Editor")),!!this.focusAfterAttached){He()||i.getFocusableElement().focus();var s=i.getInputElement();this.highlightAllOnFocus?s.select():(r=(e=this.cellEditorInput).setCaret)===null||r===void 0||r.call(e)}},t.prototype.focusIn=function(){var e=this.eInput,r=e.getFocusableElement(),o=e.getInputElement();r.focus(),o.select()},t.prototype.getValue=function(){return this.cellEditorInput.getValue()},t.prototype.isPopup=function(){return!1},Rd([D("eInput")],t.prototype,"eInput",void 0),t}(wr),Od=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Td=function(){function n(){}return n.prototype.getTemplate=function(){return''},n.prototype.init=function(t,e){this.eInput=t,this.params=e,e.maxLength!=null&&t.setMaxLength(e.maxLength)},n.prototype.getValue=function(){var t=this.eInput.getValue();return!O(t)&&!O(this.params.value)?this.params.value:this.params.parseValue(t)},n.prototype.getStartValue=function(){var t=this.params.useFormatter||this.params.column.getColDef().refData;return t?this.params.formatValue(this.params.value):this.params.value},n.prototype.setCaret=function(){var t=this.eInput.getValue(),e=O(t)&&t.length||0;e&&this.eInput.getInputElement().setSelectionRange(e,e)},n}(),El=function(n){Od(t,n);function t(){return n.call(this,new Td)||this}return t}(zo),Pd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Dd=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Ad="↑",bd="↓",Fd=function(n){Pd(t,n);function t(){var e=n.call(this,t.TEMPLATE)||this;return e.refreshCount=0,e}return t.prototype.init=function(e){this.eValue=this.queryForHtmlElement(".ag-value-change-value"),this.eDelta=this.queryForHtmlElement(".ag-value-change-delta"),this.refresh(e)},t.prototype.showDelta=function(e,r){var o=Math.abs(r),i=e.formatValue(o),s=O(i)?i:o,a=r>=0;a?this.eDelta.innerHTML=Ad+s:this.eDelta.innerHTML=bd+s,this.eDelta.classList.toggle("ag-value-change-delta-up",a),this.eDelta.classList.toggle("ag-value-change-delta-down",!a)},t.prototype.setTimerToRemoveDelta=function(){var e=this;this.refreshCount++;var r=this.refreshCount;window.setTimeout(function(){r===e.refreshCount&&e.hideDeltaValue()},2e3)},t.prototype.hideDeltaValue=function(){this.eValue.classList.remove("ag-value-change-value-highlight"),Ae(this.eDelta)},t.prototype.refresh=function(e){var r=e.value;if(r===this.lastValue||(O(e.valueFormatted)?this.eValue.innerHTML=e.valueFormatted:O(e.value)?this.eValue.innerHTML=r:Ae(this.eValue),this.filterManager.isSuppressFlashingCellsBecauseFiltering()))return!1;if(typeof r=="number"&&typeof this.lastValue=="number"){var o=r-this.lastValue;this.showDelta(e,o)}return this.lastValue&&this.eValue.classList.add("ag-value-change-value-highlight"),this.setTimerToRemoveDelta(),this.lastValue=r,!0},t.TEMPLATE='',Dd([h("filterManager")],t.prototype,"filterManager",void 0),t}(W),xd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ld=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Md=function(n){xd(t,n);function t(){var e=n.call(this,t.TEMPLATE)||this;return e.refreshCount=0,e.eCurrent=e.queryForHtmlElement(".ag-value-slide-current"),e}return t.prototype.init=function(e){this.refresh(e)},t.prototype.addSlideAnimation=function(){var e=this;this.refreshCount++;var r=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious),this.ePrevious=pe(''),this.ePrevious.innerHTML=this.eCurrent.innerHTML,this.getGui().insertBefore(this.ePrevious,this.eCurrent),window.setTimeout(function(){r===e.refreshCount&&e.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(function(){r===e.refreshCount&&(e.getGui().removeChild(e.ePrevious),e.ePrevious=null)},3e3)},t.prototype.refresh=function(e){var r=e.value;return N(r)&&(r=""),r===this.lastValue||this.filterManager.isSuppressFlashingCellsBecauseFiltering()?!1:(this.addSlideAnimation(),this.lastValue=r,O(e.valueFormatted)?this.eCurrent.innerHTML=e.valueFormatted:O(e.value)?this.eCurrent.innerHTML=r:Ae(this.eCurrent),!0)},t.TEMPLATE=` + `)||this;return r.cellEditorInput=e,r}return t.prototype.init=function(e){this.params=e;var r=this.eInput;this.cellEditorInput.init(r,e);var o;if(e.cellStartedEdit){this.focusAfterAttached=!0;var i=e.eventKey;i===R.BACKSPACE||e.eventKey===R.DELETE?o="":i&&i.length===1?o=i:(o=this.cellEditorInput.getStartValue(),i!==R.F2&&(this.highlightAllOnFocus=!0))}else this.focusAfterAttached=!1,o=this.cellEditorInput.getStartValue();o!=null&&r.setStartValue(o),this.addManagedListener(r.getGui(),"keydown",function(s){var a=s.key;(a===R.PAGE_UP||a===R.PAGE_DOWN)&&s.preventDefault()})},t.prototype.afterGuiAttached=function(){var e,r,o=this.localeService.getLocaleTextFunc(),i=this.eInput;if(i.setInputAriaLabel(o("ariaInputEditor","Input Editor")),!!this.focusAfterAttached){He()||i.getFocusableElement().focus();var s=i.getInputElement();this.highlightAllOnFocus?s.select():(r=(e=this.cellEditorInput).setCaret)===null||r===void 0||r.call(e)}},t.prototype.focusIn=function(){var e=this.eInput,r=e.getFocusableElement(),o=e.getInputElement();r.focus(),o.select()},t.prototype.getValue=function(){return this.cellEditorInput.getValue()},t.prototype.isPopup=function(){return!1},Rd([D("eInput")],t.prototype,"eInput",void 0),t}(wr),Od=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Td=function(){function n(){}return n.prototype.getTemplate=function(){return''},n.prototype.init=function(t,e){this.eInput=t,this.params=e,e.maxLength!=null&&t.setMaxLength(e.maxLength)},n.prototype.getValue=function(){var t=this.eInput.getValue();return!O(t)&&!O(this.params.value)?this.params.value:this.params.parseValue(t)},n.prototype.getStartValue=function(){var t=this.params.useFormatter||this.params.column.getColDef().refData;return t?this.params.formatValue(this.params.value):this.params.value},n.prototype.setCaret=function(){var t=this.eInput.getValue(),e=O(t)&&t.length||0;e&&this.eInput.getInputElement().setSelectionRange(e,e)},n}(),El=function(n){Od(t,n);function t(){return n.call(this,new Td)||this}return t}(zo),Pd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Dd=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Ad="↑",bd="↓",Fd=function(n){Pd(t,n);function t(){var e=n.call(this,t.TEMPLATE)||this;return e.refreshCount=0,e}return t.prototype.init=function(e){this.eValue=this.queryForHtmlElement(".ag-value-change-value"),this.eDelta=this.queryForHtmlElement(".ag-value-change-delta"),this.refresh(e)},t.prototype.showDelta=function(e,r){var o=Math.abs(r),i=e.formatValue(o),s=O(i)?i:o,a=r>=0;a?this.eDelta.innerHTML=Ad+s:this.eDelta.innerHTML=bd+s,this.eDelta.classList.toggle("ag-value-change-delta-up",a),this.eDelta.classList.toggle("ag-value-change-delta-down",!a)},t.prototype.setTimerToRemoveDelta=function(){var e=this;this.refreshCount++;var r=this.refreshCount;window.setTimeout(function(){r===e.refreshCount&&e.hideDeltaValue()},2e3)},t.prototype.hideDeltaValue=function(){this.eValue.classList.remove("ag-value-change-value-highlight"),Ae(this.eDelta)},t.prototype.refresh=function(e){var r=e.value;if(r===this.lastValue||(O(e.valueFormatted)?this.eValue.innerHTML=e.valueFormatted:O(e.value)?this.eValue.innerHTML=r:Ae(this.eValue),this.filterManager.isSuppressFlashingCellsBecauseFiltering()))return!1;if(typeof r=="number"&&typeof this.lastValue=="number"){var o=r-this.lastValue;this.showDelta(e,o)}return this.lastValue&&this.eValue.classList.add("ag-value-change-value-highlight"),this.setTimerToRemoveDelta(),this.lastValue=r,!0},t.TEMPLATE='',Dd([h("filterManager")],t.prototype,"filterManager",void 0),t}(W),xd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ld=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Id=function(n){xd(t,n);function t(){var e=n.call(this,t.TEMPLATE)||this;return e.refreshCount=0,e.eCurrent=e.queryForHtmlElement(".ag-value-slide-current"),e}return t.prototype.init=function(e){this.refresh(e)},t.prototype.addSlideAnimation=function(){var e=this;this.refreshCount++;var r=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious),this.ePrevious=pe(''),this.ePrevious.innerHTML=this.eCurrent.innerHTML,this.getGui().insertBefore(this.ePrevious,this.eCurrent),window.setTimeout(function(){r===e.refreshCount&&e.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(function(){r===e.refreshCount&&(e.getGui().removeChild(e.ePrevious),e.ePrevious=null)},3e3)},t.prototype.refresh=function(e){var r=e.value;return N(r)&&(r=""),r===this.lastValue||this.filterManager.isSuppressFlashingCellsBecauseFiltering()?!1:(this.addSlideAnimation(),this.lastValue=r,O(e.valueFormatted)?this.eCurrent.innerHTML=e.valueFormatted:O(e.value)?this.eCurrent.innerHTML=r:Ae(this.eCurrent),!0)},t.TEMPLATE=` - `,Ld([h("filterManager")],t.prototype,"filterManager",void 0),t}(W),Sr=function(){return Sr=Object.assign||function(n){for(var t,e=1,r=arguments.length;e0?r:void 0,level:this.level}),this.id!==null&&typeof this.id=="string"&&this.id.startsWith(n.ID_PREFIX_ROW_GROUP)&&console.error("AG Grid: Row IDs cannot start with "+n.ID_PREFIX_ROW_GROUP+", this is a reserved prefix for AG Grid's row grouping feature."),this.id!==null&&typeof this.id!="string"&&(this.id=""+this.id)}else this.id=void 0;else this.id=t},n.prototype.getGroupKeys=function(t){t===void 0&&(t=!1);var e=[],r=this;for(t&&(r=r.parent);r&&r.level>=0;)e.push(r.key),r=r.parent;return e.reverse(),e},n.prototype.isPixelInRange=function(t){return!O(this.rowTop)||!O(this.rowHeight)?!1:t>=this.rowTop&&to&&(o=u)}),!e&&((r||o<10)&&(o=this.beans.gridOptionsService.getRowHeightForNode(this).height),o!=this.rowHeight)){this.setRowHeight(o);var a=this.beans.rowModel;a.onRowHeightChangedDebounced&&a.onRowHeightChangedDebounced()}}},n.prototype.setRowIndex=function(t){this.rowIndex!==t&&(this.rowIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_ROW_INDEX_CHANGED)))},n.prototype.setUiLevel=function(t){this.uiLevel!==t&&(this.uiLevel=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_UI_LEVEL_CHANGED)))},n.prototype.setExpanded=function(t,e){if(this.expanded!==t){this.expanded=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_EXPANDED_CHANGED));var r=Object.assign({},this.createGlobalRowEvent(v.EVENT_ROW_GROUP_OPENED),{expanded:t,event:e||null});this.beans.rowNodeEventThrottle.dispatchExpanded(r),this.beans.gridOptionsService.is("groupIncludeFooter")&&this.beans.rowRenderer.refreshCells({rowNodes:[this]})}},n.prototype.createGlobalRowEvent=function(t){return{type:t,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned,context:this.beans.gridOptionsService.context,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi}},n.prototype.dispatchLocalEvent=function(t){this.eventService&&this.eventService.dispatchEvent(t)},n.prototype.setDataValue=function(t,e,r){var o=this,i=function(){var u;return typeof t!="string"?t:(u=o.beans.columnModel.getGridColumn(t))!==null&&u!==void 0?u:o.beans.columnModel.getPrimaryColumn(t)},s=i(),a=this.getValueFromValueService(s);if(this.beans.gridOptionsService.is("readOnlyEdit"))return this.dispatchEventForSaveValueReadOnly(s,a,e,r),!1;var l=this.beans.valueService.setValue(this,s,e,r);return this.dispatchCellChangedEvent(s,e,a),this.checkRowSelectable(),l},n.prototype.getValueFromValueService=function(t){var e=this.leafGroup&&this.beans.columnModel.isPivotMode(),r=this.group&&this.expanded&&!this.footer&&!e,o=this.beans.gridOptionsService.is("groupIncludeFooter"),i=this.beans.gridOptionsService.is("groupSuppressBlankHeader"),s=r&&o&&!i,a=this.beans.valueService.getValue(t,this,!1,s);return a},n.prototype.dispatchEventForSaveValueReadOnly=function(t,e,r,o){var i={type:v.EVENT_CELL_EDIT_REQUEST,event:null,rowIndex:this.rowIndex,rowPinned:this.rowPinned,column:t,colDef:t.getColDef(),context:this.beans.gridOptionsService.context,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,data:this.data,node:this,oldValue:e,newValue:r,value:r,source:o};this.beans.eventService.dispatchEvent(i)},n.prototype.setGroupValue=function(t,e){var r=this.beans.columnModel.getGridColumn(t);N(this.groupData)&&(this.groupData={});var o=r.getColId(),i=this.groupData[o];i!==e&&(this.groupData[o]=e,this.dispatchCellChangedEvent(r,e,i))},n.prototype.setAggData=function(t){var e=this,r=js([this.aggData,t]),o=this.aggData;this.aggData=t,this.eventService&&r.forEach(function(i){var s=e.beans.columnModel.getGridColumn(i),a=e.aggData?e.aggData[i]:void 0,l=o?o[i]:void 0;e.dispatchCellChangedEvent(s,a,l)})},n.prototype.updateHasChildren=function(){var t=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0,e=this.beans.gridOptionsService.isRowModelType("serverSide");if(e){var r=this.beans.gridOptionsService.isTreeData(),o=this.beans.gridOptionsService.get("isServerSideGroup");t=!this.stub&&!this.footer&&(r?!!o&&o(this.data):!!this.group)}t!==this.__hasChildren&&(this.__hasChildren=!!t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_HAS_CHILDREN_CHANGED)))},n.prototype.hasChildren=function(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren},n.prototype.isEmptyRowGroupNode=function(){return this.group&&Pe(this.childrenAfterGroup)},n.prototype.dispatchCellChangedEvent=function(t,e,r){var o={type:n.EVENT_CELL_CHANGED,node:this,column:t,newValue:e,oldValue:r};this.dispatchLocalEvent(o)},n.prototype.resetQuickFilterAggregateText=function(){this.quickFilterAggregateText=null},n.prototype.isExpandable=function(){return!!(this.hasChildren()&&!this.footer||this.master)},n.prototype.isSelected=function(){return this.footer?this.sibling.isSelected():this.selected},n.prototype.depthFirstSearch=function(t){this.childrenAfterGroup&&this.childrenAfterGroup.forEach(function(e){return e.depthFirstSearch(t)}),t(this)},n.prototype.calculateSelectedFromChildren=function(){var t,e=!1,r=!1,o=!1;if(!(!((t=this.childrenAfterGroup)===null||t===void 0)&&t.length))return this.selectable?this.selected:null;for(var i=0;i=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Rl=function(n){Id(t,n);function t(){return n.call(this,` + `,Ld([h("filterManager")],t.prototype,"filterManager",void 0),t}(W),Sr=function(){return Sr=Object.assign||function(n){for(var t,e=1,r=arguments.length;e0?r:void 0,level:this.level}),this.id!==null&&typeof this.id=="string"&&this.id.startsWith(n.ID_PREFIX_ROW_GROUP)&&console.error("AG Grid: Row IDs cannot start with "+n.ID_PREFIX_ROW_GROUP+", this is a reserved prefix for AG Grid's row grouping feature."),this.id!==null&&typeof this.id!="string"&&(this.id=""+this.id)}else this.id=void 0;else this.id=t},n.prototype.getGroupKeys=function(t){t===void 0&&(t=!1);var e=[],r=this;for(t&&(r=r.parent);r&&r.level>=0;)e.push(r.key),r=r.parent;return e.reverse(),e},n.prototype.isPixelInRange=function(t){return!O(this.rowTop)||!O(this.rowHeight)?!1:t>=this.rowTop&&to&&(o=u)}),!e&&((r||o<10)&&(o=this.beans.gridOptionsService.getRowHeightForNode(this).height),o!=this.rowHeight)){this.setRowHeight(o);var a=this.beans.rowModel;a.onRowHeightChangedDebounced&&a.onRowHeightChangedDebounced()}}},n.prototype.setRowIndex=function(t){this.rowIndex!==t&&(this.rowIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_ROW_INDEX_CHANGED)))},n.prototype.setUiLevel=function(t){this.uiLevel!==t&&(this.uiLevel=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_UI_LEVEL_CHANGED)))},n.prototype.setExpanded=function(t,e){if(this.expanded!==t){this.expanded=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_EXPANDED_CHANGED));var r=Object.assign({},this.createGlobalRowEvent(v.EVENT_ROW_GROUP_OPENED),{expanded:t,event:e||null});this.beans.rowNodeEventThrottle.dispatchExpanded(r),this.beans.gridOptionsService.is("groupIncludeFooter")&&this.beans.rowRenderer.refreshCells({rowNodes:[this]})}},n.prototype.createGlobalRowEvent=function(t){return{type:t,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned,context:this.beans.gridOptionsService.context,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi}},n.prototype.dispatchLocalEvent=function(t){this.eventService&&this.eventService.dispatchEvent(t)},n.prototype.setDataValue=function(t,e,r){var o=this,i=function(){var u;return typeof t!="string"?t:(u=o.beans.columnModel.getGridColumn(t))!==null&&u!==void 0?u:o.beans.columnModel.getPrimaryColumn(t)},s=i(),a=this.getValueFromValueService(s);if(this.beans.gridOptionsService.is("readOnlyEdit"))return this.dispatchEventForSaveValueReadOnly(s,a,e,r),!1;var l=this.beans.valueService.setValue(this,s,e,r);return this.dispatchCellChangedEvent(s,e,a),this.checkRowSelectable(),l},n.prototype.getValueFromValueService=function(t){var e=this.leafGroup&&this.beans.columnModel.isPivotMode(),r=this.group&&this.expanded&&!this.footer&&!e,o=this.beans.gridOptionsService.is("groupIncludeFooter"),i=this.beans.gridOptionsService.is("groupSuppressBlankHeader"),s=r&&o&&!i,a=this.beans.valueService.getValue(t,this,!1,s);return a},n.prototype.dispatchEventForSaveValueReadOnly=function(t,e,r,o){var i={type:v.EVENT_CELL_EDIT_REQUEST,event:null,rowIndex:this.rowIndex,rowPinned:this.rowPinned,column:t,colDef:t.getColDef(),context:this.beans.gridOptionsService.context,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,data:this.data,node:this,oldValue:e,newValue:r,value:r,source:o};this.beans.eventService.dispatchEvent(i)},n.prototype.setGroupValue=function(t,e){var r=this.beans.columnModel.getGridColumn(t);N(this.groupData)&&(this.groupData={});var o=r.getColId(),i=this.groupData[o];i!==e&&(this.groupData[o]=e,this.dispatchCellChangedEvent(r,e,i))},n.prototype.setAggData=function(t){var e=this,r=js([this.aggData,t]),o=this.aggData;this.aggData=t,this.eventService&&r.forEach(function(i){var s=e.beans.columnModel.getGridColumn(i),a=e.aggData?e.aggData[i]:void 0,l=o?o[i]:void 0;e.dispatchCellChangedEvent(s,a,l)})},n.prototype.updateHasChildren=function(){var t=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0,e=this.beans.gridOptionsService.isRowModelType("serverSide");if(e){var r=this.beans.gridOptionsService.isTreeData(),o=this.beans.gridOptionsService.get("isServerSideGroup");t=!this.stub&&!this.footer&&(r?!!o&&o(this.data):!!this.group)}t!==this.__hasChildren&&(this.__hasChildren=!!t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_HAS_CHILDREN_CHANGED)))},n.prototype.hasChildren=function(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren},n.prototype.isEmptyRowGroupNode=function(){return this.group&&Pe(this.childrenAfterGroup)},n.prototype.dispatchCellChangedEvent=function(t,e,r){var o={type:n.EVENT_CELL_CHANGED,node:this,column:t,newValue:e,oldValue:r};this.dispatchLocalEvent(o)},n.prototype.resetQuickFilterAggregateText=function(){this.quickFilterAggregateText=null},n.prototype.isExpandable=function(){return!!(this.hasChildren()&&!this.footer||this.master)},n.prototype.isSelected=function(){return this.footer?this.sibling.isSelected():this.selected},n.prototype.depthFirstSearch=function(t){this.childrenAfterGroup&&this.childrenAfterGroup.forEach(function(e){return e.depthFirstSearch(t)}),t(this)},n.prototype.calculateSelectedFromChildren=function(){var t,e=!1,r=!1,o=!1;if(!(!((t=this.childrenAfterGroup)===null||t===void 0)&&t.length))return this.selectable?this.selected:null;for(var i=0;i=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Rl=function(n){Md(t,n);function t(){return n.call(this,` `)||this}return t.prototype.postConstruct=function(){this.eCheckbox.setPassive(!0),Sa(this.eCheckbox.getInputElement(),"polite")},t.prototype.getCheckboxId=function(){return this.eCheckbox.getInputElement().id},t.prototype.onDataChanged=function(){this.onSelectionChanged()},t.prototype.onSelectableChanged=function(){this.showOrHideSelect()},t.prototype.onSelectionChanged=function(){var e=this.localeService.getLocaleTextFunc(),r=this.rowNode.isSelected(),o=xo(e,r),i=e("ariaRowToggleSelection","Press Space to toggle row selection");this.eCheckbox.setValue(r,!0),this.eCheckbox.setInputAriaLabel(i+" ("+o+")")},t.prototype.onClicked=function(e,r,o){return this.rowNode.setSelectedParams({newValue:e,rangeSelect:o.shiftKey,groupSelectsFiltered:r,event:o,source:"checkboxSelected"})},t.prototype.init=function(e){var r=this;this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListener(this.eCheckbox.getInputElement(),"dblclick",function(a){ft(a)}),this.addManagedListener(this.eCheckbox.getInputElement(),"click",function(a){ft(a);var l=r.gridOptionsService.is("groupSelectsFiltered"),u=r.eCheckbox.getValue();if(r.shouldHandleIndeterminateState(u,l)){var c=r.onClicked(!0,l,a||{});c===0&&r.onClicked(!1,l,a)}else u?r.onClicked(!1,l,a):r.onClicked(!0,l,a||{})}),this.addManagedListener(this.rowNode,j.EVENT_ROW_SELECTED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.rowNode,j.EVENT_DATA_CHANGED,this.onDataChanged.bind(this)),this.addManagedListener(this.rowNode,j.EVENT_SELECTABLE_CHANGED,this.onSelectableChanged.bind(this));var o=this.gridOptionsService.get("isRowSelectable"),i=o||typeof this.getIsVisible()=="function";if(i){var s=this.showOrHideSelect.bind(this);this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_CHANGED,s),this.addManagedListener(this.rowNode,j.EVENT_DATA_CHANGED,s),this.addManagedListener(this.rowNode,j.EVENT_CELL_CHANGED,s),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")},t.prototype.shouldHandleIndeterminateState=function(e,r){return r&&(this.eCheckbox.getPreviousValue()===void 0||e===void 0)&&this.gridOptionsService.isRowModelType("clientSide")},t.prototype.showOrHideSelect=function(){var e,r,o,i,s=this.rowNode.selectable,a=this.getIsVisible();if(s)if(typeof a=="function"){var l=(e=this.overrides)===null||e===void 0?void 0:e.callbackParams,u=(r=this.column)===null||r===void 0?void 0:r.createColumnFunctionCallbackParams(this.rowNode);s=u?a($o($o({},l),u)):!1}else s=a??!1;var c=(o=this.column)===null||o===void 0?void 0:o.getColDef().showDisabledCheckboxes;if(c){this.eCheckbox.setDisabled(!s),this.setVisible(!0),this.setDisplayed(!0);return}if(!((i=this.overrides)===null||i===void 0)&&i.removeHidden){this.setDisplayed(s);return}this.setVisible(s)},t.prototype.getIsVisible=function(){var e,r;return this.overrides?this.overrides.isVisible:(r=(e=this.column)===null||e===void 0?void 0:e.getColDef())===null||r===void 0?void 0:r.checkboxSelection},_l([D("eCheckbox")],t.prototype,"eCheckbox",void 0),_l([P],t.prototype,"postConstruct",null),t}(W),Nd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),tr=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Ko=function(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ce;(function(n){n[n.ToolPanel=0]="ToolPanel",n[n.HeaderCell=1]="HeaderCell",n[n.RowDrag=2]="RowDrag",n[n.ChartPanel=3]="ChartPanel"})(Ce||(Ce={}));var Er;(function(n){n[n.Up=0]="Up",n[n.Down=1]="Down"})(Er||(Er={}));var st;(function(n){n[n.Left=0]="Left",n[n.Right=1]="Right"})(st||(st={}));var de=function(n){Nd(t,n);function t(){var r=n!==null&&n.apply(this,arguments)||this;return r.dragSourceAndParamsList=[],r.dropTargets=[],r}e=t,t.prototype.init=function(){this.ePinnedIcon=We("columnMovePin",this.gridOptionsService,null),this.eHideIcon=We("columnMoveHide",this.gridOptionsService,null),this.eMoveIcon=We("columnMoveMove",this.gridOptionsService,null),this.eLeftIcon=We("columnMoveLeft",this.gridOptionsService,null),this.eRightIcon=We("columnMoveRight",this.gridOptionsService,null),this.eGroupIcon=We("columnMoveGroup",this.gridOptionsService,null),this.eAggregateIcon=We("columnMoveValue",this.gridOptionsService,null),this.ePivotIcon=We("columnMovePivot",this.gridOptionsService,null),this.eDropNotAllowedIcon=We("dropNotAllowed",this.gridOptionsService,null)},t.prototype.addDragSource=function(r,o){o===void 0&&(o=!1);var i={eElement:r.eElement,dragStartPixels:r.dragStartPixels,onDragStart:this.onDragStart.bind(this,r),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),includeTouch:o};this.dragSourceAndParamsList.push({params:i,dragSource:r}),this.dragService.addDragSource(i)},t.prototype.removeDragSource=function(r){var o=this.dragSourceAndParamsList.find(function(i){return i.dragSource===r});o&&(this.dragService.removeDragSource(o.params),fe(this.dragSourceAndParamsList,o))},t.prototype.clearDragSourceParamsList=function(){var r=this;this.dragSourceAndParamsList.forEach(function(o){return r.dragService.removeDragSource(o.params)}),this.dragSourceAndParamsList.length=0,this.dropTargets.length=0},t.prototype.nudge=function(){this.dragging&&this.onDragging(this.eventLastTime,!0)},t.prototype.onDragStart=function(r,o){this.dragging=!0,this.dragSource=r,this.eventLastTime=o,this.dragItem=this.dragSource.getDragItem(),this.lastDropTarget=this.dragSource.dragSourceDropTarget,this.dragSource.onDragStarted&&this.dragSource.onDragStarted(),this.createGhost()},t.prototype.onDragStop=function(r){if(this.eventLastTime=null,this.dragging=!1,this.dragSource.onDragStopped&&this.dragSource.onDragStopped(),this.lastDropTarget&&this.lastDropTarget.onDragStop){var o=this.createDropTargetEvent(this.lastDropTarget,r,null,null,!1);this.lastDropTarget.onDragStop(o)}this.lastDropTarget=null,this.dragItem=null,this.removeGhost()},t.prototype.onDragging=function(r,o){var i=this,s,a,l,u,c=this.getHorizontalDirection(r),p=this.getVerticalDirection(r);this.eventLastTime=r,this.positionGhost(r);var d=this.dropTargets.filter(function(y){return i.isMouseOnDropTarget(r,y)}),f=this.findCurrentDropTarget(r,d);if(f!==this.lastDropTarget)this.leaveLastTargetIfExists(r,c,p,o),this.lastDropTarget!==null&&f===null&&((a=(s=this.dragSource).onGridExit)===null||a===void 0||a.call(s,this.dragItem)),this.lastDropTarget===null&&f!==null&&((u=(l=this.dragSource).onGridEnter)===null||u===void 0||u.call(l,this.dragItem)),this.enterDragTargetIfExists(f,r,c,p,o),this.lastDropTarget=f;else if(f&&f.onDragging){var g=this.createDropTargetEvent(f,r,c,p,o);f.onDragging(g)}},t.prototype.getAllContainersFromDropTarget=function(r){var o=r.getSecondaryContainers?r.getSecondaryContainers():null,i=[[r.getContainer()]];return o?i.concat(o):i},t.prototype.allContainersIntersect=function(r,o){var i,s;try{for(var a=Ko(o),l=a.next();!l.done;l=a.next()){var u=l.value,c=u.getBoundingClientRect();if(c.width===0||c.height===0)return!1;var p=r.clientX>=c.left&&r.clientX=c.top&&r.clientYi?st.Left:st.Right},t.prototype.getVerticalDirection=function(r){var o=this.eventLastTime&&this.eventLastTime.clientY,i=r.clientY;return o===i?null:o>i?Er.Up:Er.Down},t.prototype.createDropTargetEvent=function(r,o,i,s,a){var l=r.getContainer(),u=l.getBoundingClientRect(),c=this,p=c.gridApi,d=c.columnApi,f=c.dragItem,g=c.dragSource,y=o.clientX-u.left,m=o.clientY-u.top;return{event:o,x:y,y:m,vDirection:s,hDirection:i,dragSource:g,fromNudge:a,dragItem:f,api:p,columnApi:d,dropZoneTarget:l}},t.prototype.positionGhost=function(r){var o=this.eGhost;if(o){var i=o.getBoundingClientRect(),s=i.height,a=xa()-2,l=La()-2,u=yn(o.offsetParent),c=r.clientY,p=r.clientX,d=c-u.top-s/2,f=p-u.left-10,g=this.gridOptionsService.getDocument(),y=g.defaultView||window,m=y.pageYOffset||g.documentElement.scrollTop,C=y.pageXOffset||g.documentElement.scrollLeft;a>0&&f+o.clientWidth>a+C&&(f=a+C-o.clientWidth),f<0&&(f=0),l>0&&d+o.clientHeight>l+m&&(d=l+m-o.clientHeight),d<0&&(d=0),o.style.left=f+"px",o.style.top=d+"px"}},t.prototype.removeGhost=function(){this.eGhost&&this.eGhostParent&&this.eGhostParent.removeChild(this.eGhost),this.eGhost=null},t.prototype.createGhost=function(){this.eGhost=pe(e.GHOST_TEMPLATE),this.mouseEventService.stampTopLevelGridCompWithGridInstance(this.eGhost);var r=this.environment.getTheme().theme;r&&this.eGhost.classList.add(r),this.eGhostIcon=this.eGhost.querySelector(".ag-dnd-ghost-icon"),this.setGhostIcon(null);var o=this.eGhost.querySelector(".ag-dnd-ghost-label"),i=this.dragSource.dragItemName;Eo(i)&&(i=i()),o.innerHTML=it(i)||"",this.eGhost.style.height="25px",this.eGhost.style.top="20px",this.eGhost.style.left="20px";var s=this.gridOptionsService.getDocument(),a=null;try{a=s.fullscreenElement}catch{}finally{if(!a){var l=this.gridOptionsService.getRootNode(),u=l.querySelector("body");u?a=u:l instanceof ShadowRoot?a=l:a=l==null?void 0:l.documentElement}}this.eGhostParent=a,this.eGhostParent?this.eGhostParent.appendChild(this.eGhost):console.warn("AG Grid: could not find document body, it is needed for dragging columns")},t.prototype.setGhostIcon=function(r,o){o===void 0&&(o=!1),Ae(this.eGhostIcon);var i=null;switch(r||(r=this.dragSource.defaultIconName||e.ICON_NOT_ALLOWED),r){case e.ICON_PINNED:i=this.ePinnedIcon;break;case e.ICON_MOVE:i=this.eMoveIcon;break;case e.ICON_LEFT:i=this.eLeftIcon;break;case e.ICON_RIGHT:i=this.eRightIcon;break;case e.ICON_GROUP:i=this.eGroupIcon;break;case e.ICON_AGGREGATE:i=this.eAggregateIcon;break;case e.ICON_PIVOT:i=this.ePivotIcon;break;case e.ICON_NOT_ALLOWED:i=this.eDropNotAllowedIcon;break;case e.ICON_HIDE:i=this.eHideIcon;break}this.eGhostIcon.classList.toggle("ag-shake-left-to-right",o),!(i===this.eHideIcon&&this.gridOptionsService.is("suppressDragLeaveHidesColumns"))&&i&&this.eGhostIcon.appendChild(i)};var e;return t.ICON_PINNED="pinned",t.ICON_MOVE="move",t.ICON_LEFT="left",t.ICON_RIGHT="right",t.ICON_GROUP="group",t.ICON_AGGREGATE="aggregate",t.ICON_PIVOT="pivot",t.ICON_NOT_ALLOWED="notAllowed",t.ICON_HIDE="hide",t.GHOST_TEMPLATE=`
@@ -116,13 +116,13 @@ For more info see: https://www.ag-grid.com/javascript-grid/packages/`;return z(f
`,ah([D("eCheckbox")],t.prototype,"eCheckbox",void 0),t}(W),uh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ch=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},ph=function(n){uh(t,n);function t(){return n.call(this,`
-
`)||this}return t.prototype.init=function(e){var r=this,o;this.params=e;var i=(o=e.value)!==null&&o!==void 0?o:void 0;this.eCheckbox.setValue(i),this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(i),this.addManagedListener(this.eCheckbox,mr.EVENT_CHANGED,function(s){return r.setAriaLabel(s.selected)})},t.prototype.getValue=function(){return this.eCheckbox.getValue()},t.prototype.focusIn=function(){this.eCheckbox.getFocusableElement().focus()},t.prototype.afterGuiAttached=function(){this.params.cellStartedEdit&&this.focusIn()},t.prototype.isPopup=function(){return!1},t.prototype.setAriaLabel=function(e){var r=this.localeService.getLocaleTextFunc(),o=xo(r,e),i=r("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel(i+" ("+o+")")},ch([D("eCheckbox")],t.prototype,"eCheckbox",void 0),t}(wr),dh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),zn=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Dl=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Al=function(n,t){for(var e=0,r=t.length,o=n.length;e0&&console.warn(" Did you mean: ["+i.slice(0,3)+"]?"),console.warn("If using a custom component check it has been registered as described in: https://ag-grid.com/javascript-data-grid/components/")},zn([h("gridOptions")],t.prototype,"gridOptions",void 0),zn([P],t.prototype,"init",null),t=zn([x("userComponentRegistry")],t),t}(T),fh={propertyName:"dateComponent",cellRenderer:!1},vh={propertyName:"headerComponent",cellRenderer:!1},gh={propertyName:"headerGroupComponent",cellRenderer:!1},bl={propertyName:"cellRenderer",cellRenderer:!0},yh={propertyName:"cellEditor",cellRenderer:!1},Fl={propertyName:"innerRenderer",cellRenderer:!0},Ch={propertyName:"loadingOverlayComponent",cellRenderer:!1},mh={propertyName:"noRowsOverlayComponent",cellRenderer:!1},wh={propertyName:"tooltipComponent",cellRenderer:!1},$n={propertyName:"filter",cellRenderer:!1},Sh={propertyName:"floatingFilterComponent",cellRenderer:!1},Eh={propertyName:"toolPanel",cellRenderer:!1},_h={propertyName:"statusPanel",cellRenderer:!1},Rh={propertyName:"fullWidthCellRenderer",cellRenderer:!0},Oh={propertyName:"loadingCellRenderer",cellRenderer:!0},Th={propertyName:"groupRowRenderer",cellRenderer:!0},Ph={propertyName:"detailCellRenderer",cellRenderer:!0},Dh=function(){function n(){}return n.getFloatingFilterType=function(t){return this.filterToFloatingFilterMapping[t]},n.filterToFloatingFilterMapping={set:"agSetColumnFloatingFilter",agSetColumnFilter:"agSetColumnFloatingFilter",multi:"agMultiColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",group:"agGroupColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",number:"agNumberColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",date:"agDateColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",text:"agTextColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"},n}(),Ah=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),_r=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},bh=function(n){Ah(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.getHeaderCompDetails=function(e,r){return this.getCompDetails(e,vh,"agColumnHeader",r)},t.prototype.getHeaderGroupCompDetails=function(e){var r=e.columnGroup.getColGroupDef();return this.getCompDetails(r,gh,"agColumnGroupHeader",e)},t.prototype.getFullWidthCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,Rh,null,e,!0)},t.prototype.getFullWidthLoadingCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,Oh,"agLoadingCellRenderer",e,!0)},t.prototype.getFullWidthGroupCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,Th,"agGroupRowRenderer",e,!0)},t.prototype.getFullWidthDetailCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,Ph,"agDetailCellRenderer",e,!0)},t.prototype.getInnerRendererDetails=function(e,r){return this.getCompDetails(e,Fl,null,r)},t.prototype.getFullWidthGroupRowInnerCellRenderer=function(e,r){return this.getCompDetails(e,Fl,null,r)},t.prototype.getCellRendererDetails=function(e,r){return this.getCompDetails(e,bl,null,r)},t.prototype.getCellEditorDetails=function(e,r){return this.getCompDetails(e,yh,"agCellEditor",r,!0)},t.prototype.getFilterDetails=function(e,r,o){return this.getCompDetails(e,$n,o,r,!0)},t.prototype.getDateCompDetails=function(e){return this.getCompDetails(this.gridOptions,fh,"agDateInput",e,!0)},t.prototype.getLoadingOverlayCompDetails=function(e){return this.getCompDetails(this.gridOptions,Ch,"agLoadingOverlay",e,!0)},t.prototype.getNoRowsOverlayCompDetails=function(e){return this.getCompDetails(this.gridOptions,mh,"agNoRowsOverlay",e,!0)},t.prototype.getTooltipCompDetails=function(e){return this.getCompDetails(e.colDef,wh,"agTooltipComponent",e,!0)},t.prototype.getSetFilterCellRendererDetails=function(e,r){return this.getCompDetails(e,bl,null,r)},t.prototype.getFloatingFilterCompDetails=function(e,r,o){return this.getCompDetails(e,Sh,o,r)},t.prototype.getToolPanelCompDetails=function(e,r){return this.getCompDetails(e,Eh,null,r,!0)},t.prototype.getStatusPanelCompDetails=function(e,r){return this.getCompDetails(e,_h,null,r,!0)},t.prototype.getCompDetails=function(e,r,o,i,s){var a=this;s===void 0&&(s=!1);var l=r.propertyName,u=r.cellRenderer,c=this.getCompKeys(e,r,i),p=c.compName,d=c.jsComp,f=c.fwComp,g=c.paramsFromSelector,y=c.popupFromSelector,m=c.popupPositionFromSelector,C=function(A){var b=a.userComponentRegistry.retrieve(l,A);b&&(d=b.componentFromFramework?void 0:b.component,f=b.componentFromFramework?b.component:void 0)};if(p!=null&&C(p),d==null&&f==null&&o!=null&&C(o),d&&u&&!this.agComponentUtils.doesImplementIComponent(d)&&(d=this.agComponentUtils.adaptFunction(l,d)),!d&&!f){s&&console.error("AG Grid: Could not find component "+p+", did you forget to configure this component?");return}var w=this.mergeParamsWithApplicationProvidedParams(e,r,i,g),S=d==null,E=d||f;return{componentFromFramework:S,componentClass:E,params:w,type:r,popupFromSelector:y,popupPositionFromSelector:m,newAgStackInstance:function(){return a.newAgStackInstance(E,S,w,r)}}},t.prototype.getCompKeys=function(e,r,o){var i=this,s=r.propertyName,a,l,u,c,p,d;if(e){var f=e,g=f[s+"Selector"],y=g?g(o):null,m=function(C){if(typeof C=="string")a=C;else if(C!=null&&C!==!0){var w=i.getFrameworkOverrides().isFrameworkComponent(C);w?u=C:l=C}};y?(m(y.component),c=y.params,p=y.popup,d=y.popupPosition):m(f[s])}return{compName:a,jsComp:l,fwComp:u,paramsFromSelector:c,popupFromSelector:p,popupPositionFromSelector:d}},t.prototype.newAgStackInstance=function(e,r,o,i){var s=i.propertyName,a=!r,l;if(a)l=new e;else{var u=this.componentMetadataProvider.retrieve(s);l=this.frameworkComponentWrapper.wrap(e,u.mandatoryMethodList,u.optionalMethodList,i)}var c=this.initComponent(l,o);return c==null?qe.resolve(l):c.then(function(){return l})},t.prototype.mergeParamsWithApplicationProvidedParams=function(e,r,o,i){i===void 0&&(i=null);var s={context:this.gridOptionsService.context,columnApi:this.gridOptionsService.columnApi,api:this.gridOptionsService.api};De(s,o);var a=e,l=a&&a[r.propertyName+"Params"];if(typeof l=="function"){var u=l(o);De(s,u)}else typeof l=="object"&&De(s,l);return De(s,i),s},t.prototype.initComponent=function(e,r){if(this.context.createBean(e),e.init!=null)return e.init(r)},t.prototype.getDefaultFloatingFilterType=function(e,r){if(e==null)return null;var o=null,i=this.getCompKeys(e,$n),s=i.compName,a=i.jsComp,l=i.fwComp;if(s)o=Dh.getFloatingFilterType(s);else{var u=a==null&&l==null&&e.filter===!0;u&&(o=r())}return o},_r([h("gridOptions")],t.prototype,"gridOptions",void 0),_r([h("agComponentUtils")],t.prototype,"agComponentUtils",void 0),_r([h("componentMetadataProvider")],t.prototype,"componentMetadataProvider",void 0),_r([h("userComponentRegistry")],t.prototype,"userComponentRegistry",void 0),_r([Y("frameworkComponentWrapper")],t.prototype,"frameworkComponentWrapper",void 0),t=_r([x("userComponentFactory")],t),t}(T),Xo;(function(n){n[n.SINGLE_SHEET=0]="SINGLE_SHEET",n[n.MULTI_SHEET=1]="MULTI_SHEET"})(Xo||(Xo={}));var Fh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Kn=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},xh=function(n){Fh(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.dragEndFunctions=[],e.dragSources=[],e}return t.prototype.removeAllListeners=function(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0},t.prototype.removeListener=function(e){var r=e.dragSource.eElement,o=e.mouseDownListener;if(r.removeEventListener("mousedown",o),e.touchEnabled){var i=e.touchStartListener;r.removeEventListener("touchstart",i,{passive:!0})}},t.prototype.removeDragSource=function(e){var r=this.dragSources.find(function(o){return o.dragSource===e});r&&(this.removeListener(r),fe(this.dragSources,r))},t.prototype.isDragging=function(){return this.dragging},t.prototype.addDragSource=function(e){var r=this,o=this.onMouseDown.bind(this,e),i=e.eElement,s=e.includeTouch,a=e.stopPropagationForTouch;i.addEventListener("mousedown",o);var l=null,u=this.gridOptionsService.is("suppressTouch");s&&!u&&(l=function(c){vn(c.target)||(c.cancelable&&(c.preventDefault(),a&&c.stopPropagation()),r.onTouchStart(e,c))},i.addEventListener("touchstart",l,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:o,touchStartListener:l,touchEnabled:!!s})},t.prototype.getStartTarget=function(){return this.startTarget},t.prototype.onTouchStart=function(e,r){var o=this;this.currentDragParams=e,this.dragging=!1;var i=r.touches[0];this.touchLastTime=i,this.touchStart=i;var s=function(p){return o.onTouchMove(p,e.eElement)},a=function(p){return o.onTouchUp(p,e.eElement)},l=function(p){p.cancelable&&p.preventDefault()},u=r.target,c=[{target:this.gridOptionsService.getRootNode(),type:"touchmove",listener:l,options:{passive:!1}},{target:u,type:"touchmove",listener:s,options:{passive:!0}},{target:u,type:"touchend",listener:a,options:{passive:!0}},{target:u,type:"touchcancel",listener:a,options:{passive:!0}}];this.addTemporaryEvents(c),e.dragStartPixels===0&&this.onCommonMove(i,this.touchStart,e.eElement)},t.prototype.onMouseDown=function(e,r){var o=this,i=r;if(!(e.skipMouseEvent&&e.skipMouseEvent(r))&&!i._alreadyProcessedByDragService&&(i._alreadyProcessedByDragService=!0,r.button===0)){this.shouldPreventMouseEvent(r)&&r.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=r,this.startTarget=r.target;var s=function(p){return o.onMouseMove(p,e.eElement)},a=function(p){return o.onMouseUp(p,e.eElement)},l=function(p){return p.preventDefault()},u=this.gridOptionsService.getRootNode(),c=[{target:u,type:"mousemove",listener:s},{target:u,type:"mouseup",listener:a},{target:u,type:"contextmenu",listener:l}];this.addTemporaryEvents(c),e.dragStartPixels===0&&this.onMouseMove(r,e.eElement)}},t.prototype.addTemporaryEvents=function(e){e.forEach(function(r){var o=r.target,i=r.type,s=r.listener,a=r.options;o.addEventListener(i,s,a)}),this.dragEndFunctions.push(function(){e.forEach(function(r){var o=r.target,i=r.type,s=r.listener,a=r.options;o.removeEventListener(i,s,a)})})},t.prototype.isEventNearStartEvent=function(e,r){var o=this.currentDragParams.dragStartPixels,i=O(o)?o:4;return Tn(e,r,i)},t.prototype.getFirstActiveTouch=function(e){for(var r=0;r=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i};function rr(n){var t=n,e=t!=null&&t.getFrameworkComponentInstance!=null;return e?t.getFrameworkComponentInstance():n}var Lh=function(){function n(){this.detailGridInfoMap={},this.destroyCalled=!1}return n.prototype.registerOverlayWrapperComp=function(t){this.overlayWrapperComp=t},n.prototype.registerSideBarComp=function(t){this.sideBarComp=t},n.prototype.init=function(){var t=this;switch(this.rowModel.getType()){case"clientSide":this.clientSideRowModel=this.rowModel;break;case"infinite":this.infiniteRowModel=this.rowModel;break;case"serverSide":this.serverSideRowModel=this.rowModel;break}this.ctrlsService.whenReady(function(){t.gridBodyCtrl=t.ctrlsService.getGridBodyCtrl()})},n.prototype.__getAlignedGridService=function(){return this.alignedGridsService},n.prototype.__getContext=function(){return this.context},n.prototype.getSetterMethod=function(t){return"set"+t.charAt(0).toUpperCase()+t.substring(1)},n.prototype.__setProperty=function(t,e){this.gridOptionsService.set(t,e);var r=this.getSetterMethod(t),o=this;o[r]&&o[r](e)},n.prototype.getGridId=function(){return this.context.getGridId()},n.prototype.addDetailGridInfo=function(t,e){this.detailGridInfoMap[t]=e},n.prototype.removeDetailGridInfo=function(t){this.detailGridInfoMap[t]=void 0},n.prototype.getDetailGridInfo=function(t){return this.detailGridInfoMap[t]},n.prototype.forEachDetailGridInfo=function(t){var e=0;J(this.detailGridInfoMap,function(r,o){O(o)&&(t(o,e),e++)})},n.prototype.getDataAsCsv=function(t){if(G.__assertRegistered(L.CsvExportModule,"api.getDataAsCsv",this.context.getGridId()))return this.csvCreator.getDataAsCsv(t)},n.prototype.exportDataAsCsv=function(t){G.__assertRegistered(L.CsvExportModule,"api.exportDataAsCSv",this.context.getGridId())&&this.csvCreator.exportDataAsCsv(t)},n.prototype.getExcelExportMode=function(t){var e=this.gridOptionsService.get("defaultExcelExportParams"),r=Object.assign({exportMode:"xlsx"},e,t);return r.exportMode},n.prototype.assertNotExcelMultiSheet=function(t,e){if(!G.__assertRegistered(L.ExcelExportModule,"api."+t,this.context.getGridId()))return!1;var r=this.getExcelExportMode(e);return this.excelCreator.getFactoryMode(r)===Xo.MULTI_SHEET?(console.warn("AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'"),!1):!0},n.prototype.getDataAsExcel=function(t){if(this.assertNotExcelMultiSheet("getDataAsExcel",t))return this.excelCreator.getDataAsExcel(t)},n.prototype.exportDataAsExcel=function(t){this.assertNotExcelMultiSheet("exportDataAsExcel",t)&&this.excelCreator.exportDataAsExcel(t)},n.prototype.getSheetDataForExcel=function(t){if(G.__assertRegistered(L.ExcelExportModule,"api.getSheetDataForExcel",this.context.getGridId())){var e=this.getExcelExportMode(t);return this.excelCreator.setFactoryMode(Xo.MULTI_SHEET,e),this.excelCreator.getSheetDataForExcel(t)}},n.prototype.getMultipleSheetsAsExcel=function(t){if(G.__assertRegistered(L.ExcelExportModule,"api.getMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.getMultipleSheetsAsExcel(t)},n.prototype.exportMultipleSheetsAsExcel=function(t){if(G.__assertRegistered(L.ExcelExportModule,"api.exportMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.exportMultipleSheetsAsExcel(t)},n.prototype.setGridAriaProperty=function(t,e){if(t){var r=this.ctrlsService.getGridBodyCtrl().getGui(),o="aria-"+t;e===null?r.removeAttribute(o):r.setAttribute(o,e)}},n.prototype.logMissingRowModel=function(t){for(var e=[],r=1;r=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Ih=function(n){Mh(t,n);function t(){var r=n!==null&&n.apply(this,arguments)||this;return r.allColumnFilters=new Map,r.allColumnListeners=new Map,r.activeAggregateFilters=[],r.activeColumnFilters=[],r.quickFilter=null,r.quickFilterParts=null,r.processingFilterChange=!1,r}e=t,t.prototype.init=function(){var r=this;this.addManagedListener(this.eventService,v.EVENT_GRID_COLUMNS_CHANGED,function(){return r.onColumnsChanged()}),this.addManagedListener(this.eventService,v.EVENT_COLUMN_VALUE_CHANGED,function(){return r.refreshFiltersForAggregations()}),this.addManagedListener(this.eventService,v.EVENT_COLUMN_PIVOT_CHANGED,function(){return r.refreshFiltersForAggregations()}),this.addManagedListener(this.eventService,v.EVENT_COLUMN_PIVOT_MODE_CHANGED,function(){r.refreshFiltersForAggregations(),r.resetQuickFilterCache()}),this.addManagedListener(this.eventService,v.EVENT_NEW_COLUMNS_LOADED,function(){return r.resetQuickFilterCache()}),this.addManagedListener(this.eventService,v.EVENT_COLUMN_ROW_GROUP_CHANGED,function(){return r.resetQuickFilterCache()}),this.addManagedListener(this.eventService,v.EVENT_COLUMN_VISIBLE,function(){r.gridOptionsService.is("includeHiddenColumnsInQuickFilter")||r.resetQuickFilterCache()}),this.addManagedPropertyListener("quickFilterText",function(o){return r.setQuickFilter(o.currentValue)}),this.addManagedPropertyListener("includeHiddenColumnsInQuickFilter",function(){return r.onIncludeHiddenColumnsInQuickFilterChanged()}),this.quickFilter=this.parseQuickFilter(this.gridOptionsService.get("quickFilterText")),this.setQuickFilterParts(),this.allowShowChangeAfterFilter=this.gridOptionsService.is("allowShowChangeAfterFilter"),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",function(){return r.updateAggFiltering()})},t.prototype.isExternalFilterPresentCallback=function(){var r=this.gridOptionsService.getCallback("isExternalFilterPresent");return typeof r=="function"?r({}):!1},t.prototype.doesExternalFilterPass=function(r){var o=this.gridOptionsService.get("doesExternalFilterPass");return typeof o=="function"?o(r):!1},t.prototype.setQuickFilterParts=function(){this.quickFilterParts=this.quickFilter?this.quickFilter.split(" "):null},t.prototype.setFilterModel=function(r){var o=this,i=[],s=this.getFilterModel();if(r){var a=Pn(Object.keys(r));this.allColumnFilters.forEach(function(l,u){var c=r[u];i.push(o.setModelOnFilterWrapper(l.filterPromise,c)),a.delete(u)}),a.forEach(function(l){var u=o.columnModel.getPrimaryColumn(l)||o.columnModel.getGridColumn(l);if(!u){console.warn("AG Grid: setFilterModel() - no column found for colId: "+l);return}if(!u.isFilterAllowed()){console.warn("AG Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: "+l);return}var c=o.getOrCreateFilterWrapper(u,"NO_UI");if(!c){console.warn("AG-Grid: setFilterModel() - unable to fully apply model, unable to create filter for colId: "+l);return}i.push(o.setModelOnFilterWrapper(c.filterPromise,r[l]))})}else this.allColumnFilters.forEach(function(l){i.push(o.setModelOnFilterWrapper(l.filterPromise,null))});qe.all(i).then(function(){var l=o.getFilterModel(),u=[];o.allColumnFilters.forEach(function(c,p){var d=s?s[p]:null,f=l?l[p]:null;H.jsonEquals(d,f)||u.push(c.column)}),u.length>0&&o.onFilterChanged({columns:u})})},t.prototype.setModelOnFilterWrapper=function(r,o){return new qe(function(i){r.then(function(s){typeof s.setModel!="function"&&(console.warn("AG Grid: filter missing setModel method, which is needed for setFilterModel"),i()),(s.setModel(o)||qe.resolve()).then(function(){return i()})})})},t.prototype.getFilterModel=function(){var r={};return this.allColumnFilters.forEach(function(o,i){var s=o.filterPromise,a=s.resolveNow(null,function(u){return u});if(a==null)return null;if(typeof a.getModel!="function"){console.warn("AG Grid: filter API missing getModel method, which is needed for getFilterModel");return}var l=a.getModel();O(l)&&(r[i]=l)}),r},t.prototype.isColumnFilterPresent=function(){return this.activeColumnFilters.length>0},t.prototype.isAggregateFilterPresent=function(){return!!this.activeAggregateFilters.length},t.prototype.isExternalFilterPresent=function(){return this.externalFilterPresent},t.prototype.doAggregateFiltersPass=function(r,o){return this.doColumnFiltersPass(r,o,!0)},t.prototype.updateActiveFilters=function(){var r=this;this.activeColumnFilters.length=0,this.activeAggregateFilters.length=0;var o=function(a){return a?a.isFilterActive?a.isFilterActive():(console.warn("AG Grid: Filter is missing isFilterActive() method"),!1):!1},i=!!this.gridOptionsService.getGroupAggFiltering(),s=function(a){var l=!a.isPrimary();if(l)return!0;var u=!r.columnModel.isPivotActive(),c=a.isValueActive();return!c||!u?!1:r.columnModel.isPivotMode()?!0:i};this.allColumnFilters.forEach(function(a){if(a.filterPromise.resolveNow(!1,o)){var l=a.filterPromise.resolveNow(null,function(u){return u});s(a.column)?r.activeAggregateFilters.push(l):r.activeColumnFilters.push(l)}})},t.prototype.updateFilterFlagInColumns=function(r,o){this.allColumnFilters.forEach(function(i){var s=i.filterPromise.resolveNow(!1,function(a){return a.isFilterActive()});i.column.setFilterActive(s,r,o)})},t.prototype.isAnyFilterPresent=function(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()},t.prototype.doColumnFiltersPass=function(r,o,i){for(var s=r.data,a=r.aggData,l=i?this.activeAggregateFilters:this.activeColumnFilters,u=i?a:s,c=0;c=0})},t.prototype.doesRowPassQuickFilterCache=function(r,o){return r.quickFilterAggregateText||this.aggregateRowForQuickFilter(r),r.quickFilterAggregateText.indexOf(o)>=0},t.prototype.doesRowPassQuickFilter=function(r){var o=this,i=this.gridOptionsService.is("cacheQuickFilter");return this.quickFilterParts.every(function(s){return i?o.doesRowPassQuickFilterCache(r,s):o.doesRowPassQuickFilterNoCache(r,s)})},t.prototype.doesRowPassAggregateFilters=function(r){return!(this.isAggregateQuickFilterPresent()&&!this.doesRowPassQuickFilter(r.rowNode)||this.isAggregateFilterPresent()&&!this.doAggregateFiltersPass(r.rowNode,r.filterInstanceToSkip))},t.prototype.doesRowPassFilter=function(r){return!(this.isNonAggregateQuickFilterPresent()&&!this.doesRowPassQuickFilter(r.rowNode)||this.isExternalFilterPresent()&&!this.doesExternalFilterPass(r.rowNode)||this.isColumnFilterPresent()&&!this.doColumnFiltersPass(r.rowNode,r.filterInstanceToSkip))},t.prototype.getQuickFilterTextForColumn=function(r,o){var i=this.valueService.getValue(r,o,!0),s=r.getColDef();if(s.getQuickFilterText){var a={value:i,node:o,data:o.data,column:r,colDef:s,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};i=s.getQuickFilterText(a)}return O(i)?i.toString().toUpperCase():null},t.prototype.aggregateRowForQuickFilter=function(r){var o=this,i=[],s=this.columnModel.getAllColumnsForQuickFilter();s.forEach(function(a){var l=o.getQuickFilterTextForColumn(a,r);O(l)&&i.push(l)}),r.quickFilterAggregateText=i.join(e.QUICK_FILTER_SEPARATOR)},t.prototype.onNewRowsLoaded=function(r){this.allColumnFilters.forEach(function(o){o.filterPromise.then(function(i){i.onNewRowsLoaded&&i.onNewRowsLoaded()})}),this.updateFilterFlagInColumns(r,{afterDataChange:!0}),this.updateActiveFilters()},t.prototype.createValueGetter=function(r){var o=this;return function(i){var s=i.node;return o.valueService.getValue(r,s,!0)}},t.prototype.getFilterComponent=function(r,o,i){var s;if(i===void 0&&(i=!0),i)return((s=this.getOrCreateFilterWrapper(r,o))===null||s===void 0?void 0:s.filterPromise)||null;var a=this.cachedFilter(r);return a?a.filterPromise:null},t.prototype.isFilterActive=function(r){var o=this.cachedFilter(r);return!!o&&o.filterPromise.resolveNow(!1,function(i){return i.isFilterActive()})},t.prototype.getOrCreateFilterWrapper=function(r,o){var i=this;if(!r.isFilterAllowed())return null;var s=this.cachedFilter(r);if(s)o!=="NO_UI"&&this.putIntoGui(s,o);else{s=this.createFilterWrapper(r,o);var a=r.getColId();this.allColumnFilters.set(a,s),this.allColumnListeners.set(a,this.addManagedListener(r,X.EVENT_COL_DEF_CHANGED,function(){return i.checkDestroyFilter(a)}))}return s},t.prototype.cachedFilter=function(r){return this.allColumnFilters.get(r.getColId())},t.prototype.getDefaultFilter=function(r){var o;if(G.__isRegistered(L.SetFilterModule,this.context.getGridId()))o="agSetColumnFilter";else{var i=r.getColDef().cellDataType;i==="number"?o="agNumberColumnFilter":i==="date"||i==="dateString"?o="agDateColumnFilter":o="agTextColumnFilter"}return o},t.prototype.getDefaultFloatingFilter=function(r){var o;if(G.__isRegistered(L.SetFilterModule,this.context.getGridId()))o="agSetColumnFloatingFilter";else{var i=r.getColDef().cellDataType;i==="number"?o="agNumberColumnFloatingFilter":i==="date"||i==="dateString"?o="agDateColumnFloatingFilter":o="agTextColumnFloatingFilter"}return o},t.prototype.createFilterInstance=function(r){var o=this,i=this.getDefaultFilter(r),s=r.getColDef(),a,l=Jo(Jo({},this.createFilterParams(r,s)),{filterModifiedCallback:function(){var c={type:v.EVENT_FILTER_MODIFIED,column:r,filterInstance:a};o.eventService.dispatchEvent(c)},filterChangedCallback:function(c){var p={filterInstance:a,additionalEventAttributes:c,columns:[r]};o.callOnFilterChangedOutsideRenderCycle(p)},doesRowPassOtherFilter:function(c){return o.doesRowPassOtherFilters(a,c)}}),u=this.userComponentFactory.getFilterDetails(s,l,i);return u?{filterPromise:function(){var c=u.newAgStackInstance();return c&&c.then(function(p){return a=p}),c},compDetails:u}:{filterPromise:null,compDetails:null}},t.prototype.createFilterParams=function(r,o){var i={column:r,colDef:Li(o),rowModel:this.rowModel,filterChangedCallback:function(){},filterModifiedCallback:function(){},valueGetter:this.createValueGetter(r),doesRowPassOtherFilter:function(){return!0},api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};return i},t.prototype.createFilterWrapper=function(r,o){var i,s={column:r,filterPromise:null,compiledElement:null,guiPromise:qe.resolve(null),compDetails:null},a=this.createFilterInstance(r),l=a.filterPromise,u=a.compDetails;return s.filterPromise=(i=l==null?void 0:l())!==null&&i!==void 0?i:null,s.compDetails=u,l&&this.putIntoGui(s,o),s},t.prototype.putIntoGui=function(r,o){var i=this,s=document.createElement("div");s.className="ag-filter",r.guiPromise=new qe(function(a){r.filterPromise.then(function(l){var u=l.getGui();O(u)||console.warn("AG Grid: getGui method from filter returned "+u+", it should be a DOM element or an HTML template string."),typeof u=="string"&&(u=pe(u)),s.appendChild(u),a(s);var c={type:v.EVENT_FILTER_OPENED,column:r.column,source:o,eGui:s};i.eventService.dispatchEvent(c)})})},t.prototype.onColumnsChanged=function(){var r=this,o=[];this.allColumnFilters.forEach(function(i,s){var a;i.column.isPrimary()?a=r.columnModel.getPrimaryColumn(s):a=r.columnModel.getGridColumn(s),!a&&(o.push(i.column),r.disposeFilterWrapper(i,"columnChanged"),r.disposeColumnListener(s))}),o.length>0?this.onFilterChanged({columns:o}):this.updateDependantFilters()},t.prototype.updateDependantFilters=function(){var r=this,o=this.columnModel.getGroupAutoColumns();o==null||o.forEach(function(i){i.getColDef().filter==="agGroupColumnFilter"&&r.getOrCreateFilterWrapper(i,"NO_UI")})},t.prototype.isFilterAllowed=function(r){var o,i,s=r.isFilterAllowed();if(!s)return!1;var a=this.allColumnFilters.get(r.getColId());return(i=(o=a==null?void 0:a.filterPromise)===null||o===void 0?void 0:o.resolveNow(!0,function(l){var u,c;return typeof((u=l)===null||u===void 0?void 0:u.isFilterAllowed)=="function"?(c=l)===null||c===void 0?void 0:c.isFilterAllowed():!0}))!==null&&i!==void 0?i:!0},t.prototype.getFloatingFilterCompDetails=function(r,o){var i=this,s=r.getColDef(),a=this.createFilterParams(r,s),l=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(s,$n,a),u=this.userComponentFactory.getDefaultFloatingFilterType(s,function(){return i.getDefaultFloatingFilter(r)});u==null&&(u="agReadOnlyFloatingFilter");var c=function(d){var f=i.getFilterComponent(r,"NO_UI");f!=null&&f.then(function(g){d(rr(g))})},p={column:r,filterParams:l,currentParentModel:function(){return i.getCurrentFloatingFilterParentModel(r)},parentFilterInstance:c,showParentFilter:o,suppressFilterButton:!1};return this.userComponentFactory.getFloatingFilterCompDetails(s,p,u)},t.prototype.getCurrentFloatingFilterParentModel=function(r){var o=this.getFilterComponent(r,"NO_UI",!1);return o?o.resolveNow(null,function(i){return i&&i.getModel()}):null},t.prototype.destroyFilter=function(r,o){o===void 0&&(o="api");var i=r.getColId(),s=this.allColumnFilters.get(i);this.disposeColumnListener(i),s&&(this.disposeFilterWrapper(s,o),this.onFilterChanged({columns:[r]}))},t.prototype.disposeColumnListener=function(r){var o=this.allColumnListeners.get(r);o&&(this.allColumnListeners.delete(r),o())},t.prototype.disposeFilterWrapper=function(r,o){var i=this;r.filterPromise.then(function(s){(s.setModel(null)||qe.resolve()).then(function(){i.getContext().destroyBean(s),r.column.setFilterActive(!1,"filterDestroyed"),i.allColumnFilters.delete(r.column.getColId());var a={type:v.EVENT_FILTER_DESTROYED,source:o,column:r.column};i.eventService.dispatchEvent(a)})})},t.prototype.checkDestroyFilter=function(r){var o=this.allColumnFilters.get(r);if(o){var i=o.column,s=(i.isFilterAllowed()?this.createFilterInstance(i):{compDetails:null}).compDetails,a=function(l,u){if(!u||!l)return!0;var c=l.componentClass,p=u.componentClass,d=c===p||(c==null?void 0:c.render)&&(p==null?void 0:p.render)&&c.render===p.render;return!d};a(o.compDetails,s)&&this.destroyFilter(i,"columnChanged")}},t.prototype.destroy=function(){var r=this;n.prototype.destroy.call(this),this.allColumnFilters.forEach(function(o){return r.disposeFilterWrapper(o,"gridDestroyed")}),this.allColumnListeners.clear()};var e;return t.QUICK_FILTER_SEPARATOR=` + `)||this}return t.prototype.init=function(e){var r=this,o;this.params=e;var i=(o=e.value)!==null&&o!==void 0?o:void 0;this.eCheckbox.setValue(i),this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(i),this.addManagedListener(this.eCheckbox,mr.EVENT_CHANGED,function(s){return r.setAriaLabel(s.selected)})},t.prototype.getValue=function(){return this.eCheckbox.getValue()},t.prototype.focusIn=function(){this.eCheckbox.getFocusableElement().focus()},t.prototype.afterGuiAttached=function(){this.params.cellStartedEdit&&this.focusIn()},t.prototype.isPopup=function(){return!1},t.prototype.setAriaLabel=function(e){var r=this.localeService.getLocaleTextFunc(),o=xo(r,e),i=r("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel(i+" ("+o+")")},ch([D("eCheckbox")],t.prototype,"eCheckbox",void 0),t}(wr),dh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),zn=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Dl=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Al=function(n,t){for(var e=0,r=t.length,o=n.length;e0&&console.warn(" Did you mean: ["+i.slice(0,3)+"]?"),console.warn("If using a custom component check it has been registered as described in: https://ag-grid.com/javascript-data-grid/components/")},zn([h("gridOptions")],t.prototype,"gridOptions",void 0),zn([P],t.prototype,"init",null),t=zn([x("userComponentRegistry")],t),t}(T),fh={propertyName:"dateComponent",cellRenderer:!1},vh={propertyName:"headerComponent",cellRenderer:!1},gh={propertyName:"headerGroupComponent",cellRenderer:!1},bl={propertyName:"cellRenderer",cellRenderer:!0},yh={propertyName:"cellEditor",cellRenderer:!1},Fl={propertyName:"innerRenderer",cellRenderer:!0},Ch={propertyName:"loadingOverlayComponent",cellRenderer:!1},mh={propertyName:"noRowsOverlayComponent",cellRenderer:!1},wh={propertyName:"tooltipComponent",cellRenderer:!1},$n={propertyName:"filter",cellRenderer:!1},Sh={propertyName:"floatingFilterComponent",cellRenderer:!1},Eh={propertyName:"toolPanel",cellRenderer:!1},_h={propertyName:"statusPanel",cellRenderer:!1},Rh={propertyName:"fullWidthCellRenderer",cellRenderer:!0},Oh={propertyName:"loadingCellRenderer",cellRenderer:!0},Th={propertyName:"groupRowRenderer",cellRenderer:!0},Ph={propertyName:"detailCellRenderer",cellRenderer:!0},Dh=function(){function n(){}return n.getFloatingFilterType=function(t){return this.filterToFloatingFilterMapping[t]},n.filterToFloatingFilterMapping={set:"agSetColumnFloatingFilter",agSetColumnFilter:"agSetColumnFloatingFilter",multi:"agMultiColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",group:"agGroupColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",number:"agNumberColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",date:"agDateColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",text:"agTextColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"},n}(),Ah=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),_r=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},bh=function(n){Ah(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.getHeaderCompDetails=function(e,r){return this.getCompDetails(e,vh,"agColumnHeader",r)},t.prototype.getHeaderGroupCompDetails=function(e){var r=e.columnGroup.getColGroupDef();return this.getCompDetails(r,gh,"agColumnGroupHeader",e)},t.prototype.getFullWidthCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,Rh,null,e,!0)},t.prototype.getFullWidthLoadingCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,Oh,"agLoadingCellRenderer",e,!0)},t.prototype.getFullWidthGroupCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,Th,"agGroupRowRenderer",e,!0)},t.prototype.getFullWidthDetailCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,Ph,"agDetailCellRenderer",e,!0)},t.prototype.getInnerRendererDetails=function(e,r){return this.getCompDetails(e,Fl,null,r)},t.prototype.getFullWidthGroupRowInnerCellRenderer=function(e,r){return this.getCompDetails(e,Fl,null,r)},t.prototype.getCellRendererDetails=function(e,r){return this.getCompDetails(e,bl,null,r)},t.prototype.getCellEditorDetails=function(e,r){return this.getCompDetails(e,yh,"agCellEditor",r,!0)},t.prototype.getFilterDetails=function(e,r,o){return this.getCompDetails(e,$n,o,r,!0)},t.prototype.getDateCompDetails=function(e){return this.getCompDetails(this.gridOptions,fh,"agDateInput",e,!0)},t.prototype.getLoadingOverlayCompDetails=function(e){return this.getCompDetails(this.gridOptions,Ch,"agLoadingOverlay",e,!0)},t.prototype.getNoRowsOverlayCompDetails=function(e){return this.getCompDetails(this.gridOptions,mh,"agNoRowsOverlay",e,!0)},t.prototype.getTooltipCompDetails=function(e){return this.getCompDetails(e.colDef,wh,"agTooltipComponent",e,!0)},t.prototype.getSetFilterCellRendererDetails=function(e,r){return this.getCompDetails(e,bl,null,r)},t.prototype.getFloatingFilterCompDetails=function(e,r,o){return this.getCompDetails(e,Sh,o,r)},t.prototype.getToolPanelCompDetails=function(e,r){return this.getCompDetails(e,Eh,null,r,!0)},t.prototype.getStatusPanelCompDetails=function(e,r){return this.getCompDetails(e,_h,null,r,!0)},t.prototype.getCompDetails=function(e,r,o,i,s){var a=this;s===void 0&&(s=!1);var l=r.propertyName,u=r.cellRenderer,c=this.getCompKeys(e,r,i),p=c.compName,d=c.jsComp,f=c.fwComp,g=c.paramsFromSelector,y=c.popupFromSelector,m=c.popupPositionFromSelector,C=function(A){var b=a.userComponentRegistry.retrieve(l,A);b&&(d=b.componentFromFramework?void 0:b.component,f=b.componentFromFramework?b.component:void 0)};if(p!=null&&C(p),d==null&&f==null&&o!=null&&C(o),d&&u&&!this.agComponentUtils.doesImplementIComponent(d)&&(d=this.agComponentUtils.adaptFunction(l,d)),!d&&!f){s&&console.error("AG Grid: Could not find component "+p+", did you forget to configure this component?");return}var w=this.mergeParamsWithApplicationProvidedParams(e,r,i,g),S=d==null,E=d||f;return{componentFromFramework:S,componentClass:E,params:w,type:r,popupFromSelector:y,popupPositionFromSelector:m,newAgStackInstance:function(){return a.newAgStackInstance(E,S,w,r)}}},t.prototype.getCompKeys=function(e,r,o){var i=this,s=r.propertyName,a,l,u,c,p,d;if(e){var f=e,g=f[s+"Selector"],y=g?g(o):null,m=function(C){if(typeof C=="string")a=C;else if(C!=null&&C!==!0){var w=i.getFrameworkOverrides().isFrameworkComponent(C);w?u=C:l=C}};y?(m(y.component),c=y.params,p=y.popup,d=y.popupPosition):m(f[s])}return{compName:a,jsComp:l,fwComp:u,paramsFromSelector:c,popupFromSelector:p,popupPositionFromSelector:d}},t.prototype.newAgStackInstance=function(e,r,o,i){var s=i.propertyName,a=!r,l;if(a)l=new e;else{var u=this.componentMetadataProvider.retrieve(s);l=this.frameworkComponentWrapper.wrap(e,u.mandatoryMethodList,u.optionalMethodList,i)}var c=this.initComponent(l,o);return c==null?qe.resolve(l):c.then(function(){return l})},t.prototype.mergeParamsWithApplicationProvidedParams=function(e,r,o,i){i===void 0&&(i=null);var s={context:this.gridOptionsService.context,columnApi:this.gridOptionsService.columnApi,api:this.gridOptionsService.api};De(s,o);var a=e,l=a&&a[r.propertyName+"Params"];if(typeof l=="function"){var u=l(o);De(s,u)}else typeof l=="object"&&De(s,l);return De(s,i),s},t.prototype.initComponent=function(e,r){if(this.context.createBean(e),e.init!=null)return e.init(r)},t.prototype.getDefaultFloatingFilterType=function(e,r){if(e==null)return null;var o=null,i=this.getCompKeys(e,$n),s=i.compName,a=i.jsComp,l=i.fwComp;if(s)o=Dh.getFloatingFilterType(s);else{var u=a==null&&l==null&&e.filter===!0;u&&(o=r())}return o},_r([h("gridOptions")],t.prototype,"gridOptions",void 0),_r([h("agComponentUtils")],t.prototype,"agComponentUtils",void 0),_r([h("componentMetadataProvider")],t.prototype,"componentMetadataProvider",void 0),_r([h("userComponentRegistry")],t.prototype,"userComponentRegistry",void 0),_r([Y("frameworkComponentWrapper")],t.prototype,"frameworkComponentWrapper",void 0),t=_r([x("userComponentFactory")],t),t}(T),Xo;(function(n){n[n.SINGLE_SHEET=0]="SINGLE_SHEET",n[n.MULTI_SHEET=1]="MULTI_SHEET"})(Xo||(Xo={}));var Fh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Kn=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},xh=function(n){Fh(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.dragEndFunctions=[],e.dragSources=[],e}return t.prototype.removeAllListeners=function(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0},t.prototype.removeListener=function(e){var r=e.dragSource.eElement,o=e.mouseDownListener;if(r.removeEventListener("mousedown",o),e.touchEnabled){var i=e.touchStartListener;r.removeEventListener("touchstart",i,{passive:!0})}},t.prototype.removeDragSource=function(e){var r=this.dragSources.find(function(o){return o.dragSource===e});r&&(this.removeListener(r),fe(this.dragSources,r))},t.prototype.isDragging=function(){return this.dragging},t.prototype.addDragSource=function(e){var r=this,o=this.onMouseDown.bind(this,e),i=e.eElement,s=e.includeTouch,a=e.stopPropagationForTouch;i.addEventListener("mousedown",o);var l=null,u=this.gridOptionsService.is("suppressTouch");s&&!u&&(l=function(c){vn(c.target)||(c.cancelable&&(c.preventDefault(),a&&c.stopPropagation()),r.onTouchStart(e,c))},i.addEventListener("touchstart",l,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:o,touchStartListener:l,touchEnabled:!!s})},t.prototype.getStartTarget=function(){return this.startTarget},t.prototype.onTouchStart=function(e,r){var o=this;this.currentDragParams=e,this.dragging=!1;var i=r.touches[0];this.touchLastTime=i,this.touchStart=i;var s=function(p){return o.onTouchMove(p,e.eElement)},a=function(p){return o.onTouchUp(p,e.eElement)},l=function(p){p.cancelable&&p.preventDefault()},u=r.target,c=[{target:this.gridOptionsService.getRootNode(),type:"touchmove",listener:l,options:{passive:!1}},{target:u,type:"touchmove",listener:s,options:{passive:!0}},{target:u,type:"touchend",listener:a,options:{passive:!0}},{target:u,type:"touchcancel",listener:a,options:{passive:!0}}];this.addTemporaryEvents(c),e.dragStartPixels===0&&this.onCommonMove(i,this.touchStart,e.eElement)},t.prototype.onMouseDown=function(e,r){var o=this,i=r;if(!(e.skipMouseEvent&&e.skipMouseEvent(r))&&!i._alreadyProcessedByDragService&&(i._alreadyProcessedByDragService=!0,r.button===0)){this.shouldPreventMouseEvent(r)&&r.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=r,this.startTarget=r.target;var s=function(p){return o.onMouseMove(p,e.eElement)},a=function(p){return o.onMouseUp(p,e.eElement)},l=function(p){return p.preventDefault()},u=this.gridOptionsService.getRootNode(),c=[{target:u,type:"mousemove",listener:s},{target:u,type:"mouseup",listener:a},{target:u,type:"contextmenu",listener:l}];this.addTemporaryEvents(c),e.dragStartPixels===0&&this.onMouseMove(r,e.eElement)}},t.prototype.addTemporaryEvents=function(e){e.forEach(function(r){var o=r.target,i=r.type,s=r.listener,a=r.options;o.addEventListener(i,s,a)}),this.dragEndFunctions.push(function(){e.forEach(function(r){var o=r.target,i=r.type,s=r.listener,a=r.options;o.removeEventListener(i,s,a)})})},t.prototype.isEventNearStartEvent=function(e,r){var o=this.currentDragParams.dragStartPixels,i=O(o)?o:4;return Tn(e,r,i)},t.prototype.getFirstActiveTouch=function(e){for(var r=0;r=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i};function rr(n){var t=n,e=t!=null&&t.getFrameworkComponentInstance!=null;return e?t.getFrameworkComponentInstance():n}var Lh=function(){function n(){this.detailGridInfoMap={},this.destroyCalled=!1}return n.prototype.registerOverlayWrapperComp=function(t){this.overlayWrapperComp=t},n.prototype.registerSideBarComp=function(t){this.sideBarComp=t},n.prototype.init=function(){var t=this;switch(this.rowModel.getType()){case"clientSide":this.clientSideRowModel=this.rowModel;break;case"infinite":this.infiniteRowModel=this.rowModel;break;case"serverSide":this.serverSideRowModel=this.rowModel;break}this.ctrlsService.whenReady(function(){t.gridBodyCtrl=t.ctrlsService.getGridBodyCtrl()})},n.prototype.__getAlignedGridService=function(){return this.alignedGridsService},n.prototype.__getContext=function(){return this.context},n.prototype.getSetterMethod=function(t){return"set"+t.charAt(0).toUpperCase()+t.substring(1)},n.prototype.__setProperty=function(t,e){this.gridOptionsService.set(t,e);var r=this.getSetterMethod(t),o=this;o[r]&&o[r](e)},n.prototype.getGridId=function(){return this.context.getGridId()},n.prototype.addDetailGridInfo=function(t,e){this.detailGridInfoMap[t]=e},n.prototype.removeDetailGridInfo=function(t){this.detailGridInfoMap[t]=void 0},n.prototype.getDetailGridInfo=function(t){return this.detailGridInfoMap[t]},n.prototype.forEachDetailGridInfo=function(t){var e=0;J(this.detailGridInfoMap,function(r,o){O(o)&&(t(o,e),e++)})},n.prototype.getDataAsCsv=function(t){if(G.__assertRegistered(L.CsvExportModule,"api.getDataAsCsv",this.context.getGridId()))return this.csvCreator.getDataAsCsv(t)},n.prototype.exportDataAsCsv=function(t){G.__assertRegistered(L.CsvExportModule,"api.exportDataAsCSv",this.context.getGridId())&&this.csvCreator.exportDataAsCsv(t)},n.prototype.getExcelExportMode=function(t){var e=this.gridOptionsService.get("defaultExcelExportParams"),r=Object.assign({exportMode:"xlsx"},e,t);return r.exportMode},n.prototype.assertNotExcelMultiSheet=function(t,e){if(!G.__assertRegistered(L.ExcelExportModule,"api."+t,this.context.getGridId()))return!1;var r=this.getExcelExportMode(e);return this.excelCreator.getFactoryMode(r)===Xo.MULTI_SHEET?(console.warn("AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'"),!1):!0},n.prototype.getDataAsExcel=function(t){if(this.assertNotExcelMultiSheet("getDataAsExcel",t))return this.excelCreator.getDataAsExcel(t)},n.prototype.exportDataAsExcel=function(t){this.assertNotExcelMultiSheet("exportDataAsExcel",t)&&this.excelCreator.exportDataAsExcel(t)},n.prototype.getSheetDataForExcel=function(t){if(G.__assertRegistered(L.ExcelExportModule,"api.getSheetDataForExcel",this.context.getGridId())){var e=this.getExcelExportMode(t);return this.excelCreator.setFactoryMode(Xo.MULTI_SHEET,e),this.excelCreator.getSheetDataForExcel(t)}},n.prototype.getMultipleSheetsAsExcel=function(t){if(G.__assertRegistered(L.ExcelExportModule,"api.getMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.getMultipleSheetsAsExcel(t)},n.prototype.exportMultipleSheetsAsExcel=function(t){if(G.__assertRegistered(L.ExcelExportModule,"api.exportMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.exportMultipleSheetsAsExcel(t)},n.prototype.setGridAriaProperty=function(t,e){if(t){var r=this.ctrlsService.getGridBodyCtrl().getGui(),o="aria-"+t;e===null?r.removeAttribute(o):r.setAttribute(o,e)}},n.prototype.logMissingRowModel=function(t){for(var e=[],r=1;r=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Mh=function(n){Ih(t,n);function t(){var r=n!==null&&n.apply(this,arguments)||this;return r.allColumnFilters=new Map,r.allColumnListeners=new Map,r.activeAggregateFilters=[],r.activeColumnFilters=[],r.quickFilter=null,r.quickFilterParts=null,r.processingFilterChange=!1,r}e=t,t.prototype.init=function(){var r=this;this.addManagedListener(this.eventService,v.EVENT_GRID_COLUMNS_CHANGED,function(){return r.onColumnsChanged()}),this.addManagedListener(this.eventService,v.EVENT_COLUMN_VALUE_CHANGED,function(){return r.refreshFiltersForAggregations()}),this.addManagedListener(this.eventService,v.EVENT_COLUMN_PIVOT_CHANGED,function(){return r.refreshFiltersForAggregations()}),this.addManagedListener(this.eventService,v.EVENT_COLUMN_PIVOT_MODE_CHANGED,function(){r.refreshFiltersForAggregations(),r.resetQuickFilterCache()}),this.addManagedListener(this.eventService,v.EVENT_NEW_COLUMNS_LOADED,function(){return r.resetQuickFilterCache()}),this.addManagedListener(this.eventService,v.EVENT_COLUMN_ROW_GROUP_CHANGED,function(){return r.resetQuickFilterCache()}),this.addManagedListener(this.eventService,v.EVENT_COLUMN_VISIBLE,function(){r.gridOptionsService.is("includeHiddenColumnsInQuickFilter")||r.resetQuickFilterCache()}),this.addManagedPropertyListener("quickFilterText",function(o){return r.setQuickFilter(o.currentValue)}),this.addManagedPropertyListener("includeHiddenColumnsInQuickFilter",function(){return r.onIncludeHiddenColumnsInQuickFilterChanged()}),this.quickFilter=this.parseQuickFilter(this.gridOptionsService.get("quickFilterText")),this.setQuickFilterParts(),this.allowShowChangeAfterFilter=this.gridOptionsService.is("allowShowChangeAfterFilter"),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",function(){return r.updateAggFiltering()})},t.prototype.isExternalFilterPresentCallback=function(){var r=this.gridOptionsService.getCallback("isExternalFilterPresent");return typeof r=="function"?r({}):!1},t.prototype.doesExternalFilterPass=function(r){var o=this.gridOptionsService.get("doesExternalFilterPass");return typeof o=="function"?o(r):!1},t.prototype.setQuickFilterParts=function(){this.quickFilterParts=this.quickFilter?this.quickFilter.split(" "):null},t.prototype.setFilterModel=function(r){var o=this,i=[],s=this.getFilterModel();if(r){var a=Pn(Object.keys(r));this.allColumnFilters.forEach(function(l,u){var c=r[u];i.push(o.setModelOnFilterWrapper(l.filterPromise,c)),a.delete(u)}),a.forEach(function(l){var u=o.columnModel.getPrimaryColumn(l)||o.columnModel.getGridColumn(l);if(!u){console.warn("AG Grid: setFilterModel() - no column found for colId: "+l);return}if(!u.isFilterAllowed()){console.warn("AG Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: "+l);return}var c=o.getOrCreateFilterWrapper(u,"NO_UI");if(!c){console.warn("AG-Grid: setFilterModel() - unable to fully apply model, unable to create filter for colId: "+l);return}i.push(o.setModelOnFilterWrapper(c.filterPromise,r[l]))})}else this.allColumnFilters.forEach(function(l){i.push(o.setModelOnFilterWrapper(l.filterPromise,null))});qe.all(i).then(function(){var l=o.getFilterModel(),u=[];o.allColumnFilters.forEach(function(c,p){var d=s?s[p]:null,f=l?l[p]:null;H.jsonEquals(d,f)||u.push(c.column)}),u.length>0&&o.onFilterChanged({columns:u})})},t.prototype.setModelOnFilterWrapper=function(r,o){return new qe(function(i){r.then(function(s){typeof s.setModel!="function"&&(console.warn("AG Grid: filter missing setModel method, which is needed for setFilterModel"),i()),(s.setModel(o)||qe.resolve()).then(function(){return i()})})})},t.prototype.getFilterModel=function(){var r={};return this.allColumnFilters.forEach(function(o,i){var s=o.filterPromise,a=s.resolveNow(null,function(u){return u});if(a==null)return null;if(typeof a.getModel!="function"){console.warn("AG Grid: filter API missing getModel method, which is needed for getFilterModel");return}var l=a.getModel();O(l)&&(r[i]=l)}),r},t.prototype.isColumnFilterPresent=function(){return this.activeColumnFilters.length>0},t.prototype.isAggregateFilterPresent=function(){return!!this.activeAggregateFilters.length},t.prototype.isExternalFilterPresent=function(){return this.externalFilterPresent},t.prototype.doAggregateFiltersPass=function(r,o){return this.doColumnFiltersPass(r,o,!0)},t.prototype.updateActiveFilters=function(){var r=this;this.activeColumnFilters.length=0,this.activeAggregateFilters.length=0;var o=function(a){return a?a.isFilterActive?a.isFilterActive():(console.warn("AG Grid: Filter is missing isFilterActive() method"),!1):!1},i=!!this.gridOptionsService.getGroupAggFiltering(),s=function(a){var l=!a.isPrimary();if(l)return!0;var u=!r.columnModel.isPivotActive(),c=a.isValueActive();return!c||!u?!1:r.columnModel.isPivotMode()?!0:i};this.allColumnFilters.forEach(function(a){if(a.filterPromise.resolveNow(!1,o)){var l=a.filterPromise.resolveNow(null,function(u){return u});s(a.column)?r.activeAggregateFilters.push(l):r.activeColumnFilters.push(l)}})},t.prototype.updateFilterFlagInColumns=function(r,o){this.allColumnFilters.forEach(function(i){var s=i.filterPromise.resolveNow(!1,function(a){return a.isFilterActive()});i.column.setFilterActive(s,r,o)})},t.prototype.isAnyFilterPresent=function(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()},t.prototype.doColumnFiltersPass=function(r,o,i){for(var s=r.data,a=r.aggData,l=i?this.activeAggregateFilters:this.activeColumnFilters,u=i?a:s,c=0;c=0})},t.prototype.doesRowPassQuickFilterCache=function(r,o){return r.quickFilterAggregateText||this.aggregateRowForQuickFilter(r),r.quickFilterAggregateText.indexOf(o)>=0},t.prototype.doesRowPassQuickFilter=function(r){var o=this,i=this.gridOptionsService.is("cacheQuickFilter");return this.quickFilterParts.every(function(s){return i?o.doesRowPassQuickFilterCache(r,s):o.doesRowPassQuickFilterNoCache(r,s)})},t.prototype.doesRowPassAggregateFilters=function(r){return!(this.isAggregateQuickFilterPresent()&&!this.doesRowPassQuickFilter(r.rowNode)||this.isAggregateFilterPresent()&&!this.doAggregateFiltersPass(r.rowNode,r.filterInstanceToSkip))},t.prototype.doesRowPassFilter=function(r){return!(this.isNonAggregateQuickFilterPresent()&&!this.doesRowPassQuickFilter(r.rowNode)||this.isExternalFilterPresent()&&!this.doesExternalFilterPass(r.rowNode)||this.isColumnFilterPresent()&&!this.doColumnFiltersPass(r.rowNode,r.filterInstanceToSkip))},t.prototype.getQuickFilterTextForColumn=function(r,o){var i=this.valueService.getValue(r,o,!0),s=r.getColDef();if(s.getQuickFilterText){var a={value:i,node:o,data:o.data,column:r,colDef:s,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};i=s.getQuickFilterText(a)}return O(i)?i.toString().toUpperCase():null},t.prototype.aggregateRowForQuickFilter=function(r){var o=this,i=[],s=this.columnModel.getAllColumnsForQuickFilter();s.forEach(function(a){var l=o.getQuickFilterTextForColumn(a,r);O(l)&&i.push(l)}),r.quickFilterAggregateText=i.join(e.QUICK_FILTER_SEPARATOR)},t.prototype.onNewRowsLoaded=function(r){this.allColumnFilters.forEach(function(o){o.filterPromise.then(function(i){i.onNewRowsLoaded&&i.onNewRowsLoaded()})}),this.updateFilterFlagInColumns(r,{afterDataChange:!0}),this.updateActiveFilters()},t.prototype.createValueGetter=function(r){var o=this;return function(i){var s=i.node;return o.valueService.getValue(r,s,!0)}},t.prototype.getFilterComponent=function(r,o,i){var s;if(i===void 0&&(i=!0),i)return((s=this.getOrCreateFilterWrapper(r,o))===null||s===void 0?void 0:s.filterPromise)||null;var a=this.cachedFilter(r);return a?a.filterPromise:null},t.prototype.isFilterActive=function(r){var o=this.cachedFilter(r);return!!o&&o.filterPromise.resolveNow(!1,function(i){return i.isFilterActive()})},t.prototype.getOrCreateFilterWrapper=function(r,o){var i=this;if(!r.isFilterAllowed())return null;var s=this.cachedFilter(r);if(s)o!=="NO_UI"&&this.putIntoGui(s,o);else{s=this.createFilterWrapper(r,o);var a=r.getColId();this.allColumnFilters.set(a,s),this.allColumnListeners.set(a,this.addManagedListener(r,X.EVENT_COL_DEF_CHANGED,function(){return i.checkDestroyFilter(a)}))}return s},t.prototype.cachedFilter=function(r){return this.allColumnFilters.get(r.getColId())},t.prototype.getDefaultFilter=function(r){var o;if(G.__isRegistered(L.SetFilterModule,this.context.getGridId()))o="agSetColumnFilter";else{var i=r.getColDef().cellDataType;i==="number"?o="agNumberColumnFilter":i==="date"||i==="dateString"?o="agDateColumnFilter":o="agTextColumnFilter"}return o},t.prototype.getDefaultFloatingFilter=function(r){var o;if(G.__isRegistered(L.SetFilterModule,this.context.getGridId()))o="agSetColumnFloatingFilter";else{var i=r.getColDef().cellDataType;i==="number"?o="agNumberColumnFloatingFilter":i==="date"||i==="dateString"?o="agDateColumnFloatingFilter":o="agTextColumnFloatingFilter"}return o},t.prototype.createFilterInstance=function(r){var o=this,i=this.getDefaultFilter(r),s=r.getColDef(),a,l=Jo(Jo({},this.createFilterParams(r,s)),{filterModifiedCallback:function(){var c={type:v.EVENT_FILTER_MODIFIED,column:r,filterInstance:a};o.eventService.dispatchEvent(c)},filterChangedCallback:function(c){var p={filterInstance:a,additionalEventAttributes:c,columns:[r]};o.callOnFilterChangedOutsideRenderCycle(p)},doesRowPassOtherFilter:function(c){return o.doesRowPassOtherFilters(a,c)}}),u=this.userComponentFactory.getFilterDetails(s,l,i);return u?{filterPromise:function(){var c=u.newAgStackInstance();return c&&c.then(function(p){return a=p}),c},compDetails:u}:{filterPromise:null,compDetails:null}},t.prototype.createFilterParams=function(r,o){var i={column:r,colDef:Li(o),rowModel:this.rowModel,filterChangedCallback:function(){},filterModifiedCallback:function(){},valueGetter:this.createValueGetter(r),doesRowPassOtherFilter:function(){return!0},api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};return i},t.prototype.createFilterWrapper=function(r,o){var i,s={column:r,filterPromise:null,compiledElement:null,guiPromise:qe.resolve(null),compDetails:null},a=this.createFilterInstance(r),l=a.filterPromise,u=a.compDetails;return s.filterPromise=(i=l==null?void 0:l())!==null&&i!==void 0?i:null,s.compDetails=u,l&&this.putIntoGui(s,o),s},t.prototype.putIntoGui=function(r,o){var i=this,s=document.createElement("div");s.className="ag-filter",r.guiPromise=new qe(function(a){r.filterPromise.then(function(l){var u=l.getGui();O(u)||console.warn("AG Grid: getGui method from filter returned "+u+", it should be a DOM element or an HTML template string."),typeof u=="string"&&(u=pe(u)),s.appendChild(u),a(s);var c={type:v.EVENT_FILTER_OPENED,column:r.column,source:o,eGui:s};i.eventService.dispatchEvent(c)})})},t.prototype.onColumnsChanged=function(){var r=this,o=[];this.allColumnFilters.forEach(function(i,s){var a;i.column.isPrimary()?a=r.columnModel.getPrimaryColumn(s):a=r.columnModel.getGridColumn(s),!a&&(o.push(i.column),r.disposeFilterWrapper(i,"columnChanged"),r.disposeColumnListener(s))}),o.length>0?this.onFilterChanged({columns:o}):this.updateDependantFilters()},t.prototype.updateDependantFilters=function(){var r=this,o=this.columnModel.getGroupAutoColumns();o==null||o.forEach(function(i){i.getColDef().filter==="agGroupColumnFilter"&&r.getOrCreateFilterWrapper(i,"NO_UI")})},t.prototype.isFilterAllowed=function(r){var o,i,s=r.isFilterAllowed();if(!s)return!1;var a=this.allColumnFilters.get(r.getColId());return(i=(o=a==null?void 0:a.filterPromise)===null||o===void 0?void 0:o.resolveNow(!0,function(l){var u,c;return typeof((u=l)===null||u===void 0?void 0:u.isFilterAllowed)=="function"?(c=l)===null||c===void 0?void 0:c.isFilterAllowed():!0}))!==null&&i!==void 0?i:!0},t.prototype.getFloatingFilterCompDetails=function(r,o){var i=this,s=r.getColDef(),a=this.createFilterParams(r,s),l=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(s,$n,a),u=this.userComponentFactory.getDefaultFloatingFilterType(s,function(){return i.getDefaultFloatingFilter(r)});u==null&&(u="agReadOnlyFloatingFilter");var c=function(d){var f=i.getFilterComponent(r,"NO_UI");f!=null&&f.then(function(g){d(rr(g))})},p={column:r,filterParams:l,currentParentModel:function(){return i.getCurrentFloatingFilterParentModel(r)},parentFilterInstance:c,showParentFilter:o,suppressFilterButton:!1};return this.userComponentFactory.getFloatingFilterCompDetails(s,p,u)},t.prototype.getCurrentFloatingFilterParentModel=function(r){var o=this.getFilterComponent(r,"NO_UI",!1);return o?o.resolveNow(null,function(i){return i&&i.getModel()}):null},t.prototype.destroyFilter=function(r,o){o===void 0&&(o="api");var i=r.getColId(),s=this.allColumnFilters.get(i);this.disposeColumnListener(i),s&&(this.disposeFilterWrapper(s,o),this.onFilterChanged({columns:[r]}))},t.prototype.disposeColumnListener=function(r){var o=this.allColumnListeners.get(r);o&&(this.allColumnListeners.delete(r),o())},t.prototype.disposeFilterWrapper=function(r,o){var i=this;r.filterPromise.then(function(s){(s.setModel(null)||qe.resolve()).then(function(){i.getContext().destroyBean(s),r.column.setFilterActive(!1,"filterDestroyed"),i.allColumnFilters.delete(r.column.getColId());var a={type:v.EVENT_FILTER_DESTROYED,source:o,column:r.column};i.eventService.dispatchEvent(a)})})},t.prototype.checkDestroyFilter=function(r){var o=this.allColumnFilters.get(r);if(o){var i=o.column,s=(i.isFilterAllowed()?this.createFilterInstance(i):{compDetails:null}).compDetails,a=function(l,u){if(!u||!l)return!0;var c=l.componentClass,p=u.componentClass,d=c===p||(c==null?void 0:c.render)&&(p==null?void 0:p.render)&&c.render===p.render;return!d};a(o.compDetails,s)&&this.destroyFilter(i,"columnChanged")}},t.prototype.destroy=function(){var r=this;n.prototype.destroy.call(this),this.allColumnFilters.forEach(function(o){return r.disposeFilterWrapper(o,"gridDestroyed")}),this.allColumnListeners.clear()};var e;return t.QUICK_FILTER_SEPARATOR=` `,or([h("valueService")],t.prototype,"valueService",void 0),or([h("columnModel")],t.prototype,"columnModel",void 0),or([h("rowModel")],t.prototype,"rowModel",void 0),or([h("userComponentFactory")],t.prototype,"userComponentFactory",void 0),or([h("rowRenderer")],t.prototype,"rowRenderer",void 0),or([P],t.prototype,"init",null),t=e=or([x("filterManager")],t),t}(T),Nh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Yn=function(n){Nh(t,n);function t(e,r){var o=n.call(this,e)||this;return o.ctrl=r,o}return t.prototype.getCtrl=function(){return this.ctrl},t}(W),Gh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),qr=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Hh=function(n){Gh(t,n);function t(e){return n.call(this,t.TEMPLATE,e)||this}return t.prototype.postConstruct=function(){var e=this,r=this.getGui(),o={addOrRemoveCssClass:function(i,s){return e.addOrRemoveCssClass(i,s)},addOrRemoveBodyCssClass:function(i,s){return e.eFloatingFilterBody.classList.toggle(i,s)},setButtonWrapperDisplayed:function(i){return U(e.eButtonWrapper,i)},setCompDetails:function(i){return e.setCompDetails(i)},getFloatingFilterComp:function(){return e.compPromise},setWidth:function(i){return r.style.width=i},setMenuIcon:function(i){return e.eButtonShowMainFilter.appendChild(i)}};this.ctrl.setComp(o,r,this.eButtonShowMainFilter,this.eFloatingFilterBody)},t.prototype.setCompDetails=function(e){var r=this;if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(function(o){return r.afterCompCreated(o)})},t.prototype.destroyFloatingFilterComp=function(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))},t.prototype.afterCompCreated=function(e){if(e){if(!this.isAlive()){this.destroyBean(e);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()}},t.TEMPLATE=`
-
`,qr([D("eFloatingFilterBody")],t.prototype,"eFloatingFilterBody",void 0),qr([D("eButtonWrapper")],t.prototype,"eButtonWrapper",void 0),qr([D("eButtonShowMainFilter")],t.prototype,"eButtonShowMainFilter",void 0),qr([P],t.prototype,"postConstruct",null),qr([ae],t.prototype,"destroyFloatingFilterComp",null),t}(Yn),Vh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Bh=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},ne;(function(n){n.AUTO_HEIGHT="ag-layout-auto-height",n.NORMAL="ag-layout-normal",n.PRINT="ag-layout-print"})(ne||(ne={}));var qn=function(n){Vh(t,n);function t(e){var r=n.call(this)||this;return r.view=e,r}return t.prototype.postConstruct=function(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()},t.prototype.updateLayoutClasses=function(){var e=this.getDomLayout(),r={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},o=r.autoHeight?ne.AUTO_HEIGHT:r.print?ne.PRINT:ne.NORMAL;this.view.updateLayoutClasses(o,r)},t.prototype.getDomLayout=function(){var e,r=(e=this.gridOptionsService.get("domLayout"))!==null&&e!==void 0?e:"normal",o=["normal","print","autoHeight"];return o.indexOf(r)===-1?(z(function(){return console.warn("AG Grid: "+r+" is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.")},"warn about dom layout values"),"normal"):r},Bh([P],t.prototype,"postConstruct",null),t}(T),Wh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Zo=function(){return Zo=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},ve;(function(n){n[n.Vertical=0]="Vertical",n[n.Horizontal=1]="Horizontal"})(ve||(ve={}));var me;(function(n){n[n.Container=0]="Container",n[n.FakeContainer=1]="FakeContainer"})(me||(me={}));var jh=function(n){Wh(t,n);function t(e){var r=n.call(this)||this;return r.lastScrollSource=[null,null],r.scrollLeft=-1,r.nextScrollTop=-1,r.scrollTop=-1,r.eBodyViewport=e,r.resetLastHScrollDebounced=rt(function(){return r.lastScrollSource[ve.Horizontal]=null},500),r.resetLastVScrollDebounced=rt(function(){return r.lastScrollSource[ve.Vertical]=null},500),r}return t.prototype.postConstruct=function(){var e=this;this.enableRtl=this.gridOptionsService.is("enableRtl"),this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this)),this.ctrlsService.whenReady(function(r){e.centerRowContainerCtrl=r.centerRowContainerCtrl,e.onDisplayedColumnsWidthChanged(),e.addScrollListener()})},t.prototype.addScrollListener=function(){var e=this.ctrlsService.getFakeHScrollComp(),r=this.ctrlsService.getFakeVScrollComp();this.addManagedListener(this.centerRowContainerCtrl.getViewportElement(),"scroll",this.onHScroll.bind(this)),e.onScrollCallback(this.onFakeHScroll.bind(this));var o=this.gridOptionsService.is("debounceVerticalScrollbar"),i=o?rt(this.onVScroll.bind(this),100):this.onVScroll.bind(this),s=o?rt(this.onFakeVScroll.bind(this),100):this.onFakeVScroll.bind(this);this.addManagedListener(this.eBodyViewport,"scroll",i),r.onScrollCallback(s)},t.prototype.onDisplayedColumnsWidthChanged=function(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()},t.prototype.horizontallyScrollHeaderCenterAndFloatingCenter=function(e){var r=this.centerRowContainerCtrl==null;if(!r){e===void 0&&(e=this.centerRowContainerCtrl.getCenterViewportScrollLeft());var o=this.enableRtl?e:-e,i=this.ctrlsService.getTopCenterRowContainerCtrl(),s=this.ctrlsService.getStickyTopCenterRowContainerCtrl(),a=this.ctrlsService.getBottomCenterRowContainerCtrl(),l=this.ctrlsService.getFakeHScrollComp(),u=this.ctrlsService.getHeaderRowContainerCtrl();u.setHorizontalScroll(-o),a.setContainerTranslateX(o),i.setContainerTranslateX(o),s.setContainerTranslateX(o);var c=this.centerRowContainerCtrl.getViewportElement(),p=this.lastScrollSource[ve.Horizontal]===me.Container;e=Math.abs(e),p?l.setScrollPosition(e):kr(c,e,this.enableRtl)}},t.prototype.isControllingScroll=function(e,r){return this.lastScrollSource[r]==null?(this.lastScrollSource[r]=e,!0):this.lastScrollSource[r]===e},t.prototype.onFakeHScroll=function(){this.isControllingScroll(me.FakeContainer,ve.Horizontal)&&this.onHScrollCommon(me.FakeContainer)},t.prototype.onHScroll=function(){this.isControllingScroll(me.Container,ve.Horizontal)&&this.onHScrollCommon(me.Container)},t.prototype.onHScrollCommon=function(e){var r=this.centerRowContainerCtrl.getViewportElement(),o=r.scrollLeft;if(!this.shouldBlockScrollUpdate(ve.Horizontal,o,!0)){var i;e===me.Container?i=jr(r,this.enableRtl):i=this.ctrlsService.getFakeHScrollComp().getScrollPosition(),this.doHorizontalScroll(Math.round(i)),this.resetLastHScrollDebounced()}},t.prototype.onFakeVScroll=function(){this.isControllingScroll(me.FakeContainer,ve.Vertical)&&this.onVScrollCommon(me.FakeContainer)},t.prototype.onVScroll=function(){this.isControllingScroll(me.Container,ve.Vertical)&&this.onVScrollCommon(me.Container)},t.prototype.onVScrollCommon=function(e){var r;e===me.Container?r=this.eBodyViewport.scrollTop:r=this.ctrlsService.getFakeVScrollComp().getScrollPosition(),!this.shouldBlockScrollUpdate(ve.Vertical,r,!0)&&(this.animationFrameService.setScrollTop(r),this.nextScrollTop=r,e===me.Container?this.ctrlsService.getFakeVScrollComp().setScrollPosition(r):this.eBodyViewport.scrollTop=r,this.gridOptionsService.is("suppressAnimationFrame")?this.scrollGridIfNeeded():this.animationFrameService.schedule(),this.resetLastVScrollDebounced())},t.prototype.doHorizontalScroll=function(e){var r=this.ctrlsService.getFakeHScrollComp().getScrollPosition();this.scrollLeft===e&&e===r||(this.scrollLeft=e,this.fireScrollEvent(ve.Horizontal),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.onHorizontalViewportChanged())},t.prototype.fireScrollEvent=function(e){var r=this,o={type:v.EVENT_BODY_SCROLL,direction:e===ve.Horizontal?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(o),window.clearTimeout(this.scrollTimer),this.scrollTimer=void 0,this.scrollTimer=window.setTimeout(function(){var i=Zo(Zo({},o),{type:v.EVENT_BODY_SCROLL_END});r.eventService.dispatchEvent(i)},100)},t.prototype.shouldBlockScrollUpdate=function(e,r,o){return o===void 0&&(o=!1),o&&!At()?!1:e===ve.Vertical?this.shouldBlockVerticalScroll(r):this.shouldBlockHorizontalScroll(r)},t.prototype.shouldBlockVerticalScroll=function(e){var r=Br(this.eBodyViewport),o=this.eBodyViewport.scrollHeight;return e<0||e+r>o},t.prototype.shouldBlockHorizontalScroll=function(e){var r=this.centerRowContainerCtrl.getCenterWidth(),o=this.centerRowContainerCtrl.getViewportElement().scrollWidth;if(this.enableRtl&&Wr()){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+r>o},t.prototype.redrawRowsAfterScroll=function(){this.fireScrollEvent(ve.Vertical)},t.prototype.onHorizontalViewportChanged=function(){this.centerRowContainerCtrl.onHorizontalViewportChanged()},t.prototype.checkScrollLeft=function(){this.scrollLeft!==this.centerRowContainerCtrl.getCenterViewportScrollLeft()&&this.onHScrollCommon(me.Container)},t.prototype.scrollGridIfNeeded=function(){var e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),e},t.prototype.setHorizontalScrollPosition=function(e,r){r===void 0&&(r=!1);var o=0,i=this.centerRowContainerCtrl.getViewportElement().scrollWidth-this.centerRowContainerCtrl.getCenterWidth();!r&&this.shouldBlockScrollUpdate(ve.Horizontal,e)&&(this.enableRtl&&Wr()?e=e>0?0:i:e=Math.min(Math.max(e,o),i)),kr(this.centerRowContainerCtrl.getViewportElement(),Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)},t.prototype.setVerticalScrollPosition=function(e){this.eBodyViewport.scrollTop=e},t.prototype.getVScrollPosition=function(){var e={top:this.eBodyViewport.scrollTop,bottom:this.eBodyViewport.scrollTop+this.eBodyViewport.offsetHeight};return e},t.prototype.getHScrollPosition=function(){return this.centerRowContainerCtrl.getHScrollPosition()},t.prototype.isHorizontalScrollShowing=function(){return this.centerRowContainerCtrl.isHorizontalScrollShowing()},t.prototype.scrollHorizontally=function(e){var r=this.centerRowContainerCtrl.getViewportElement().scrollLeft;return this.setHorizontalScrollPosition(r+e),this.centerRowContainerCtrl.getViewportElement().scrollLeft-r},t.prototype.scrollToTop=function(){this.eBodyViewport.scrollTop=0},t.prototype.ensureNodeVisible=function(e,r){r===void 0&&(r=null);for(var o=this.rowModel.getRowCount(),i=-1,s=0;s=0&&this.ensureIndexVisible(i,r)},t.prototype.ensureIndexVisible=function(e,r){if(!this.gridOptionsService.isDomLayout("print")){var o=this.paginationProxy.getRowCount();if(typeof e!="number"||e<0||e>=o){console.warn("AG Grid: Invalid row index for ensureIndexVisible: "+e);return}var i=this.gridOptionsService.is("pagination"),s=i&&!this.gridOptionsService.is("suppressPaginationPanel");s||this.paginationProxy.goToPageWithIndex(e);var a=this.ctrlsService.getGridBodyCtrl(),l=a.getStickyTopHeight(),u=this.paginationProxy.getRow(e),c;do{var p=u.rowTop,d=u.rowHeight,f=this.paginationProxy.getPixelOffset(),g=u.rowTop-f,y=g+u.rowHeight,m=this.getVScrollPosition(),C=this.heightScaler.getDivStretchOffset(),w=m.top+C,S=m.bottom+C,E=S-w,A=this.heightScaler.getScrollPositionForPixel(g),b=this.heightScaler.getScrollPositionForPixel(y-E),M=Math.min((A+b)/2,g),F=w+l>g,I=Sl:ia;return{columnBeforeStart:c,columnAfterEnd:p}},t.prototype.getColumnBounds=function(e){var r=this.enableRtl,o=this.columnModel.getBodyContainerWidth(),i=e.getActualWidth(),s=e.getLeft(),a=r?-1:1,l=r?o-s:s,u=l+i*a,c=l+i/2*a;return{colLeft:l,colMiddle:c,colRight:u}},t.prototype.getViewportBounds=function(){var e=this.centerRowContainerCtrl.getCenterWidth(),r=this.centerRowContainerCtrl.getCenterViewportScrollLeft(),o=r,i=e+r;return{start:o,end:i,width:e}},Mt([h("ctrlsService")],t.prototype,"ctrlsService",void 0),Mt([h("animationFrameService")],t.prototype,"animationFrameService",void 0),Mt([h("paginationProxy")],t.prototype,"paginationProxy",void 0),Mt([h("rowModel")],t.prototype,"rowModel",void 0),Mt([h("rowContainerHeightService")],t.prototype,"heightScaler",void 0),Mt([h("rowRenderer")],t.prototype,"rowRenderer",void 0),Mt([h("columnModel")],t.prototype,"columnModel",void 0),Mt([P],t.prototype,"postConstruct",null),t}(T),kh=function(){function n(t){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=t.scrollContainer,this.scrollHorizontally=t.scrollAxis.indexOf("x")!==-1,this.scrollVertically=t.scrollAxis.indexOf("y")!==-1,this.scrollByTick=t.scrollByTick!=null?t.scrollByTick:20,t.onScrollCallback&&(this.onScrollCallback=t.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=t.getVerticalPosition,this.setVerticalPosition=t.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=t.getHorizontalPosition,this.setHorizontalPosition=t.setHorizontalPosition),this.shouldSkipVerticalScroll=t.shouldSkipVerticalScroll||function(){return!1},this.shouldSkipHorizontalScroll=t.shouldSkipHorizontalScroll||function(){return!1}}return n.prototype.check=function(t,e){e===void 0&&(e=!1);var r=e||this.shouldSkipVerticalScroll();if(!(r&&this.shouldSkipHorizontalScroll())){var o=this.scrollContainer.getBoundingClientRect(),i=this.scrollByTick;this.tickLeft=t.clientXo.right-i,this.tickUp=t.clientYo.bottom-i&&!r,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}},n.prototype.ensureTickingStarted=function(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)},n.prototype.doTick=function(){this.tickCount++;var t;if(t=this.tickCount>20?200:this.tickCount>10?80:40,this.scrollVertically){var e=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(e-t),this.tickDown&&this.setVerticalPosition(e+t)}if(this.scrollHorizontally){var r=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(r-t),this.tickRight&&this.setHorizontalPosition(r+t)}this.onScrollCallback&&this.onScrollCallback()},n.prototype.ensureCleared=function(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)},n}(),Uh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Qn=function(){return Qn=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},zh=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},$h=function(n,t){for(var e=0,r=t.length,o=n.length;ethis.paginationProxy.getCurrentPageHeight(),s=-1,a;i||(s=this.rowModel.getRowIndexAtPixel(o),a=this.rowModel.getRow(s));var l;switch(r.vDirection){case Er.Down:l="down";break;case Er.Up:l="up";break;default:l=null;break}var u={type:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,event:r.event,node:r.dragItem.rowNode,nodes:r.dragItem.rowNodes,overIndex:s,overNode:a,y:o,vDirection:l};return u},t.prototype.dispatchGridEvent=function(e,r){var o=this.draggingToRowDragEvent(e,r);this.eventService.dispatchEvent(o)},t.prototype.onDragLeave=function(e){this.dispatchGridEvent(v.EVENT_ROW_DRAG_LEAVE,e),this.stopDragging(e),this.gridOptionsService.is("rowDragManaged")&&this.clearRowHighlight(),this.isFromThisGrid(e)&&(this.isMultiRowDrag=!1)},t.prototype.onDragStop=function(e){this.dispatchGridEvent(v.EVENT_ROW_DRAG_END,e),this.stopDragging(e),this.gridOptionsService.is("rowDragManaged")&&(this.gridOptionsService.is("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&!this.isDropZoneWithinThisGrid(e)&&this.moveRowAndClearHighlight(e)},t.prototype.stopDragging=function(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach(function(r){r.setDragging(!1)})},ke([h("dragAndDropService")],t.prototype,"dragAndDropService",void 0),ke([h("rowModel")],t.prototype,"rowModel",void 0),ke([h("paginationProxy")],t.prototype,"paginationProxy",void 0),ke([h("columnModel")],t.prototype,"columnModel",void 0),ke([h("focusService")],t.prototype,"focusService",void 0),ke([h("sortController")],t.prototype,"sortController",void 0),ke([h("filterManager")],t.prototype,"filterManager",void 0),ke([h("selectionService")],t.prototype,"selectionService",void 0),ke([h("mouseEventService")],t.prototype,"mouseEventService",void 0),ke([h("ctrlsService")],t.prototype,"ctrlsService",void 0),ke([Y("rangeService")],t.prototype,"rangeService",void 0),ke([P],t.prototype,"postConstruct",null),t}(T),Yh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),xe=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Rr;(function(n){n.ANIMATION_ON="ag-row-animation",n.ANIMATION_OFF="ag-row-no-animation"})(Rr||(Rr={}));var xl="ag-force-vertical-scroll",qh="ag-selectable",Qh="ag-column-moving",Xh=function(n){Yh(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.stickyTopHeight=0,e}return t.prototype.getScrollFeature=function(){return this.bodyScrollFeature},t.prototype.getBodyViewportElement=function(){return this.eBodyViewport},t.prototype.setComp=function(e,r,o,i,s,a){this.comp=e,this.eGridBody=r,this.eBodyViewport=o,this.eTop=i,this.eBottom=s,this.eStickyTop=a,this.setCellTextSelection(this.gridOptionsService.is("enableCellTextSelection")),this.createManagedBean(new qn(this.comp)),this.bodyScrollFeature=this.createManagedBean(new jh(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([i,o,s,a]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.ctrlsService.registerGridBodyCtrl(this)},t.prototype.getComp=function(){return this.comp},t.prototype.addEventListeners=function(){this.addManagedListener(this.eventService,v.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))},t.prototype.addFocusListeners=function(e){var r=this;e.forEach(function(o){r.addManagedListener(o,"focusin",function(i){var s=i.target,a=Xt(s,"ag-root",o);o.classList.toggle("ag-has-focus",!a)}),r.addManagedListener(o,"focusout",function(i){var s=i.target,a=i.relatedTarget,l=o.contains(a),u=Xt(a,"ag-root",o),c=Xt(s,"ag-root",o);c||(!l||u)&&o.classList.remove("ag-has-focus")})})},t.prototype.setColumnMovingCss=function(e){this.comp.setColumnMovingCss(Qh,e)},t.prototype.setCellTextSelection=function(e){e===void 0&&(e=!1),this.comp.setCellSelectableCss(qh,e)},t.prototype.onScrollVisibilityChanged=function(){var e=this,r=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(r),this.setStickyTopWidth(r);var o=r&&this.gridOptionsService.getScrollbarWidth()||0,i=hr()?16:0,s="calc(100% + "+(o+i)+"px)";this.animationFrameService.requestAnimationFrame(function(){return e.comp.setBodyViewportWidth(s)})},t.prototype.onGridColumnsChanged=function(){var e=this.columnModel.getAllGridColumns();this.comp.setColumnCount(e?e.length:0)},t.prototype.disableBrowserDragging=function(){this.addManagedListener(this.eGridBody,"dragstart",function(e){if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1})},t.prototype.addStopEditingWhenGridLosesFocus=function(){var e=this;if(this.gridOptionsService.is("stopEditingWhenCellsLoseFocus")){var r=function(i){var s=i.relatedTarget;if(No(s)===null){e.rowRenderer.stopEditing();return}var a=o.some(function(u){return u.contains(s)})&&e.mouseEventService.isElementInThisGrid(s);if(!a){var l=e.popupService;a=l.getActivePopups().some(function(u){return u.contains(s)})||l.isElementWithinCustomPopup(s)}a||e.rowRenderer.stopEditing()},o=[this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop];o.forEach(function(i){return e.addManagedListener(i,"focusout",r)})}},t.prototype.updateRowCount=function(){var e=this.headerNavigationService.getHeaderRowCount(),r=this.rowModel.isLastRowIndexKnown()?this.rowModel.getRowCount():-1,o=r===-1?-1:e+r;this.comp.setRowCount(o)},t.prototype.registerBodyViewportResizeListener=function(e){this.comp.registerBodyViewportResizeListener(e)},t.prototype.setVerticalScrollPaddingVisible=function(e){var r=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(r)},t.prototype.isVerticalScrollShowing=function(){var e=this.gridOptionsService.is("alwaysShowVerticalScroll"),r=e?xl:null,o=this.gridOptionsService.isDomLayout("normal");return this.comp.setAlwaysVerticalScrollClass(r,e),e||o&&Wa(this.eBodyViewport)},t.prototype.setupRowAnimationCssClass=function(){var e=this,r=function(){var o=e.gridOptionsService.isAnimateRows()&&!e.rowContainerHeightService.isStretching(),i=o?Rr.ANIMATION_ON:Rr.ANIMATION_OFF;e.comp.setRowAnimationCssOnBodyViewport(i,o)};r(),this.addManagedListener(this.eventService,v.EVENT_HEIGHT_SCALE_CHANGED,r),this.addManagedPropertyListener("animateRows",r)},t.prototype.getGridBodyElement=function(){return this.eGridBody},t.prototype.addBodyViewportListener=function(){var e=this.onBodyViewportContextMenu.bind(this);this.addManagedListener(this.eBodyViewport,"contextmenu",e),this.mockContextMenuForIPad(e),this.addManagedListener(this.eBodyViewport,"wheel",this.onBodyViewportWheel.bind(this)),this.addManagedListener(this.eStickyTop,"wheel",this.onStickyTopWheel.bind(this)),this.addFullWidthContainerWheelListener()},t.prototype.addFullWidthContainerWheelListener=function(){var e=this,r=this.eBodyViewport.querySelector(".ag-full-width-container"),o=this.eBodyViewport.querySelector(".ag-center-cols-viewport");r&&o&&this.addManagedListener(r,"wheel",function(i){return e.onFullWidthContainerWheel(i,o)})},t.prototype.onFullWidthContainerWheel=function(e,r){!e.deltaX||Math.abs(e.deltaY)>Math.abs(e.deltaX)||!this.mouseEventService.isEventFromThisGrid(e)||(e.preventDefault(),r.scrollBy({left:e.deltaX}))},t.prototype.onBodyViewportContextMenu=function(e,r,o){if(!(!e&&!o)){if(this.gridOptionsService.is("preventDefaultOnContextMenu")){var i=e||o;i.preventDefault()}var s=(e||r).target;if(s===this.eBodyViewport||s===this.ctrlsService.getCenterRowContainerCtrl().getViewportElement()){if(!this.contextMenuFactory)return;e?this.contextMenuFactory.onContextMenu(e,null,null,null,null,this.eGridBody):o&&this.contextMenuFactory.onContextMenu(null,o,null,null,null,this.eGridBody)}}},t.prototype.mockContextMenuForIPad=function(e){if(At()){var r=new be(this.eBodyViewport),o=function(i){e(void 0,i.touchStart,i.touchEvent)};this.addManagedListener(r,be.EVENT_LONG_TAP,o),this.addDestroyFunc(function(){return r.destroy()})}},t.prototype.onBodyViewportWheel=function(e){this.gridOptionsService.is("suppressScrollWhenPopupsAreOpen")&&this.popupService.hasAnchoredPopup()&&e.preventDefault()},t.prototype.onStickyTopWheel=function(e){e.preventDefault(),e.offsetY&&this.scrollVertically(e.deltaY)},t.prototype.getGui=function(){return this.eGridBody},t.prototype.scrollVertically=function(e){var r=this.eBodyViewport.scrollTop;return this.bodyScrollFeature.setVerticalScrollPosition(r+e),this.eBodyViewport.scrollTop-r},t.prototype.addRowDragListener=function(){this.rowDragFeature=this.createManagedBean(new Kh(this.eBodyViewport)),this.dragAndDropService.addDropTarget(this.rowDragFeature)},t.prototype.getRowDragFeature=function(){return this.rowDragFeature},t.prototype.onPinnedRowDataChanged=function(){this.setFloatingHeights()},t.prototype.setFloatingHeights=function(){var e=this.pinnedRowModel,r=e.getPinnedTopTotalHeight();r&&(r+=1);var o=e.getPinnedBottomTotalHeight();o&&(o+=1),this.comp.setTopHeight(r),this.comp.setBottomHeight(o),this.comp.setTopDisplay(r?"inherit":"none"),this.comp.setBottomDisplay(o?"inherit":"none"),this.setStickyTopOffsetTop()},t.prototype.setStickyTopHeight=function(e){e===void 0&&(e=0),this.comp.setStickyTopHeight(e+"px"),this.stickyTopHeight=e},t.prototype.getStickyTopHeight=function(){return this.stickyTopHeight},t.prototype.setStickyTopWidth=function(e){if(!e)this.comp.setStickyTopWidth("100%");else{var r=this.gridOptionsService.getScrollbarWidth();this.comp.setStickyTopWidth("calc(100% - "+r+"px)")}},t.prototype.onHeaderHeightChanged=function(){this.setStickyTopOffsetTop()},t.prototype.setStickyTopOffsetTop=function(){var e=this.ctrlsService.getGridHeaderCtrl(),r=e.getHeaderHeight(),o=this.pinnedRowModel.getPinnedTopTotalHeight(),i=0;r>0&&(i+=r+1),o>0&&(i+=o+1),this.comp.setStickyTopTop(i+"px")},t.prototype.sizeColumnsToFit=function(e,r){var o=this,i=this.isVerticalScrollShowing(),s=i?this.gridOptionsService.getScrollbarWidth():0,a=Vo(this.eGridBody),l=a-s;if(l>0){this.columnModel.sizeColumnsToFit(l,"sizeColumnsToFit",!1,e);return}r===void 0?window.setTimeout(function(){o.sizeColumnsToFit(e,100)},0):r===100?window.setTimeout(function(){o.sizeColumnsToFit(e,500)},100):r===500?window.setTimeout(function(){o.sizeColumnsToFit(e,-1)},500):console.warn("AG Grid: tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?")},t.prototype.addScrollEventListener=function(e){this.eBodyViewport.addEventListener("scroll",e,{passive:!0})},t.prototype.removeScrollEventListener=function(e){this.eBodyViewport.removeEventListener("scroll",e)},xe([h("animationFrameService")],t.prototype,"animationFrameService",void 0),xe([h("rowContainerHeightService")],t.prototype,"rowContainerHeightService",void 0),xe([h("ctrlsService")],t.prototype,"ctrlsService",void 0),xe([h("columnModel")],t.prototype,"columnModel",void 0),xe([h("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),xe([Y("contextMenuFactory")],t.prototype,"contextMenuFactory",void 0),xe([h("headerNavigationService")],t.prototype,"headerNavigationService",void 0),xe([h("dragAndDropService")],t.prototype,"dragAndDropService",void 0),xe([h("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),xe([h("rowRenderer")],t.prototype,"rowRenderer",void 0),xe([h("popupService")],t.prototype,"popupService",void 0),xe([h("mouseEventService")],t.prototype,"mouseEventService",void 0),xe([h("rowModel")],t.prototype,"rowModel",void 0),t}(T),ei;(function(n){n[n.FILL=0]="FILL",n[n.RANGE=1]="RANGE"})(ei||(ei={}));var Or;(function(n){n[n.VALUE=0]="VALUE",n[n.DIMENSION=1]="DIMENSION"})(Or||(Or={}));var Qr="ag-cell-range-selected",Jh="ag-cell-range-chart",Zh="ag-cell-range-single-cell",ef="ag-cell-range-chart-category",tf="ag-cell-range-handle",rf="ag-cell-range-top",of="ag-cell-range-right",nf="ag-cell-range-bottom",sf="ag-cell-range-left",af=function(){function n(t,e){this.beans=t,this.cellCtrl=e}return n.prototype.setComp=function(t,e){this.cellComp=t,this.eGui=e,this.onRangeSelectionChanged()},n.prototype.onRangeSelectionChanged=function(){this.cellComp&&(this.rangeCount=this.beans.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()),this.hasChartRange=this.getHasChartRange(),this.cellComp.addOrRemoveCssClass(Qr,this.rangeCount!==0),this.cellComp.addOrRemoveCssClass(Qr+"-1",this.rangeCount===1),this.cellComp.addOrRemoveCssClass(Qr+"-2",this.rangeCount===2),this.cellComp.addOrRemoveCssClass(Qr+"-3",this.rangeCount===3),this.cellComp.addOrRemoveCssClass(Qr+"-4",this.rangeCount>=4),this.cellComp.addOrRemoveCssClass(Jh,this.hasChartRange),dr(this.eGui,this.rangeCount>0?!0:void 0),this.cellComp.addOrRemoveCssClass(Zh,this.isSingleCell()),this.updateRangeBorders(),this.refreshHandle())},n.prototype.updateRangeBorders=function(){var t=this.getRangeBorders(),e=this.isSingleCell(),r=!e&&t.top,o=!e&&t.right,i=!e&&t.bottom,s=!e&&t.left;this.cellComp.addOrRemoveCssClass(rf,r),this.cellComp.addOrRemoveCssClass(of,o),this.cellComp.addOrRemoveCssClass(nf,i),this.cellComp.addOrRemoveCssClass(sf,s)},n.prototype.isSingleCell=function(){var t=this.beans.rangeService;return this.rangeCount===1&&t&&!t.isMoreThanOneCell()},n.prototype.getHasChartRange=function(){var t=this.beans.rangeService;if(!this.rangeCount||!t)return!1;var e=t.getCellRanges();return e.length>0&&e.every(function(r){return Ie([Or.DIMENSION,Or.VALUE],r.type)})},n.prototype.updateRangeBordersIfRangeCount=function(){this.rangeCount>0&&(this.updateRangeBorders(),this.refreshHandle())},n.prototype.getRangeBorders=function(){var t=this,e=this.beans.gridOptionsService.is("enableRtl"),r=!1,o=!1,i=!1,s=!1,a=this.cellCtrl.getCellPosition().column,l=this.beans,u=l.rangeService,c=l.columnModel,p,d;e?(p=c.getDisplayedColAfter(a),d=c.getDisplayedColBefore(a)):(p=c.getDisplayedColBefore(a),d=c.getDisplayedColAfter(a));var f=u.getCellRanges().filter(function(w){return u.isCellInSpecificRange(t.cellCtrl.getCellPosition(),w)});p||(s=!0),d||(o=!0);for(var g=0;g=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Ll=function(){function n(){}return n.prototype.postConstruct=function(){this.doingMasterDetail=this.gridOptionsService.isMasterDetail(),this.gridOptionsService.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.gridOptionsService.isRowModelType("serverSide")&&(this.serverSideRowModel=this.rowModel)},B([h("resizeObserverService")],n.prototype,"resizeObserverService",void 0),B([h("paginationProxy")],n.prototype,"paginationProxy",void 0),B([h("context")],n.prototype,"context",void 0),B([h("columnApi")],n.prototype,"columnApi",void 0),B([h("gridApi")],n.prototype,"gridApi",void 0),B([h("gridOptionsService")],n.prototype,"gridOptionsService",void 0),B([h("expressionService")],n.prototype,"expressionService",void 0),B([h("environment")],n.prototype,"environment",void 0),B([h("rowRenderer")],n.prototype,"rowRenderer",void 0),B([h("templateService")],n.prototype,"templateService",void 0),B([h("valueService")],n.prototype,"valueService",void 0),B([h("eventService")],n.prototype,"eventService",void 0),B([h("columnModel")],n.prototype,"columnModel",void 0),B([h("headerNavigationService")],n.prototype,"headerNavigationService",void 0),B([h("navigationService")],n.prototype,"navigationService",void 0),B([h("columnAnimationService")],n.prototype,"columnAnimationService",void 0),B([Y("rangeService")],n.prototype,"rangeService",void 0),B([h("focusService")],n.prototype,"focusService",void 0),B([Y("contextMenuFactory")],n.prototype,"contextMenuFactory",void 0),B([h("popupService")],n.prototype,"popupService",void 0),B([h("valueFormatterService")],n.prototype,"valueFormatterService",void 0),B([h("stylingService")],n.prototype,"stylingService",void 0),B([h("columnHoverService")],n.prototype,"columnHoverService",void 0),B([h("userComponentFactory")],n.prototype,"userComponentFactory",void 0),B([h("userComponentRegistry")],n.prototype,"userComponentRegistry",void 0),B([h("animationFrameService")],n.prototype,"animationFrameService",void 0),B([h("dragService")],n.prototype,"dragService",void 0),B([h("dragAndDropService")],n.prototype,"dragAndDropService",void 0),B([h("sortController")],n.prototype,"sortController",void 0),B([h("filterManager")],n.prototype,"filterManager",void 0),B([h("rowContainerHeightService")],n.prototype,"rowContainerHeightService",void 0),B([h("frameworkOverrides")],n.prototype,"frameworkOverrides",void 0),B([h("cellPositionUtils")],n.prototype,"cellPositionUtils",void 0),B([h("rowPositionUtils")],n.prototype,"rowPositionUtils",void 0),B([h("selectionService")],n.prototype,"selectionService",void 0),B([Y("selectionHandleFactory")],n.prototype,"selectionHandleFactory",void 0),B([h("rowCssClassCalculator")],n.prototype,"rowCssClassCalculator",void 0),B([h("rowModel")],n.prototype,"rowModel",void 0),B([h("ctrlsService")],n.prototype,"ctrlsService",void 0),B([h("ctrlsFactory")],n.prototype,"ctrlsFactory",void 0),B([h("agStackComponentsRegistry")],n.prototype,"agStackComponentsRegistry",void 0),B([h("valueCache")],n.prototype,"valueCache",void 0),B([h("rowNodeEventThrottle")],n.prototype,"rowNodeEventThrottle",void 0),B([h("localeService")],n.prototype,"localeService",void 0),B([h("valueParserService")],n.prototype,"valueParserService",void 0),B([P],n.prototype,"postConstruct",null),n=B([x("beans")],n),n}(),hf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ff=function(n){hf(t,n);function t(e,r,o){var i=n.call(this)||this;return i.cellCtrl=e,i.beans=r,i.column=o,i}return t.prototype.onMouseEvent=function(e,r){if(!ot(r))switch(e){case"click":this.onCellClicked(r);break;case"mousedown":case"touchstart":this.onMouseDown(r);break;case"dblclick":this.onCellDoubleClicked(r);break;case"mouseout":this.onMouseOut(r);break;case"mouseover":this.onMouseOver(r);break}},t.prototype.onCellClicked=function(e){if(this.isDoubleClickOnIPad()){this.onCellDoubleClicked(e),e.preventDefault();return}var r=this.beans,o=r.eventService,i=r.rangeService,s=r.gridOptionsService,a=e.ctrlKey||e.metaKey;i&&a&&i.getCellRangeCount(this.cellCtrl.getCellPosition())>1&&i.intersectLastRange(!0);var l=this.cellCtrl.createEvent(e,v.EVENT_CELL_CLICKED);o.dispatchEvent(l);var u=this.column.getColDef();u.onCellClicked&&window.setTimeout(function(){return u.onCellClicked(l)},0);var c=(s.is("singleClickEdit")||u.singleClickEdit)&&!s.is("suppressClickEdit");c&&this.cellCtrl.startRowOrCellEdit()},t.prototype.isDoubleClickOnIPad=function(){if(!At()||ki("dblclick"))return!1;var e=new Date().getTime(),r=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,r},t.prototype.onCellDoubleClicked=function(e){var r=this.column.getColDef(),o=this.cellCtrl.createEvent(e,v.EVENT_CELL_DOUBLE_CLICKED);this.beans.eventService.dispatchEvent(o),typeof r.onCellDoubleClicked=="function"&&window.setTimeout(function(){return r.onCellDoubleClicked(o)},0);var i=!this.beans.gridOptionsService.is("singleClickEdit")&&!this.beans.gridOptionsService.is("suppressClickEdit");i&&this.cellCtrl.startRowOrCellEdit(null,e)},t.prototype.onMouseDown=function(e){var r=e.ctrlKey,o=e.metaKey,i=e.shiftKey,s=e.target,a=this.beans,l=a.eventService,u=a.rangeService;if(!this.isRightClickInExistingRange(e)){var c=u&&u.getCellRanges().length!=0;if(!i||!c){var p=He()&&!this.cellCtrl.isEditing()&&!vn(s);this.cellCtrl.focusCell(p)}if(i&&c&&e.preventDefault(),!this.containsWidget(s)){if(u){var d=this.cellCtrl.getCellPosition();if(i)u.extendLatestRangeToCell(d);else{var f=r||o;u.setRangeToCell(d,f)}}l.dispatchEvent(this.cellCtrl.createEvent(e,v.EVENT_CELL_MOUSE_DOWN))}}},t.prototype.isRightClickInExistingRange=function(e){var r=this.beans.rangeService;if(r){var o=r.isCellInAnyRange(this.cellCtrl.getCellPosition());if(o&&e.button===2)return!0}return!1},t.prototype.containsWidget=function(e){return Xt(e,"ag-selection-checkbox",3)},t.prototype.onMouseOut=function(e){if(!this.mouseStayingInsideCell(e)){var r=this.cellCtrl.createEvent(e,v.EVENT_CELL_MOUSE_OUT);this.beans.eventService.dispatchEvent(r),this.beans.columnHoverService.clearMouseOver()}},t.prototype.onMouseOver=function(e){if(!this.mouseStayingInsideCell(e)){var r=this.cellCtrl.createEvent(e,v.EVENT_CELL_MOUSE_OVER);this.beans.eventService.dispatchEvent(r),this.beans.columnHoverService.setMouseOver([this.column])}},t.prototype.mouseStayingInsideCell=function(e){if(!e.target||!e.relatedTarget)return!1;var r=this.cellCtrl.getGui(),o=r.contains(e.target),i=r.contains(e.relatedTarget);return o&&i},t.prototype.destroy=function(){},t}(Ll),vf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),gf=function(n){vf(t,n);function t(e,r,o,i,s){var a=n.call(this)||this;return a.cellCtrl=e,a.beans=r,a.rowNode=i,a.rowCtrl=s,a}return t.prototype.setComp=function(e){this.eGui=e},t.prototype.onKeyDown=function(e){var r=e.key;switch(r){case R.ENTER:this.onEnterKeyDown(e);break;case R.F2:this.onF2KeyDown(e);break;case R.ESCAPE:this.onEscapeKeyDown(e);break;case R.TAB:this.onTabKeyDown(e);break;case R.BACKSPACE:case R.DELETE:this.onBackspaceOrDeleteKeyDown(r,e);break;case R.DOWN:case R.UP:case R.RIGHT:case R.LEFT:this.onNavigationKeyDown(e,r);break}},t.prototype.onNavigationKeyDown=function(e,r){this.cellCtrl.isEditing()||(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled()?this.onShiftRangeSelect(e):this.beans.navigationService.navigateToNextCell(e,r,this.cellCtrl.getCellPosition(),!0),e.preventDefault())},t.prototype.onShiftRangeSelect=function(e){if(this.beans.rangeService){var r=this.beans.rangeService.extendLatestRangeInDirection(e);r&&this.beans.navigationService.ensureCellVisible(r)}},t.prototype.onTabKeyDown=function(e){this.beans.navigationService.onTabKeyDown(this.cellCtrl,e)},t.prototype.onBackspaceOrDeleteKeyDown=function(e,r){var o=this,i=o.cellCtrl,s=o.beans,a=o.rowNode,l=s.gridOptionsService,u=s.rangeService,c=s.eventService;i.isEditing()||(c.dispatchEvent({type:v.EVENT_KEY_SHORTCUT_CHANGED_CELL_START}),Ka(e,l.is("enableCellEditingOnBackspace"))?u&&l.isEnableRangeSelection()?u.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"}):i.isCellEditable()&&a.setDataValue(i.getColumn(),null,"cellClear"):i.startRowOrCellEdit(e,r),c.dispatchEvent({type:v.EVENT_KEY_SHORTCUT_CHANGED_CELL_END}))},t.prototype.onEnterKeyDown=function(e){if(this.cellCtrl.isEditing()||this.rowCtrl.isEditing())this.cellCtrl.stopEditingAndFocus(!1,e.shiftKey);else if(this.beans.gridOptionsService.is("enterNavigatesVertically")){var r=e.shiftKey?R.UP:R.DOWN;this.beans.navigationService.navigateToNextCell(null,r,this.cellCtrl.getCellPosition(),!1)}else this.cellCtrl.startRowOrCellEdit(R.ENTER,e),this.cellCtrl.isEditing()&&e.preventDefault()},t.prototype.onF2KeyDown=function(e){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(R.F2,e)},t.prototype.onEscapeKeyDown=function(e){this.cellCtrl.isEditing()&&(this.cellCtrl.stopRowOrCellEdit(!0),this.cellCtrl.focusCell(!0))},t.prototype.processCharacter=function(e){var r=e.target,o=r!==this.eGui;if(!(o||this.cellCtrl.isEditing())){var i=e.key;i===" "?this.onSpaceKeyDown(e):(this.cellCtrl.startRowOrCellEdit(i,e),e.preventDefault())}},t.prototype.onSpaceKeyDown=function(e){var r=this.beans.gridOptionsService;if(!this.cellCtrl.isEditing()&&r.isRowSelection()){var o=this.rowNode.isSelected(),i=!o;if(i||!r.is("suppressRowDeselection")){var s=this.beans.gridOptionsService.is("groupSelectsFiltered"),a=this.rowNode.setSelectedParams({newValue:i,rangeSelect:e.shiftKey,groupSelectsFiltered:s,event:e,source:"spaceKey"});o===void 0&&a===0&&this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:s,event:e,source:"spaceKey"})}}e.preventDefault()},t.prototype.destroy=function(){n.prototype.destroy.call(this)},t}(T),yf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Cf=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},mf=function(n){yf(t,n);function t(e,r,o){var i=n.call(this,'
')||this;return i.rowNode=e,i.column=r,i.eCell=o,i}return t.prototype.postConstruct=function(){var e=this.getGui();e.appendChild(oe("rowDrag",this.gridOptionsService,null)),this.addGuiEventListener("mousedown",function(r){r.stopPropagation()}),this.addDragSource(),this.checkVisibility()},t.prototype.addDragSource=function(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))},t.prototype.onDragStart=function(e){var r=this,o=this.column.getColDef().dndSourceOnRowDrag;e.dataTransfer.setDragImage(this.eCell,0,0);var i=function(){try{var a=JSON.stringify(r.rowNode.data);e.dataTransfer.setData("application/json",a),e.dataTransfer.setData("text/plain",a)}catch{}};if(o){var s={rowNode:this.rowNode,dragEvent:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};o(s)}else i()},t.prototype.checkVisibility=function(){var e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)},Cf([P],t.prototype,"postConstruct",null),t}(W),wf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ti=function(){return ti=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Jn=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Zn=function(n,t){for(var e=0,r=t.length,o=n.length;e=0;return d?i:o}return o},t.prototype.listenOnDomOrder=function(e){var r=this,o=function(){var i=r.gridOptionsService.is("ensureDomOrder"),s=r.gridOptionsService.isDomLayout("print");e.rowComp.setDomOrder(i||s)};this.addManagedPropertyListener("domLayout",o),o()},t.prototype.setAnimateFlags=function(e){if(!(this.isSticky()||!e)){var r=O(this.rowNode.oldRowTop),o=this.beans.columnModel.isPinningLeft(),i=this.beans.columnModel.isPinningRight();r?(this.slideInAnimation.center=!0,this.slideInAnimation.left=o,this.slideInAnimation.right=i):(this.fadeInAnimation.center=!0,this.fadeInAnimation.left=o,this.fadeInAnimation.right=i)}},t.prototype.isEditing=function(){return this.editingRow},t.prototype.stopRowEditing=function(e){this.stopEditing(e)},t.prototype.isFullWidth=function(){return this.rowType!==Se.Normal},t.prototype.getRowType=function(){return this.rowType},t.prototype.refreshFullWidth=function(){var e=this,r=function(u,c){if(!u)return!0;var p=u.rowComp.getFullWidthCellRenderer();if(!p||!p.refresh)return!1;var d=e.createFullWidthParams(u.element,c),f=p.refresh(d);return f},o=r(this.fullWidthGui,null),i=r(this.centerGui,null),s=r(this.leftGui,"left"),a=r(this.rightGui,"right"),l=o&&i&&s&&a;return l},t.prototype.addListeners=function(){var e=this;this.addManagedListener(this.rowNode,j.EVENT_HEIGHT_CHANGED,function(){return e.onRowHeightChanged()}),this.addManagedListener(this.rowNode,j.EVENT_ROW_SELECTED,function(){return e.onRowSelected()}),this.addManagedListener(this.rowNode,j.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addManagedListener(this.rowNode,j.EVENT_TOP_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(this.rowNode,j.EVENT_EXPANDED_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,j.EVENT_HAS_CHILDREN_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,j.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,j.EVENT_CELL_CHANGED,this.onRowNodeCellChanged.bind(this)),this.addManagedListener(this.rowNode,j.EVENT_HIGHLIGHT_CHANGED,this.onRowNodeHighlightChanged.bind(this)),this.addManagedListener(this.rowNode,j.EVENT_DRAGGING_CHANGED,this.onRowNodeDraggingChanged.bind(this)),this.addManagedListener(this.rowNode,j.EVENT_UI_LEVEL_CHANGED,this.onUiLevelChanged.bind(this));var r=this.beans.eventService;this.addManagedListener(r,v.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,this.onPaginationPixelOffsetChanged.bind(this)),this.addManagedListener(r,v.EVENT_HEIGHT_SCALE_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(r,v.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(r,v.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(r,v.EVENT_CELL_FOCUSED,this.onCellFocused.bind(this)),this.addManagedListener(r,v.EVENT_CELL_FOCUS_CLEARED,this.onCellFocusCleared.bind(this)),this.addManagedListener(r,v.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),this.addManagedListener(r,v.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedListener(r,v.EVENT_COLUMN_MOVED,this.onColumnMoved.bind(this)),this.addListenersForCellComps()},t.prototype.onColumnMoved=function(){this.updateColumnLists()},t.prototype.addListenersForCellComps=function(){var e=this;this.addManagedListener(this.rowNode,j.EVENT_ROW_INDEX_CHANGED,function(){e.getAllCellCtrls().forEach(function(r){return r.onRowIndexChanged()})}),this.addManagedListener(this.rowNode,j.EVENT_CELL_CHANGED,function(r){e.getAllCellCtrls().forEach(function(o){return o.onCellChanged(r)})})},t.prototype.onRowNodeDataChanged=function(e){var r=this;if(this.rowNode.detailNode&&this.beans.rowRenderer.refreshFullWidthRow(this.rowNode.detailNode),this.isFullWidth()){this.beans.rowRenderer.refreshFullWidthRow(this.rowNode);return}this.getAllCellCtrls().forEach(function(o){return o.refreshCell({suppressFlash:!e.update,newData:!e.update})}),this.allRowGuis.forEach(function(o){r.setRowCompRowId(o.rowComp),r.updateRowBusinessKey(),r.setRowCompRowBusinessKey(o.rowComp)}),this.onRowSelected(),this.postProcessCss()},t.prototype.onRowNodeCellChanged=function(){this.postProcessCss()},t.prototype.postProcessCss=function(){this.setStylesFromGridOptions(),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()},t.prototype.onRowNodeHighlightChanged=function(){var e=this.rowNode.highlighted;this.allRowGuis.forEach(function(r){var o=e===je.Above,i=e===je.Below;r.rowComp.addOrRemoveCssClass("ag-row-highlight-above",o),r.rowComp.addOrRemoveCssClass("ag-row-highlight-below",i)})},t.prototype.onRowNodeDraggingChanged=function(){this.postProcessRowDragging()},t.prototype.postProcessRowDragging=function(){var e=this.rowNode.dragging;this.allRowGuis.forEach(function(r){return r.rowComp.addOrRemoveCssClass("ag-row-dragging",e)})},t.prototype.updateExpandedCss=function(){var e=this.rowNode.isExpandable(),r=this.rowNode.expanded==!0;this.allRowGuis.forEach(function(o){o.rowComp.addOrRemoveCssClass("ag-row-group",e),o.rowComp.addOrRemoveCssClass("ag-row-group-expanded",e&&r),o.rowComp.addOrRemoveCssClass("ag-row-group-contracted",e&&!r),Ke(o.element,e&&r)})},t.prototype.onDisplayedColumnsChanged=function(){this.updateColumnLists(!0),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights()},t.prototype.onVirtualColumnsChanged=function(){this.updateColumnLists(!1,!0)},t.prototype.getRowPosition=function(){return{rowPinned:St(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}},t.prototype.onKeyboardNavigate=function(e){var r=this.allRowGuis.find(function(u){return u.element.contains(e.target)}),o=r?r.element:null,i=o===e.target;if(i){var s=this.rowNode,a=this.beans.focusService.getFocusedCell(),l={rowIndex:s.rowIndex,rowPinned:s.rowPinned,column:a&&a.column};this.beans.navigationService.navigateToNextCell(e,e.key,l,!0),e.preventDefault()}},t.prototype.onTabKeyDown=function(e){if(!(e.defaultPrevented||ot(e))){var r=this.allRowGuis.find(function(a){return a.element.contains(e.target)}),o=r?r.element:null,i=o===e.target,s=null;i||(s=this.beans.focusService.findNextFocusableElement(o,!1,e.shiftKey)),(this.isFullWidth()&&i||!s)&&this.beans.navigationService.onTabKeyDown(this,e)}},t.prototype.onFullWidthRowFocused=function(e){var r,o=this.rowNode,i=e?this.isFullWidth()&&e.rowIndex===o.rowIndex&&e.rowPinned==o.rowPinned:!1,s=this.fullWidthGui?this.fullWidthGui.element:(r=this.centerGui)===null||r===void 0?void 0:r.element;s&&(s.classList.toggle("ag-full-width-focus",i),i&&s.focus({preventScroll:!0}))},t.prototype.refreshCell=function(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),this.updateColumnLists()},t.prototype.removeCellCtrl=function(e,r){var o={list:[],map:{}};return e.list.forEach(function(i){i!==r&&(o.list.push(i),o.map[i.getInstanceId()]=i)}),o},t.prototype.onMouseEvent=function(e,r){switch(e){case"dblclick":this.onRowDblClick(r);break;case"click":this.onRowClick(r);break;case"touchstart":case"mousedown":this.onRowMouseDown(r);break}},t.prototype.createRowEvent=function(e,r){return{type:e,node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,rowPinned:this.rowNode.rowPinned,context:this.gridOptionsService.context,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,event:r}},t.prototype.createRowEventWithSource=function(e,r){var o=this.createRowEvent(e,r);return o.source=this,o},t.prototype.onRowDblClick=function(e){if(!ot(e)){var r=this.createRowEventWithSource(v.EVENT_ROW_DOUBLE_CLICKED,e);this.beans.eventService.dispatchEvent(r)}},t.prototype.onRowMouseDown=function(e){if(this.lastMouseDownOnDragger=Xt(e.target,"ag-row-drag",3),!!this.isFullWidth()){var r=this.rowNode,o=this.beans.columnModel;this.beans.rangeService&&this.beans.rangeService.removeAllCellRanges(),this.beans.focusService.setFocusedCell({rowIndex:r.rowIndex,column:o.getAllDisplayedColumns()[0],rowPinned:r.rowPinned,forceBrowserFocus:!0})}},t.prototype.onRowClick=function(e){var r=ot(e)||this.lastMouseDownOnDragger;if(!r){var o=this.createRowEventWithSource(v.EVENT_ROW_CLICKED,e);this.beans.eventService.dispatchEvent(o);var i=e.ctrlKey||e.metaKey,s=e.shiftKey,a=this.gridOptionsService.is("groupSelectsChildren");if(!(a&&this.rowNode.group||!this.rowNode.selectable||this.rowNode.rowPinned||!this.gridOptionsService.isRowSelection()||this.gridOptionsService.is("suppressRowClickSelection"))){var l=this.gridOptionsService.is("rowMultiSelectWithClick"),u=!this.gridOptionsService.is("suppressRowDeselection"),c="rowClicked";if(this.rowNode.isSelected())l?this.rowNode.setSelectedParams({newValue:!1,event:e,source:c}):i?u&&this.rowNode.setSelectedParams({newValue:!1,event:e,source:c}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!s,rangeSelect:s,event:e,source:c});else{var p=l?!1:!i;this.rowNode.setSelectedParams({newValue:!0,clearSelection:p,rangeSelect:s,event:e,source:c})}}}},t.prototype.setupDetailRowAutoHeight=function(e){var r=this;if(this.rowType===Se.FullWidthDetail&&this.gridOptionsService.is("detailRowAutoHeight")){var o=function(){var s=e.clientHeight;if(s!=null&&s>0){var a=function(){r.rowNode.setRowHeight(s),r.beans.clientSideRowModel?r.beans.clientSideRowModel.onRowHeightChanged():r.beans.serverSideRowModel&&r.beans.serverSideRowModel.onRowHeightChanged()};r.beans.frameworkOverrides.setTimeout(a,0)}},i=this.beans.resizeObserverService.observeResize(e,o);this.addDestroyFunc(i),o()}},t.prototype.createFullWidthParams=function(e,r){var o=this,i={fullWidth:!0,data:this.rowNode.data,node:this.rowNode,value:this.rowNode.key,valueFormatted:this.rowNode.key,rowIndex:this.rowNode.rowIndex,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,eGridCell:e,eParentOfValue:e,pinned:r,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:function(s,a,l,u){return o.addFullWidthRowDragging(s,a,l,u)}};return i},t.prototype.addFullWidthRowDragging=function(e,r,o,i){if(o===void 0&&(o=""),!!this.isFullWidth()){var s=new qo(function(){return o},this.rowNode,void 0,e,r,i);this.createManagedBean(s,this.beans.context)}},t.prototype.onUiLevelChanged=function(){var e=this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);if(this.rowLevel!=e){var r="ag-row-level-"+e,o="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(function(i){i.rowComp.addOrRemoveCssClass(r,!0),i.rowComp.addOrRemoveCssClass(o,!1)})}this.rowLevel=e},t.prototype.isFirstRowOnPage=function(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageFirstRow()},t.prototype.isLastRowOnPage=function(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageLastRow()},t.prototype.onModelUpdated=function(){this.refreshFirstAndLastRowStyles()},t.prototype.refreshFirstAndLastRowStyles=function(){var e=this.isFirstRowOnPage(),r=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach(function(o){return o.rowComp.addOrRemoveCssClass("ag-row-first",e)})),this.lastRowOnPage!==r&&(this.lastRowOnPage=r,this.allRowGuis.forEach(function(o){return o.rowComp.addOrRemoveCssClass("ag-row-last",r)}))},t.prototype.stopEditing=function(e){var r,o;if(e===void 0&&(e=!1),!this.stoppingRowEdit){var i=this.getAllCellCtrls(),s=this.editingRow;this.stoppingRowEdit=!0;var a=!1;try{for(var l=xf(i),u=l.next();!u.done;u=l.next()){var c=u.value,p=c.stopEditing(e);s&&!e&&!a&&p&&(a=!0)}}catch(f){r={error:f}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}if(a){var d=this.createRowEvent(v.EVENT_ROW_VALUE_CHANGED);this.beans.eventService.dispatchEvent(d)}s&&this.setEditingRow(!1),this.stoppingRowEdit=!1}},t.prototype.setInlineEditingCss=function(e){this.allRowGuis.forEach(function(r){r.rowComp.addOrRemoveCssClass("ag-row-inline-editing",e),r.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!e)})},t.prototype.setEditingRow=function(e){this.editingRow=e,this.allRowGuis.forEach(function(o){return o.rowComp.addOrRemoveCssClass("ag-row-editing",e)});var r=e?this.createRowEvent(v.EVENT_ROW_EDITING_STARTED):this.createRowEvent(v.EVENT_ROW_EDITING_STOPPED);this.beans.eventService.dispatchEvent(r)},t.prototype.startRowEditing=function(e,r,o){if(e===void 0&&(e=null),r===void 0&&(r=null),o===void 0&&(o=null),!this.editingRow){var i=this.getAllCellCtrls().reduce(function(s,a){var l=a===r;return l?a.startEditing(e,l,o):a.startEditing(null,l,o),s?!0:a.isEditing()},!1);i&&this.setEditingRow(!0)}},t.prototype.getAllCellCtrls=function(){if(this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0)return this.centerCellCtrls.list;var e=Zn(Zn(Zn([],Jn(this.centerCellCtrls.list)),Jn(this.leftCellCtrls.list)),Jn(this.rightCellCtrls.list));return e},t.prototype.postProcessClassesFromGridOptions=function(){var e=this,r=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);!r||!r.length||r.forEach(function(o){e.allRowGuis.forEach(function(i){return i.rowComp.addOrRemoveCssClass(o,!0)})})},t.prototype.postProcessRowClassRules=function(){var e=this;this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,function(r){e.allRowGuis.forEach(function(o){return o.rowComp.addOrRemoveCssClass(r,!0)})},function(r){e.allRowGuis.forEach(function(o){return o.rowComp.addOrRemoveCssClass(r,!1)})})},t.prototype.setStylesFromGridOptions=function(e){var r=this.processStylesFromGridOptions();this.forEachGui(e,function(o){return o.rowComp.setUserStyles(r)})},t.prototype.getPinnedForContainer=function(e){var r=e===ge.LEFT?"left":e===ge.RIGHT?"right":null;return r},t.prototype.getInitialRowClasses=function(e){var r=this.getPinnedForContainer(e),o={rowNode:this.rowNode,rowFocused:this.rowFocused,fadeRowIn:this.fadeInAnimation[e],rowIsEven:this.rowNode.rowIndex%2===0,rowLevel:this.rowLevel,fullWidthRow:this.isFullWidth(),firstRowOnPage:this.isFirstRowOnPage(),lastRowOnPage:this.isLastRowOnPage(),printLayout:this.printLayout,expandable:this.rowNode.isExpandable(),pinned:r};return this.beans.rowCssClassCalculator.getInitialRowClasses(o)},t.prototype.processStylesFromGridOptions=function(){var e=this.gridOptionsService.get("rowStyle");if(e&&typeof e=="function"){console.warn("AG Grid: rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead");return}var r=this.gridOptionsService.getCallback("getRowStyle"),o;if(r){var i={data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex};o=r(i)}return Object.assign({},e,o)},t.prototype.onRowSelected=function(e){var r=this,o=!!this.rowNode.isSelected();this.forEachGui(e,function(i){i.rowComp.addOrRemoveCssClass("ag-row-selected",o),dr(i.element,o?!0:void 0);var s=r.createAriaLabel();Dt(i.element,s??"")})},t.prototype.createAriaLabel=function(){var e=this.rowNode.isSelected();if(!(e&&this.gridOptionsService.is("suppressRowDeselection"))){var r=this.beans.localeService.getLocaleTextFunc(),o=r(e?"ariaRowDeselect":"ariaRowSelect","Press SPACE to "+(e?"deselect":"select")+" this row.");return o}},t.prototype.isUseAnimationFrameForCreate=function(){return this.useAnimationFrameForCreate},t.prototype.addHoverFunctionality=function(e){var r=this;this.active&&(this.addManagedListener(e,"mouseenter",function(){return r.rowNode.onMouseEnter()}),this.addManagedListener(e,"mouseleave",function(){return r.rowNode.onMouseLeave()}),this.addManagedListener(this.rowNode,j.EVENT_MOUSE_ENTER,function(){!r.beans.dragService.isDragging()&&!r.gridOptionsService.is("suppressRowHoverHighlight")&&(e.classList.add("ag-row-hover"),r.rowNode.setHovered(!0))}),this.addManagedListener(this.rowNode,j.EVENT_MOUSE_LEAVE,function(){e.classList.remove("ag-row-hover"),r.rowNode.setHovered(!1)}))},t.prototype.roundRowTopToBounds=function(e){var r=this.beans.ctrlsService.getGridBodyCtrl(),o=r.getScrollFeature().getVScrollPosition(),i=this.applyPaginationOffset(o.top,!0)-100,s=this.applyPaginationOffset(o.bottom,!0)+100;return Math.min(Math.max(i,e),s)},t.prototype.getFrameworkOverrides=function(){return this.beans.frameworkOverrides},t.prototype.forEachGui=function(e,r){var o=e?[e]:this.allRowGuis;o.forEach(r)},t.prototype.onRowHeightChanged=function(e){if(this.rowNode.rowHeight!=null){var r=this.rowNode.rowHeight,o=this.beans.environment.getDefaultRowHeight(),i=this.gridOptionsService.isGetRowHeightFunction(),s=i?this.gridOptionsService.getRowHeightForNode(this.rowNode).height:void 0,a=s?Math.min(o,s)-2+"px":void 0;this.forEachGui(e,function(l){l.element.style.height=r+"px",a&&l.element.style.setProperty("--ag-line-height",a)})}},t.prototype.addEventListener=function(e,r){n.prototype.addEventListener.call(this,e,r)},t.prototype.removeEventListener=function(e,r){n.prototype.removeEventListener.call(this,e,r)},t.prototype.destroyFirstPass=function(){this.active=!1,this.gridOptionsService.isAnimateRows()&&this.setupRemoveAnimation(),this.rowNode.setHovered(!1);var e=this.createRowEvent(v.EVENT_VIRTUAL_ROW_REMOVED);this.dispatchEvent(e),this.beans.eventService.dispatchEvent(e),n.prototype.destroy.call(this)},t.prototype.setupRemoveAnimation=function(){if(!this.isSticky()){var e=this.rowNode.rowTop!=null;if(e){var r=this.roundRowTopToBounds(this.rowNode.rowTop);this.setRowTop(r)}else this.allRowGuis.forEach(function(o){return o.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0)})}},t.prototype.destroySecondPass=function(){this.allRowGuis.length=0;var e=function(r){return r.list.forEach(function(o){return o.destroy()}),{list:[],map:{}}};this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)},t.prototype.setFocusedClasses=function(e){var r=this;this.forEachGui(e,function(o){o.rowComp.addOrRemoveCssClass("ag-row-focus",r.rowFocused),o.rowComp.addOrRemoveCssClass("ag-row-no-focus",!r.rowFocused)})},t.prototype.onCellFocused=function(){this.onCellFocusChanged()},t.prototype.onCellFocusCleared=function(){this.onCellFocusChanged()},t.prototype.onCellFocusChanged=function(){var e=this.beans.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);e!==this.rowFocused&&(this.rowFocused=e,this.setFocusedClasses()),!e&&this.editingRow&&this.stopEditing(!1)},t.prototype.onPaginationChanged=function(){var e=this.beans.paginationProxy.getCurrentPage();this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()},t.prototype.onTopChanged=function(){this.setRowTop(this.rowNode.rowTop)},t.prototype.onPaginationPixelOffsetChanged=function(){this.onTopChanged()},t.prototype.applyPaginationOffset=function(e,r){if(r===void 0&&(r=!1),this.rowNode.isRowPinned()||this.rowNode.sticky)return e;var o=this.beans.paginationProxy.getPixelOffset(),i=r?1:-1;return e+o*i},t.prototype.setRowTop=function(e){if(!this.printLayout&&O(e)){var r=this.applyPaginationOffset(e),o=this.rowNode.isRowPinned()||this.rowNode.sticky,i=o?r:this.beans.rowContainerHeightService.getRealPixelPosition(r),s=i+"px";this.setRowTopStyle(s)}},t.prototype.getInitialRowTop=function(e){var r=this.gridOptionsService.is("suppressRowTransform");return r?this.getInitialRowTopShared(e):void 0},t.prototype.getInitialTransform=function(e){var r=this.gridOptionsService.is("suppressRowTransform");return r?void 0:"translateY("+this.getInitialRowTopShared(e)+")"},t.prototype.getInitialRowTopShared=function(e){if(this.printLayout)return"";var r;if(this.isSticky())r=this.rowNode.stickyRowTop;else{var o=this.slideInAnimation[e]?this.roundRowTopToBounds(this.rowNode.oldRowTop):this.rowNode.rowTop,i=this.applyPaginationOffset(o);r=this.rowNode.isRowPinned()?i:this.beans.rowContainerHeightService.getRealPixelPosition(i)}return r+"px"},t.prototype.setRowTopStyle=function(e){var r=this.gridOptionsService.is("suppressRowTransform");this.allRowGuis.forEach(function(o){return r?o.rowComp.setTop(e):o.rowComp.setTransform("translateY("+e+")")})},t.prototype.getRowNode=function(){return this.rowNode},t.prototype.getCellCtrl=function(e){var r=null;return this.getAllCellCtrls().forEach(function(o){o.getColumn()==e&&(r=o)}),r!=null||this.getAllCellCtrls().forEach(function(o){o.getColSpanningList().indexOf(e)>=0&&(r=o)}),r},t.prototype.onRowIndexChanged=function(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())},t.prototype.updateRowIndexes=function(e){var r=this.rowNode.getRowIndexString(),o=this.beans.headerNavigationService.getHeaderRowCount(),i=this.rowNode.rowIndex%2===0,s=o+this.rowNode.rowIndex+1;this.forEachGui(e,function(a){a.rowComp.setRowIndex(r),a.rowComp.addOrRemoveCssClass("ag-row-even",i),a.rowComp.addOrRemoveCssClass("ag-row-odd",!i),Ji(a.element,s)})},t.prototype.getPinnedLeftRowElement=function(){return this.leftGui?this.leftGui.element:void 0},t.prototype.getPinnedRightRowElement=function(){return this.rightGui?this.rightGui.element:void 0},t.prototype.getBodyRowElement=function(){return this.centerGui?this.centerGui.element:void 0},t.prototype.getFullWidthRowElement=function(){return this.fullWidthGui?this.fullWidthGui.element:void 0},t.DOM_DATA_KEY_ROW_CTRL="renderedRow",t}(T),Mf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Le=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},If=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Nf=function(n){Mf(t,n);function t(e){var r=n.call(this)||this;return r.element=e,r}return t.prototype.postConstruct=function(){this.addKeyboardListeners(),this.addMouseListeners(),this.mockContextMenuForIPad()},t.prototype.addKeyboardListeners=function(){var e="keydown",r=this.processKeyboardEvent.bind(this,e);this.addManagedListener(this.element,e,r)},t.prototype.addMouseListeners=function(){var e=this,r=ki("touchstart")?"touchstart":"mousedown",o=["dblclick","contextmenu","mouseover","mouseout","click",r];o.forEach(function(i){var s=e.processMouseEvent.bind(e,i);e.addManagedListener(e.element,i,s)})},t.prototype.processMouseEvent=function(e,r){if(!(!this.mouseEventService.isEventFromThisGrid(r)||ot(r))){var o=this.getRowForEvent(r),i=this.mouseEventService.getRenderedCellForEvent(r);e==="contextmenu"?this.handleContextMenuMouseEvent(r,null,o,i):(i&&i.onMouseEvent(e,r),o&&o.onMouseEvent(e,r))}},t.prototype.mockContextMenuForIPad=function(){var e=this;if(At()){var r=new be(this.element),o=function(i){var s=e.getRowForEvent(i.touchEvent),a=e.mouseEventService.getRenderedCellForEvent(i.touchEvent);e.handleContextMenuMouseEvent(null,i.touchEvent,s,a)};this.addManagedListener(r,be.EVENT_LONG_TAP,o),this.addDestroyFunc(function(){return r.destroy()})}},t.prototype.getRowForEvent=function(e){for(var r=e.target;r;){var o=this.gridOptionsService.getDomData(r,nr.DOM_DATA_KEY_ROW_CTRL);if(o)return o;r=r.parentElement}return null},t.prototype.handleContextMenuMouseEvent=function(e,r,o,i){var s=o?o.getRowNode():null,a=i?i.getColumn():null,l=null;if(a){var u=e||r;i.dispatchCellContextMenuEvent(u),l=this.valueService.getValue(a,s)}var c=this.ctrlsService.getGridBodyCtrl(),p=i?i.getGui():c.getGridBodyElement();this.contextMenuFactory&&this.contextMenuFactory.onContextMenu(e,r,s,a,l,p)},t.prototype.getControlsForEventTarget=function(e){return{cellCtrl:Oo(this.gridOptionsService,e,ir.DOM_DATA_KEY_CELL_CTRL),rowCtrl:Oo(this.gridOptionsService,e,nr.DOM_DATA_KEY_ROW_CTRL)}},t.prototype.processKeyboardEvent=function(e,r){var o=this.getControlsForEventTarget(r.target),i=o.cellCtrl,s=o.rowCtrl;r.defaultPrevented||(i?this.processCellKeyboardEvent(i,e,r):s&&s.isFullWidth()&&this.processFullWidthRowKeyboardEvent(s,e,r))},t.prototype.processCellKeyboardEvent=function(e,r,o){var i=e.getRowNode(),s=e.getColumn(),a=e.isEditing(),l=!Wo(this.gridOptionsService,o,i,s,a);if(l&&r==="keydown"){var u=!a&&this.navigationService.handlePageScrollingKey(o);u||e.onKeyDown(o),this.doGridOperations(o,e.isEditing()),On(o)&&e.processCharacter(o)}if(r==="keydown"){var c=e.createEvent(o,v.EVENT_CELL_KEY_DOWN);this.eventService.dispatchEvent(c)}},t.prototype.processFullWidthRowKeyboardEvent=function(e,r,o){var i=e.getRowNode(),s=this.focusService.getFocusedCell(),a=s&&s.column,l=!Wo(this.gridOptionsService,o,i,a,!1);if(l){var u=o.key;if(r==="keydown")switch(u){case R.PAGE_HOME:case R.PAGE_END:case R.PAGE_UP:case R.PAGE_DOWN:this.navigationService.handlePageScrollingKey(o,!0);break;case R.UP:case R.DOWN:e.onKeyboardNavigate(o);break;case R.TAB:e.onTabKeyDown(o);break}}if(r==="keydown"){var c=e.createRowEvent(v.EVENT_CELL_KEY_DOWN,o);this.eventService.dispatchEvent(c)}},t.prototype.doGridOperations=function(e,r){if(!(!e.ctrlKey&&!e.metaKey)&&!r&&this.mouseEventService.isEventFromThisGrid(e)){var o=$a(e);if(o===R.A)return this.onCtrlAndA(e);if(o===R.C)return this.onCtrlAndC(e);if(o===R.D)return this.onCtrlAndD(e);if(o===R.V)return this.onCtrlAndV(e);if(o===R.X)return this.onCtrlAndX(e);if(o===R.Y)return this.onCtrlAndY();if(o===R.Z)return this.onCtrlAndZ(e)}},t.prototype.onCtrlAndA=function(e){var r=this,o=r.pinnedRowModel,i=r.paginationProxy,s=r.rangeService;if(s&&i.isRowsToRender()){var a=If([o.isEmpty("top"),o.isEmpty("bottom")],2),l=a[0],u=a[1],c=l?null:"top",p=void 0,d=void 0;u?(p=null,d=this.paginationProxy.getRowCount()-1):(p="bottom",d=o.getPinnedBottomRowData().length-1);var f=this.columnModel.getAllDisplayedColumns();if(Pe(f))return;s.setCellRange({rowStartIndex:0,rowStartPinned:c,rowEndIndex:d,rowEndPinned:p,columnStart:f[0],columnEnd:Q(f)})}e.preventDefault()},t.prototype.onCtrlAndC=function(e){if(!(!this.clipboardService||this.gridOptionsService.is("enableCellTextSelection"))){var r=this.getControlsForEventTarget(e.target),o=r.cellCtrl,i=r.rowCtrl;o!=null&&o.isEditing()||i!=null&&i.isEditing()||(e.preventDefault(),this.clipboardService.copyToClipboard())}},t.prototype.onCtrlAndX=function(e){if(!(!this.clipboardService||this.gridOptionsService.is("enableCellTextSelection")||this.gridOptionsService.is("suppressCutToClipboard"))){var r=this.getControlsForEventTarget(e.target),o=r.cellCtrl,i=r.rowCtrl;o!=null&&o.isEditing()||i!=null&&i.isEditing()||(e.preventDefault(),this.clipboardService.cutToClipboard(void 0,"ui"))}},t.prototype.onCtrlAndV=function(e){var r=this.getControlsForEventTarget(e.target),o=r.cellCtrl,i=r.rowCtrl;o!=null&&o.isEditing()||i!=null&&i.isEditing()||this.clipboardService&&!this.gridOptionsService.is("suppressClipboardPaste")&&this.clipboardService.pasteFromClipboard()},t.prototype.onCtrlAndD=function(e){this.clipboardService&&!this.gridOptionsService.is("suppressClipboardPaste")&&this.clipboardService.copyRangeDown(),e.preventDefault()},t.prototype.onCtrlAndZ=function(e){this.gridOptionsService.is("undoRedoCellEditing")&&(e.preventDefault(),e.shiftKey?this.undoRedoService.redo("ui"):this.undoRedoService.undo("ui"))},t.prototype.onCtrlAndY=function(){this.undoRedoService.redo("ui")},Le([h("mouseEventService")],t.prototype,"mouseEventService",void 0),Le([h("valueService")],t.prototype,"valueService",void 0),Le([Y("contextMenuFactory")],t.prototype,"contextMenuFactory",void 0),Le([h("ctrlsService")],t.prototype,"ctrlsService",void 0),Le([h("navigationService")],t.prototype,"navigationService",void 0),Le([h("focusService")],t.prototype,"focusService",void 0),Le([h("undoRedoService")],t.prototype,"undoRedoService",void 0),Le([h("columnModel")],t.prototype,"columnModel",void 0),Le([h("paginationProxy")],t.prototype,"paginationProxy",void 0),Le([h("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),Le([Y("rangeService")],t.prototype,"rangeService",void 0),Le([Y("clipboardService")],t.prototype,"clipboardService",void 0),Le([P],t.prototype,"postConstruct",null),t}(T),Gf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ri=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Hf=function(n){Gf(t,n);function t(e){var r=n.call(this)||this;return r.centerContainerCtrl=e,r}return t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady(function(){e.gridBodyCtrl=e.ctrlsService.getGridBodyCtrl(),e.listenForResize()}),this.addManagedListener(this.eventService,v.EVENT_SCROLLBAR_WIDTH_CHANGED,this.onScrollbarWidthChanged.bind(this))},t.prototype.listenForResize=function(){var e=this,r=function(){return e.onCenterViewportResized()};this.centerContainerCtrl.registerViewportResizeListener(r),this.gridBodyCtrl.registerBodyViewportResizeListener(r)},t.prototype.onScrollbarWidthChanged=function(){this.checkViewportAndScrolls()},t.prototype.onCenterViewportResized=function(){if(this.centerContainerCtrl.isViewportVisible()){this.checkViewportAndScrolls();var e=this.centerContainerCtrl.getCenterWidth();e!==this.centerWidth&&(this.centerWidth=e,this.columnModel.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0},t.prototype.checkViewportAndScrolls=function(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.getScrollFeature().checkScrollLeft()},t.prototype.getBodyHeight=function(){return this.bodyHeight},t.prototype.checkBodyHeight=function(){var e=this.gridBodyCtrl.getBodyViewportElement(),r=Br(e);if(this.bodyHeight!==r){this.bodyHeight=r;var o={type:v.EVENT_BODY_HEIGHT_CHANGED};this.eventService.dispatchEvent(o)}},t.prototype.updateScrollVisibleService=function(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)},t.prototype.updateScrollVisibleServiceImpl=function(){var e={horizontalScrollShowing:this.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleService.setScrollsVisible(e)},t.prototype.isHorizontalScrollShowing=function(){return this.centerContainerCtrl.isHorizontalScrollShowing()},t.prototype.onHorizontalViewportChanged=function(){var e=this.centerContainerCtrl.getCenterWidth(),r=this.centerContainerCtrl.getViewportScrollLeft();this.columnModel.setViewportPosition(e,r)},ri([h("ctrlsService")],t.prototype,"ctrlsService",void 0),ri([h("columnModel")],t.prototype,"columnModel",void 0),ri([h("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),ri([P],t.prototype,"postConstruct",null),t}(T),Vf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ml=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Bf=function(n){Vf(t,n);function t(e){var r=n.call(this)||this;return r.element=e,r}return t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,v.EVENT_LEFT_PINNED_WIDTH_CHANGED,this.onPinnedLeftWidthChanged.bind(this))},t.prototype.onPinnedLeftWidthChanged=function(){var e=this.pinnedWidthService.getPinnedLeftWidth(),r=e>0;U(this.element,r),Be(this.element,e)},t.prototype.getWidth=function(){return this.pinnedWidthService.getPinnedLeftWidth()},Ml([h("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),Ml([P],t.prototype,"postConstruct",null),t}(T),Wf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Il=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},jf=function(n){Wf(t,n);function t(e){var r=n.call(this)||this;return r.element=e,r}return t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,v.EVENT_RIGHT_PINNED_WIDTH_CHANGED,this.onPinnedRightWidthChanged.bind(this))},t.prototype.onPinnedRightWidthChanged=function(){var e=this.pinnedWidthService.getPinnedRightWidth(),r=e>0;U(this.element,r),Be(this.element,e)},t.prototype.getWidth=function(){return this.pinnedWidthService.getPinnedRightWidth()},Il([h("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),Il([P],t.prototype,"postConstruct",null),t}(T),kf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Nl=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Gl=function(n){kf(t,n);function t(e,r){var o=n.call(this)||this;return o.eContainer=e,o.eWrapper=r,o}return t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,v.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onHeightChanged.bind(this))},t.prototype.onHeightChanged=function(){var e=this.maxDivHeightScaler.getUiContainerHeight(),r=e!=null?e+"px":"";this.eContainer.style.height=r,this.eWrapper&&(this.eWrapper.style.height=r)},Nl([h("rowContainerHeightService")],t.prototype,"maxDivHeightScaler",void 0),Nl([P],t.prototype,"postConstruct",null),t}(T),Uf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),es=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},zf=function(n){Uf(t,n);function t(e){var r=n.call(this)||this;return r.eContainer=e,r}return t.prototype.postConstruct=function(){var e=this;if(!(!this.gridOptionsService.isEnableRangeSelection()||N(this.rangeService))){var r={eElement:this.eContainer,onDragStart:this.rangeService.onDragStart.bind(this.rangeService),onDragStop:this.rangeService.onDragStop.bind(this.rangeService),onDragging:this.rangeService.onDragging.bind(this.rangeService)};this.dragService.addDragSource(r),this.addDestroyFunc(function(){return e.dragService.removeDragSource(r)})}},es([Y("rangeService")],t.prototype,"rangeService",void 0),es([h("dragService")],t.prototype,"dragService",void 0),es([P],t.prototype,"postConstruct",null),t}(T),$f=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ts=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},rs=function(n){$f(t,n);function t(e,r){r===void 0&&(r=!1);var o=n.call(this)||this;return o.callback=e,o.addSpacer=r,o}return t.prototype.postConstruct=function(){var e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,v.EVENT_LEFT_PINNED_WIDTH_CHANGED,e),this.addSpacer&&(this.addManagedListener(this.eventService,v.EVENT_RIGHT_PINNED_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,v.EVENT_SCROLL_VISIBILITY_CHANGED,e),this.addManagedListener(this.eventService,v.EVENT_SCROLLBAR_WIDTH_CHANGED,e)),this.setWidth()},t.prototype.setWidth=function(){var e=this.columnModel,r=this.gridOptionsService.isDomLayout("print"),o=e.getBodyContainerWidth(),i=e.getDisplayedColumnsLeftWidth(),s=e.getDisplayedColumnsRightWidth(),a;if(r)a=o+i+s;else if(a=o,this.addSpacer){var l=this.gridOptionsService.is("enableRtl")?i:s;l===0&&this.scrollVisibleService.isVerticalScrollShowing()&&(a+=this.gridOptionsService.getScrollbarWidth())}this.callback(a)},ts([h("columnModel")],t.prototype,"columnModel",void 0),ts([h("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),ts([P],t.prototype,"postConstruct",null),t}(T),Kf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),It=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},oi=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},ii=function(n,t){for(var e=0,r=t.length,o=n.length;e=0&&r()},t.prototype.getContainerElement=function(){return this.eContainer},t.prototype.getViewportSizeFeature=function(){return this.viewportSizeFeature},t.prototype.setComp=function(e,r,o,i){var s=this;this.comp=e,this.eContainer=r,this.eViewport=o,this.eWrapper=i,this.createManagedBean(new Nf(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder(),this.stopHScrollOnPinnedRows();var a=[_.TOP_CENTER,_.TOP_LEFT,_.TOP_RIGHT],l=[_.STICKY_TOP_CENTER,_.STICKY_TOP_LEFT,_.STICKY_TOP_RIGHT],u=[_.BOTTOM_CENTER,_.BOTTOM_LEFT,_.BOTTOM_RIGHT],c=[_.CENTER,_.LEFT,_.RIGHT],p=ii(ii(ii(ii([],oi(a)),oi(u)),oi(c)),oi(l)),d=[_.CENTER,_.LEFT,_.RIGHT,_.FULL_WIDTH],f=[_.CENTER,_.TOP_CENTER,_.STICKY_TOP_CENTER,_.BOTTOM_CENTER],g=[_.LEFT,_.BOTTOM_LEFT,_.TOP_LEFT,_.STICKY_TOP_LEFT],y=[_.RIGHT,_.BOTTOM_RIGHT,_.TOP_RIGHT,_.STICKY_TOP_RIGHT];this.forContainers(g,function(){s.pinnedWidthFeature=s.createManagedBean(new Bf(s.eContainer)),s.addManagedListener(s.eventService,v.EVENT_LEFT_PINNED_WIDTH_CHANGED,function(){return s.onPinnedWidthChanged()})}),this.forContainers(y,function(){s.pinnedWidthFeature=s.createManagedBean(new jf(s.eContainer)),s.addManagedListener(s.eventService,v.EVENT_RIGHT_PINNED_WIDTH_CHANGED,function(){return s.onPinnedWidthChanged()})}),this.forContainers(d,function(){return s.createManagedBean(new Gl(s.eContainer,s.eWrapper))}),this.forContainers(p,function(){return s.createManagedBean(new zf(s.eContainer))}),this.forContainers(f,function(){return s.createManagedBean(new rs(function(m){return s.comp.setContainerWidth(m+"px")}))}),hr()&&(this.forContainers([_.CENTER],function(){var m=s.enableRtl?v.EVENT_LEFT_PINNED_WIDTH_CHANGED:v.EVENT_RIGHT_PINNED_WIDTH_CHANGED;s.addManagedListener(s.eventService,m,function(){return s.refreshPaddingForFakeScrollbar()})}),this.refreshPaddingForFakeScrollbar()),this.addListeners(),this.registerWithCtrlsService()},t.prototype.refreshPaddingForFakeScrollbar=function(){var e=this,r=e.enableRtl,o=e.columnModel,i=e.name,s=e.eWrapper,a=e.eContainer,l=r?_.LEFT:_.RIGHT;this.forContainers([_.CENTER,l],function(){var u=o.getContainerWidth(l),c=r?"marginLeft":"marginRight";i===_.CENTER?s.style[c]=u?"0px":"16px":a.style[c]=u?"16px":"0px"})},t.prototype.addListeners=function(){var e=this;this.addManagedListener(this.eventService,v.EVENT_SCROLL_VISIBILITY_CHANGED,function(){return e.onScrollVisibilityChanged()}),this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_CHANGED,function(){return e.onDisplayedColumnsChanged()}),this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,function(){return e.onDisplayedColumnsWidthChanged()}),this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_ROWS_CHANGED,function(r){return e.onDisplayedRowsChanged(r.afterScroll)}),this.onScrollVisibilityChanged(),this.onDisplayedColumnsChanged(),this.onDisplayedColumnsWidthChanged(),this.onDisplayedRowsChanged()},t.prototype.listenOnDomOrder=function(){var e=this,r=[_.STICKY_TOP_CENTER,_.STICKY_TOP_LEFT,_.STICKY_TOP_RIGHT,_.STICKY_TOP_FULL_WIDTH],o=r.indexOf(this.name)>=0;if(o){this.comp.setDomOrder(!0);return}var i=function(){var s=e.gridOptionsService.is("ensureDomOrder"),a=e.gridOptionsService.isDomLayout("print");e.comp.setDomOrder(s||a)};this.addManagedPropertyListener("domLayout",i),i()},t.prototype.stopHScrollOnPinnedRows=function(){var e=this;this.forContainers([_.TOP_CENTER,_.STICKY_TOP_CENTER,_.BOTTOM_CENTER],function(){var r=function(){return e.eViewport.scrollLeft=0};e.addManagedListener(e.eViewport,"scroll",r)})},t.prototype.onDisplayedColumnsChanged=function(){var e=this;this.forContainers([_.CENTER],function(){return e.onHorizontalViewportChanged()})},t.prototype.onDisplayedColumnsWidthChanged=function(){var e=this;this.forContainers([_.CENTER],function(){return e.onHorizontalViewportChanged()})},t.prototype.onScrollVisibilityChanged=function(){var e=this,r=this.gridOptionsService.getScrollbarWidth()||0;if(this.name===_.CENTER){var o=this.scrollVisibleService.isHorizontalScrollShowing(),i=o?r:0,s=i==0?"100%":"calc(100% + "+i+"px)";this.animationFrameService.requestAnimationFrame(function(){return e.comp.setViewportHeight(s)})}if(this.name===_.FULL_WIDTH){var a=hr()?16:0,l="calc(100% - "+a+"px)";this.eContainer.style.setProperty("width",l)}},t.prototype.addPreventScrollWhileDragging=function(){var e=this,r=function(o){e.dragService.isDragging()&&o.cancelable&&o.preventDefault()};this.eContainer.addEventListener("touchmove",r,{passive:!1}),this.addDestroyFunc(function(){return e.eContainer.removeEventListener("touchmove",r)})},t.prototype.onHorizontalViewportChanged=function(){var e=this.getCenterWidth(),r=this.getCenterViewportScrollLeft();this.columnModel.setViewportPosition(e,r)},t.prototype.getCenterWidth=function(){return Vo(this.eViewport)},t.prototype.getCenterViewportScrollLeft=function(){return jr(this.eViewport,this.enableRtl)},t.prototype.registerViewportResizeListener=function(e){var r=this.resizeObserverService.observeResize(this.eViewport,e);this.addDestroyFunc(function(){return r()})},t.prototype.isViewportVisible=function(){return Ct(this.eViewport)},t.prototype.getViewportScrollLeft=function(){return jr(this.eViewport,this.enableRtl)},t.prototype.isHorizontalScrollShowing=function(){var e=this.gridOptionsService.is("alwaysShowHorizontalScroll");return e||Ba(this.eViewport)},t.prototype.getViewportElement=function(){return this.eViewport},t.prototype.setContainerTranslateX=function(e){this.eContainer.style.transform="translateX("+e+"px)"},t.prototype.getHScrollPosition=function(){var e={left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth};return e},t.prototype.setCenterViewportScrollLeft=function(e){kr(this.eViewport,e,this.enableRtl)},t.prototype.isContainerVisible=function(){var e=t.getPinned(this.name);return!e||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0},t.prototype.onPinnedWidthChanged=function(){var e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged()),hr()&&this.refreshPaddingForFakeScrollbar()},t.prototype.onDisplayedRowsChanged=function(e){var r=this;if(e===void 0&&(e=!1),this.visible){var o=this.gridOptionsService.isDomLayout("print"),i=function(a){var l=a.isFullWidth(),u=r.embedFullWidthRows||o,c=r.isFullWithContainer?!u&&l:u||!l;return c},s=this.getRowCtrls().filter(i);this.comp.setRowCtrls(s,e)}else this.comp.setRowCtrls(this.EMPTY_CTRLS,!1)},t.prototype.getRowCtrls=function(){switch(this.name){case _.TOP_CENTER:case _.TOP_LEFT:case _.TOP_RIGHT:case _.TOP_FULL_WIDTH:return this.rowRenderer.getTopRowCtrls();case _.STICKY_TOP_CENTER:case _.STICKY_TOP_LEFT:case _.STICKY_TOP_RIGHT:case _.STICKY_TOP_FULL_WIDTH:return this.rowRenderer.getStickyTopRowCtrls();case _.BOTTOM_CENTER:case _.BOTTOM_LEFT:case _.BOTTOM_RIGHT:case _.BOTTOM_FULL_WIDTH:return this.rowRenderer.getBottomRowCtrls();default:return this.rowRenderer.getRowCtrls()}},It([h("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),It([h("dragService")],t.prototype,"dragService",void 0),It([h("ctrlsService")],t.prototype,"ctrlsService",void 0),It([h("columnModel")],t.prototype,"columnModel",void 0),It([h("resizeObserverService")],t.prototype,"resizeObserverService",void 0),It([h("animationFrameService")],t.prototype,"animationFrameService",void 0),It([h("rowRenderer")],t.prototype,"rowRenderer",void 0),It([P],t.prototype,"postConstruct",null),t}(T),Jf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),at=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Zf=`
+
`,qr([D("eFloatingFilterBody")],t.prototype,"eFloatingFilterBody",void 0),qr([D("eButtonWrapper")],t.prototype,"eButtonWrapper",void 0),qr([D("eButtonShowMainFilter")],t.prototype,"eButtonShowMainFilter",void 0),qr([P],t.prototype,"postConstruct",null),qr([ae],t.prototype,"destroyFloatingFilterComp",null),t}(Yn),Vh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Bh=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},ne;(function(n){n.AUTO_HEIGHT="ag-layout-auto-height",n.NORMAL="ag-layout-normal",n.PRINT="ag-layout-print"})(ne||(ne={}));var qn=function(n){Vh(t,n);function t(e){var r=n.call(this)||this;return r.view=e,r}return t.prototype.postConstruct=function(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()},t.prototype.updateLayoutClasses=function(){var e=this.getDomLayout(),r={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},o=r.autoHeight?ne.AUTO_HEIGHT:r.print?ne.PRINT:ne.NORMAL;this.view.updateLayoutClasses(o,r)},t.prototype.getDomLayout=function(){var e,r=(e=this.gridOptionsService.get("domLayout"))!==null&&e!==void 0?e:"normal",o=["normal","print","autoHeight"];return o.indexOf(r)===-1?(z(function(){return console.warn("AG Grid: "+r+" is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.")},"warn about dom layout values"),"normal"):r},Bh([P],t.prototype,"postConstruct",null),t}(T),Wh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Zo=function(){return Zo=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},ve;(function(n){n[n.Vertical=0]="Vertical",n[n.Horizontal=1]="Horizontal"})(ve||(ve={}));var me;(function(n){n[n.Container=0]="Container",n[n.FakeContainer=1]="FakeContainer"})(me||(me={}));var jh=function(n){Wh(t,n);function t(e){var r=n.call(this)||this;return r.lastScrollSource=[null,null],r.scrollLeft=-1,r.nextScrollTop=-1,r.scrollTop=-1,r.eBodyViewport=e,r.resetLastHScrollDebounced=rt(function(){return r.lastScrollSource[ve.Horizontal]=null},500),r.resetLastVScrollDebounced=rt(function(){return r.lastScrollSource[ve.Vertical]=null},500),r}return t.prototype.postConstruct=function(){var e=this;this.enableRtl=this.gridOptionsService.is("enableRtl"),this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this)),this.ctrlsService.whenReady(function(r){e.centerRowContainerCtrl=r.centerRowContainerCtrl,e.onDisplayedColumnsWidthChanged(),e.addScrollListener()})},t.prototype.addScrollListener=function(){var e=this.ctrlsService.getFakeHScrollComp(),r=this.ctrlsService.getFakeVScrollComp();this.addManagedListener(this.centerRowContainerCtrl.getViewportElement(),"scroll",this.onHScroll.bind(this)),e.onScrollCallback(this.onFakeHScroll.bind(this));var o=this.gridOptionsService.is("debounceVerticalScrollbar"),i=o?rt(this.onVScroll.bind(this),100):this.onVScroll.bind(this),s=o?rt(this.onFakeVScroll.bind(this),100):this.onFakeVScroll.bind(this);this.addManagedListener(this.eBodyViewport,"scroll",i),r.onScrollCallback(s)},t.prototype.onDisplayedColumnsWidthChanged=function(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()},t.prototype.horizontallyScrollHeaderCenterAndFloatingCenter=function(e){var r=this.centerRowContainerCtrl==null;if(!r){e===void 0&&(e=this.centerRowContainerCtrl.getCenterViewportScrollLeft());var o=this.enableRtl?e:-e,i=this.ctrlsService.getTopCenterRowContainerCtrl(),s=this.ctrlsService.getStickyTopCenterRowContainerCtrl(),a=this.ctrlsService.getBottomCenterRowContainerCtrl(),l=this.ctrlsService.getFakeHScrollComp(),u=this.ctrlsService.getHeaderRowContainerCtrl();u.setHorizontalScroll(-o),a.setContainerTranslateX(o),i.setContainerTranslateX(o),s.setContainerTranslateX(o);var c=this.centerRowContainerCtrl.getViewportElement(),p=this.lastScrollSource[ve.Horizontal]===me.Container;e=Math.abs(e),p?l.setScrollPosition(e):kr(c,e,this.enableRtl)}},t.prototype.isControllingScroll=function(e,r){return this.lastScrollSource[r]==null?(this.lastScrollSource[r]=e,!0):this.lastScrollSource[r]===e},t.prototype.onFakeHScroll=function(){this.isControllingScroll(me.FakeContainer,ve.Horizontal)&&this.onHScrollCommon(me.FakeContainer)},t.prototype.onHScroll=function(){this.isControllingScroll(me.Container,ve.Horizontal)&&this.onHScrollCommon(me.Container)},t.prototype.onHScrollCommon=function(e){var r=this.centerRowContainerCtrl.getViewportElement(),o=r.scrollLeft;if(!this.shouldBlockScrollUpdate(ve.Horizontal,o,!0)){var i;e===me.Container?i=jr(r,this.enableRtl):i=this.ctrlsService.getFakeHScrollComp().getScrollPosition(),this.doHorizontalScroll(Math.round(i)),this.resetLastHScrollDebounced()}},t.prototype.onFakeVScroll=function(){this.isControllingScroll(me.FakeContainer,ve.Vertical)&&this.onVScrollCommon(me.FakeContainer)},t.prototype.onVScroll=function(){this.isControllingScroll(me.Container,ve.Vertical)&&this.onVScrollCommon(me.Container)},t.prototype.onVScrollCommon=function(e){var r;e===me.Container?r=this.eBodyViewport.scrollTop:r=this.ctrlsService.getFakeVScrollComp().getScrollPosition(),!this.shouldBlockScrollUpdate(ve.Vertical,r,!0)&&(this.animationFrameService.setScrollTop(r),this.nextScrollTop=r,e===me.Container?this.ctrlsService.getFakeVScrollComp().setScrollPosition(r):this.eBodyViewport.scrollTop=r,this.gridOptionsService.is("suppressAnimationFrame")?this.scrollGridIfNeeded():this.animationFrameService.schedule(),this.resetLastVScrollDebounced())},t.prototype.doHorizontalScroll=function(e){var r=this.ctrlsService.getFakeHScrollComp().getScrollPosition();this.scrollLeft===e&&e===r||(this.scrollLeft=e,this.fireScrollEvent(ve.Horizontal),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.onHorizontalViewportChanged())},t.prototype.fireScrollEvent=function(e){var r=this,o={type:v.EVENT_BODY_SCROLL,direction:e===ve.Horizontal?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(o),window.clearTimeout(this.scrollTimer),this.scrollTimer=void 0,this.scrollTimer=window.setTimeout(function(){var i=Zo(Zo({},o),{type:v.EVENT_BODY_SCROLL_END});r.eventService.dispatchEvent(i)},100)},t.prototype.shouldBlockScrollUpdate=function(e,r,o){return o===void 0&&(o=!1),o&&!At()?!1:e===ve.Vertical?this.shouldBlockVerticalScroll(r):this.shouldBlockHorizontalScroll(r)},t.prototype.shouldBlockVerticalScroll=function(e){var r=Br(this.eBodyViewport),o=this.eBodyViewport.scrollHeight;return e<0||e+r>o},t.prototype.shouldBlockHorizontalScroll=function(e){var r=this.centerRowContainerCtrl.getCenterWidth(),o=this.centerRowContainerCtrl.getViewportElement().scrollWidth;if(this.enableRtl&&Wr()){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+r>o},t.prototype.redrawRowsAfterScroll=function(){this.fireScrollEvent(ve.Vertical)},t.prototype.onHorizontalViewportChanged=function(){this.centerRowContainerCtrl.onHorizontalViewportChanged()},t.prototype.checkScrollLeft=function(){this.scrollLeft!==this.centerRowContainerCtrl.getCenterViewportScrollLeft()&&this.onHScrollCommon(me.Container)},t.prototype.scrollGridIfNeeded=function(){var e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),e},t.prototype.setHorizontalScrollPosition=function(e,r){r===void 0&&(r=!1);var o=0,i=this.centerRowContainerCtrl.getViewportElement().scrollWidth-this.centerRowContainerCtrl.getCenterWidth();!r&&this.shouldBlockScrollUpdate(ve.Horizontal,e)&&(this.enableRtl&&Wr()?e=e>0?0:i:e=Math.min(Math.max(e,o),i)),kr(this.centerRowContainerCtrl.getViewportElement(),Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)},t.prototype.setVerticalScrollPosition=function(e){this.eBodyViewport.scrollTop=e},t.prototype.getVScrollPosition=function(){var e={top:this.eBodyViewport.scrollTop,bottom:this.eBodyViewport.scrollTop+this.eBodyViewport.offsetHeight};return e},t.prototype.getHScrollPosition=function(){return this.centerRowContainerCtrl.getHScrollPosition()},t.prototype.isHorizontalScrollShowing=function(){return this.centerRowContainerCtrl.isHorizontalScrollShowing()},t.prototype.scrollHorizontally=function(e){var r=this.centerRowContainerCtrl.getViewportElement().scrollLeft;return this.setHorizontalScrollPosition(r+e),this.centerRowContainerCtrl.getViewportElement().scrollLeft-r},t.prototype.scrollToTop=function(){this.eBodyViewport.scrollTop=0},t.prototype.ensureNodeVisible=function(e,r){r===void 0&&(r=null);for(var o=this.rowModel.getRowCount(),i=-1,s=0;s=0&&this.ensureIndexVisible(i,r)},t.prototype.ensureIndexVisible=function(e,r){if(!this.gridOptionsService.isDomLayout("print")){var o=this.paginationProxy.getRowCount();if(typeof e!="number"||e<0||e>=o){console.warn("AG Grid: Invalid row index for ensureIndexVisible: "+e);return}var i=this.gridOptionsService.is("pagination"),s=i&&!this.gridOptionsService.is("suppressPaginationPanel");s||this.paginationProxy.goToPageWithIndex(e);var a=this.ctrlsService.getGridBodyCtrl(),l=a.getStickyTopHeight(),u=this.paginationProxy.getRow(e),c;do{var p=u.rowTop,d=u.rowHeight,f=this.paginationProxy.getPixelOffset(),g=u.rowTop-f,y=g+u.rowHeight,m=this.getVScrollPosition(),C=this.heightScaler.getDivStretchOffset(),w=m.top+C,S=m.bottom+C,E=S-w,A=this.heightScaler.getScrollPositionForPixel(g),b=this.heightScaler.getScrollPositionForPixel(y-E),I=Math.min((A+b)/2,g),F=w+l>g,M=Sl:ia;return{columnBeforeStart:c,columnAfterEnd:p}},t.prototype.getColumnBounds=function(e){var r=this.enableRtl,o=this.columnModel.getBodyContainerWidth(),i=e.getActualWidth(),s=e.getLeft(),a=r?-1:1,l=r?o-s:s,u=l+i*a,c=l+i/2*a;return{colLeft:l,colMiddle:c,colRight:u}},t.prototype.getViewportBounds=function(){var e=this.centerRowContainerCtrl.getCenterWidth(),r=this.centerRowContainerCtrl.getCenterViewportScrollLeft(),o=r,i=e+r;return{start:o,end:i,width:e}},It([h("ctrlsService")],t.prototype,"ctrlsService",void 0),It([h("animationFrameService")],t.prototype,"animationFrameService",void 0),It([h("paginationProxy")],t.prototype,"paginationProxy",void 0),It([h("rowModel")],t.prototype,"rowModel",void 0),It([h("rowContainerHeightService")],t.prototype,"heightScaler",void 0),It([h("rowRenderer")],t.prototype,"rowRenderer",void 0),It([h("columnModel")],t.prototype,"columnModel",void 0),It([P],t.prototype,"postConstruct",null),t}(T),kh=function(){function n(t){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=t.scrollContainer,this.scrollHorizontally=t.scrollAxis.indexOf("x")!==-1,this.scrollVertically=t.scrollAxis.indexOf("y")!==-1,this.scrollByTick=t.scrollByTick!=null?t.scrollByTick:20,t.onScrollCallback&&(this.onScrollCallback=t.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=t.getVerticalPosition,this.setVerticalPosition=t.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=t.getHorizontalPosition,this.setHorizontalPosition=t.setHorizontalPosition),this.shouldSkipVerticalScroll=t.shouldSkipVerticalScroll||function(){return!1},this.shouldSkipHorizontalScroll=t.shouldSkipHorizontalScroll||function(){return!1}}return n.prototype.check=function(t,e){e===void 0&&(e=!1);var r=e||this.shouldSkipVerticalScroll();if(!(r&&this.shouldSkipHorizontalScroll())){var o=this.scrollContainer.getBoundingClientRect(),i=this.scrollByTick;this.tickLeft=t.clientXo.right-i,this.tickUp=t.clientYo.bottom-i&&!r,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}},n.prototype.ensureTickingStarted=function(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)},n.prototype.doTick=function(){this.tickCount++;var t;if(t=this.tickCount>20?200:this.tickCount>10?80:40,this.scrollVertically){var e=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(e-t),this.tickDown&&this.setVerticalPosition(e+t)}if(this.scrollHorizontally){var r=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(r-t),this.tickRight&&this.setHorizontalPosition(r+t)}this.onScrollCallback&&this.onScrollCallback()},n.prototype.ensureCleared=function(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)},n}(),Uh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Qn=function(){return Qn=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},zh=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},$h=function(n,t){for(var e=0,r=t.length,o=n.length;ethis.paginationProxy.getCurrentPageHeight(),s=-1,a;i||(s=this.rowModel.getRowIndexAtPixel(o),a=this.rowModel.getRow(s));var l;switch(r.vDirection){case Er.Down:l="down";break;case Er.Up:l="up";break;default:l=null;break}var u={type:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,event:r.event,node:r.dragItem.rowNode,nodes:r.dragItem.rowNodes,overIndex:s,overNode:a,y:o,vDirection:l};return u},t.prototype.dispatchGridEvent=function(e,r){var o=this.draggingToRowDragEvent(e,r);this.eventService.dispatchEvent(o)},t.prototype.onDragLeave=function(e){this.dispatchGridEvent(v.EVENT_ROW_DRAG_LEAVE,e),this.stopDragging(e),this.gridOptionsService.is("rowDragManaged")&&this.clearRowHighlight(),this.isFromThisGrid(e)&&(this.isMultiRowDrag=!1)},t.prototype.onDragStop=function(e){this.dispatchGridEvent(v.EVENT_ROW_DRAG_END,e),this.stopDragging(e),this.gridOptionsService.is("rowDragManaged")&&(this.gridOptionsService.is("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&!this.isDropZoneWithinThisGrid(e)&&this.moveRowAndClearHighlight(e)},t.prototype.stopDragging=function(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach(function(r){r.setDragging(!1)})},ke([h("dragAndDropService")],t.prototype,"dragAndDropService",void 0),ke([h("rowModel")],t.prototype,"rowModel",void 0),ke([h("paginationProxy")],t.prototype,"paginationProxy",void 0),ke([h("columnModel")],t.prototype,"columnModel",void 0),ke([h("focusService")],t.prototype,"focusService",void 0),ke([h("sortController")],t.prototype,"sortController",void 0),ke([h("filterManager")],t.prototype,"filterManager",void 0),ke([h("selectionService")],t.prototype,"selectionService",void 0),ke([h("mouseEventService")],t.prototype,"mouseEventService",void 0),ke([h("ctrlsService")],t.prototype,"ctrlsService",void 0),ke([Y("rangeService")],t.prototype,"rangeService",void 0),ke([P],t.prototype,"postConstruct",null),t}(T),Yh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),xe=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Rr;(function(n){n.ANIMATION_ON="ag-row-animation",n.ANIMATION_OFF="ag-row-no-animation"})(Rr||(Rr={}));var xl="ag-force-vertical-scroll",qh="ag-selectable",Qh="ag-column-moving",Xh=function(n){Yh(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.stickyTopHeight=0,e}return t.prototype.getScrollFeature=function(){return this.bodyScrollFeature},t.prototype.getBodyViewportElement=function(){return this.eBodyViewport},t.prototype.setComp=function(e,r,o,i,s,a){this.comp=e,this.eGridBody=r,this.eBodyViewport=o,this.eTop=i,this.eBottom=s,this.eStickyTop=a,this.setCellTextSelection(this.gridOptionsService.is("enableCellTextSelection")),this.createManagedBean(new qn(this.comp)),this.bodyScrollFeature=this.createManagedBean(new jh(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([i,o,s,a]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.ctrlsService.registerGridBodyCtrl(this)},t.prototype.getComp=function(){return this.comp},t.prototype.addEventListeners=function(){this.addManagedListener(this.eventService,v.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))},t.prototype.addFocusListeners=function(e){var r=this;e.forEach(function(o){r.addManagedListener(o,"focusin",function(i){var s=i.target,a=Xt(s,"ag-root",o);o.classList.toggle("ag-has-focus",!a)}),r.addManagedListener(o,"focusout",function(i){var s=i.target,a=i.relatedTarget,l=o.contains(a),u=Xt(a,"ag-root",o),c=Xt(s,"ag-root",o);c||(!l||u)&&o.classList.remove("ag-has-focus")})})},t.prototype.setColumnMovingCss=function(e){this.comp.setColumnMovingCss(Qh,e)},t.prototype.setCellTextSelection=function(e){e===void 0&&(e=!1),this.comp.setCellSelectableCss(qh,e)},t.prototype.onScrollVisibilityChanged=function(){var e=this,r=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(r),this.setStickyTopWidth(r);var o=r&&this.gridOptionsService.getScrollbarWidth()||0,i=hr()?16:0,s="calc(100% + "+(o+i)+"px)";this.animationFrameService.requestAnimationFrame(function(){return e.comp.setBodyViewportWidth(s)})},t.prototype.onGridColumnsChanged=function(){var e=this.columnModel.getAllGridColumns();this.comp.setColumnCount(e?e.length:0)},t.prototype.disableBrowserDragging=function(){this.addManagedListener(this.eGridBody,"dragstart",function(e){if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1})},t.prototype.addStopEditingWhenGridLosesFocus=function(){var e=this;if(this.gridOptionsService.is("stopEditingWhenCellsLoseFocus")){var r=function(i){var s=i.relatedTarget;if(No(s)===null){e.rowRenderer.stopEditing();return}var a=o.some(function(u){return u.contains(s)})&&e.mouseEventService.isElementInThisGrid(s);if(!a){var l=e.popupService;a=l.getActivePopups().some(function(u){return u.contains(s)})||l.isElementWithinCustomPopup(s)}a||e.rowRenderer.stopEditing()},o=[this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop];o.forEach(function(i){return e.addManagedListener(i,"focusout",r)})}},t.prototype.updateRowCount=function(){var e=this.headerNavigationService.getHeaderRowCount(),r=this.rowModel.isLastRowIndexKnown()?this.rowModel.getRowCount():-1,o=r===-1?-1:e+r;this.comp.setRowCount(o)},t.prototype.registerBodyViewportResizeListener=function(e){this.comp.registerBodyViewportResizeListener(e)},t.prototype.setVerticalScrollPaddingVisible=function(e){var r=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(r)},t.prototype.isVerticalScrollShowing=function(){var e=this.gridOptionsService.is("alwaysShowVerticalScroll"),r=e?xl:null,o=this.gridOptionsService.isDomLayout("normal");return this.comp.setAlwaysVerticalScrollClass(r,e),e||o&&Wa(this.eBodyViewport)},t.prototype.setupRowAnimationCssClass=function(){var e=this,r=function(){var o=e.gridOptionsService.isAnimateRows()&&!e.rowContainerHeightService.isStretching(),i=o?Rr.ANIMATION_ON:Rr.ANIMATION_OFF;e.comp.setRowAnimationCssOnBodyViewport(i,o)};r(),this.addManagedListener(this.eventService,v.EVENT_HEIGHT_SCALE_CHANGED,r),this.addManagedPropertyListener("animateRows",r)},t.prototype.getGridBodyElement=function(){return this.eGridBody},t.prototype.addBodyViewportListener=function(){var e=this.onBodyViewportContextMenu.bind(this);this.addManagedListener(this.eBodyViewport,"contextmenu",e),this.mockContextMenuForIPad(e),this.addManagedListener(this.eBodyViewport,"wheel",this.onBodyViewportWheel.bind(this)),this.addManagedListener(this.eStickyTop,"wheel",this.onStickyTopWheel.bind(this)),this.addFullWidthContainerWheelListener()},t.prototype.addFullWidthContainerWheelListener=function(){var e=this,r=this.eBodyViewport.querySelector(".ag-full-width-container"),o=this.eBodyViewport.querySelector(".ag-center-cols-viewport");r&&o&&this.addManagedListener(r,"wheel",function(i){return e.onFullWidthContainerWheel(i,o)})},t.prototype.onFullWidthContainerWheel=function(e,r){!e.deltaX||Math.abs(e.deltaY)>Math.abs(e.deltaX)||!this.mouseEventService.isEventFromThisGrid(e)||(e.preventDefault(),r.scrollBy({left:e.deltaX}))},t.prototype.onBodyViewportContextMenu=function(e,r,o){if(!(!e&&!o)){if(this.gridOptionsService.is("preventDefaultOnContextMenu")){var i=e||o;i.preventDefault()}var s=(e||r).target;if(s===this.eBodyViewport||s===this.ctrlsService.getCenterRowContainerCtrl().getViewportElement()){if(!this.contextMenuFactory)return;e?this.contextMenuFactory.onContextMenu(e,null,null,null,null,this.eGridBody):o&&this.contextMenuFactory.onContextMenu(null,o,null,null,null,this.eGridBody)}}},t.prototype.mockContextMenuForIPad=function(e){if(At()){var r=new be(this.eBodyViewport),o=function(i){e(void 0,i.touchStart,i.touchEvent)};this.addManagedListener(r,be.EVENT_LONG_TAP,o),this.addDestroyFunc(function(){return r.destroy()})}},t.prototype.onBodyViewportWheel=function(e){this.gridOptionsService.is("suppressScrollWhenPopupsAreOpen")&&this.popupService.hasAnchoredPopup()&&e.preventDefault()},t.prototype.onStickyTopWheel=function(e){e.preventDefault(),e.offsetY&&this.scrollVertically(e.deltaY)},t.prototype.getGui=function(){return this.eGridBody},t.prototype.scrollVertically=function(e){var r=this.eBodyViewport.scrollTop;return this.bodyScrollFeature.setVerticalScrollPosition(r+e),this.eBodyViewport.scrollTop-r},t.prototype.addRowDragListener=function(){this.rowDragFeature=this.createManagedBean(new Kh(this.eBodyViewport)),this.dragAndDropService.addDropTarget(this.rowDragFeature)},t.prototype.getRowDragFeature=function(){return this.rowDragFeature},t.prototype.onPinnedRowDataChanged=function(){this.setFloatingHeights()},t.prototype.setFloatingHeights=function(){var e=this.pinnedRowModel,r=e.getPinnedTopTotalHeight();r&&(r+=1);var o=e.getPinnedBottomTotalHeight();o&&(o+=1),this.comp.setTopHeight(r),this.comp.setBottomHeight(o),this.comp.setTopDisplay(r?"inherit":"none"),this.comp.setBottomDisplay(o?"inherit":"none"),this.setStickyTopOffsetTop()},t.prototype.setStickyTopHeight=function(e){e===void 0&&(e=0),this.comp.setStickyTopHeight(e+"px"),this.stickyTopHeight=e},t.prototype.getStickyTopHeight=function(){return this.stickyTopHeight},t.prototype.setStickyTopWidth=function(e){if(!e)this.comp.setStickyTopWidth("100%");else{var r=this.gridOptionsService.getScrollbarWidth();this.comp.setStickyTopWidth("calc(100% - "+r+"px)")}},t.prototype.onHeaderHeightChanged=function(){this.setStickyTopOffsetTop()},t.prototype.setStickyTopOffsetTop=function(){var e=this.ctrlsService.getGridHeaderCtrl(),r=e.getHeaderHeight(),o=this.pinnedRowModel.getPinnedTopTotalHeight(),i=0;r>0&&(i+=r+1),o>0&&(i+=o+1),this.comp.setStickyTopTop(i+"px")},t.prototype.sizeColumnsToFit=function(e,r){var o=this,i=this.isVerticalScrollShowing(),s=i?this.gridOptionsService.getScrollbarWidth():0,a=Vo(this.eGridBody),l=a-s;if(l>0){this.columnModel.sizeColumnsToFit(l,"sizeColumnsToFit",!1,e);return}r===void 0?window.setTimeout(function(){o.sizeColumnsToFit(e,100)},0):r===100?window.setTimeout(function(){o.sizeColumnsToFit(e,500)},100):r===500?window.setTimeout(function(){o.sizeColumnsToFit(e,-1)},500):console.warn("AG Grid: tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?")},t.prototype.addScrollEventListener=function(e){this.eBodyViewport.addEventListener("scroll",e,{passive:!0})},t.prototype.removeScrollEventListener=function(e){this.eBodyViewport.removeEventListener("scroll",e)},xe([h("animationFrameService")],t.prototype,"animationFrameService",void 0),xe([h("rowContainerHeightService")],t.prototype,"rowContainerHeightService",void 0),xe([h("ctrlsService")],t.prototype,"ctrlsService",void 0),xe([h("columnModel")],t.prototype,"columnModel",void 0),xe([h("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),xe([Y("contextMenuFactory")],t.prototype,"contextMenuFactory",void 0),xe([h("headerNavigationService")],t.prototype,"headerNavigationService",void 0),xe([h("dragAndDropService")],t.prototype,"dragAndDropService",void 0),xe([h("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),xe([h("rowRenderer")],t.prototype,"rowRenderer",void 0),xe([h("popupService")],t.prototype,"popupService",void 0),xe([h("mouseEventService")],t.prototype,"mouseEventService",void 0),xe([h("rowModel")],t.prototype,"rowModel",void 0),t}(T),ei;(function(n){n[n.FILL=0]="FILL",n[n.RANGE=1]="RANGE"})(ei||(ei={}));var Or;(function(n){n[n.VALUE=0]="VALUE",n[n.DIMENSION=1]="DIMENSION"})(Or||(Or={}));var Qr="ag-cell-range-selected",Jh="ag-cell-range-chart",Zh="ag-cell-range-single-cell",ef="ag-cell-range-chart-category",tf="ag-cell-range-handle",rf="ag-cell-range-top",of="ag-cell-range-right",nf="ag-cell-range-bottom",sf="ag-cell-range-left",af=function(){function n(t,e){this.beans=t,this.cellCtrl=e}return n.prototype.setComp=function(t,e){this.cellComp=t,this.eGui=e,this.onRangeSelectionChanged()},n.prototype.onRangeSelectionChanged=function(){this.cellComp&&(this.rangeCount=this.beans.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()),this.hasChartRange=this.getHasChartRange(),this.cellComp.addOrRemoveCssClass(Qr,this.rangeCount!==0),this.cellComp.addOrRemoveCssClass(Qr+"-1",this.rangeCount===1),this.cellComp.addOrRemoveCssClass(Qr+"-2",this.rangeCount===2),this.cellComp.addOrRemoveCssClass(Qr+"-3",this.rangeCount===3),this.cellComp.addOrRemoveCssClass(Qr+"-4",this.rangeCount>=4),this.cellComp.addOrRemoveCssClass(Jh,this.hasChartRange),dr(this.eGui,this.rangeCount>0?!0:void 0),this.cellComp.addOrRemoveCssClass(Zh,this.isSingleCell()),this.updateRangeBorders(),this.refreshHandle())},n.prototype.updateRangeBorders=function(){var t=this.getRangeBorders(),e=this.isSingleCell(),r=!e&&t.top,o=!e&&t.right,i=!e&&t.bottom,s=!e&&t.left;this.cellComp.addOrRemoveCssClass(rf,r),this.cellComp.addOrRemoveCssClass(of,o),this.cellComp.addOrRemoveCssClass(nf,i),this.cellComp.addOrRemoveCssClass(sf,s)},n.prototype.isSingleCell=function(){var t=this.beans.rangeService;return this.rangeCount===1&&t&&!t.isMoreThanOneCell()},n.prototype.getHasChartRange=function(){var t=this.beans.rangeService;if(!this.rangeCount||!t)return!1;var e=t.getCellRanges();return e.length>0&&e.every(function(r){return Me([Or.DIMENSION,Or.VALUE],r.type)})},n.prototype.updateRangeBordersIfRangeCount=function(){this.rangeCount>0&&(this.updateRangeBorders(),this.refreshHandle())},n.prototype.getRangeBorders=function(){var t=this,e=this.beans.gridOptionsService.is("enableRtl"),r=!1,o=!1,i=!1,s=!1,a=this.cellCtrl.getCellPosition().column,l=this.beans,u=l.rangeService,c=l.columnModel,p,d;e?(p=c.getDisplayedColAfter(a),d=c.getDisplayedColBefore(a)):(p=c.getDisplayedColBefore(a),d=c.getDisplayedColAfter(a));var f=u.getCellRanges().filter(function(w){return u.isCellInSpecificRange(t.cellCtrl.getCellPosition(),w)});p||(s=!0),d||(o=!0);for(var g=0;g=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Ll=function(){function n(){}return n.prototype.postConstruct=function(){this.doingMasterDetail=this.gridOptionsService.isMasterDetail(),this.gridOptionsService.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.gridOptionsService.isRowModelType("serverSide")&&(this.serverSideRowModel=this.rowModel)},B([h("resizeObserverService")],n.prototype,"resizeObserverService",void 0),B([h("paginationProxy")],n.prototype,"paginationProxy",void 0),B([h("context")],n.prototype,"context",void 0),B([h("columnApi")],n.prototype,"columnApi",void 0),B([h("gridApi")],n.prototype,"gridApi",void 0),B([h("gridOptionsService")],n.prototype,"gridOptionsService",void 0),B([h("expressionService")],n.prototype,"expressionService",void 0),B([h("environment")],n.prototype,"environment",void 0),B([h("rowRenderer")],n.prototype,"rowRenderer",void 0),B([h("templateService")],n.prototype,"templateService",void 0),B([h("valueService")],n.prototype,"valueService",void 0),B([h("eventService")],n.prototype,"eventService",void 0),B([h("columnModel")],n.prototype,"columnModel",void 0),B([h("headerNavigationService")],n.prototype,"headerNavigationService",void 0),B([h("navigationService")],n.prototype,"navigationService",void 0),B([h("columnAnimationService")],n.prototype,"columnAnimationService",void 0),B([Y("rangeService")],n.prototype,"rangeService",void 0),B([h("focusService")],n.prototype,"focusService",void 0),B([Y("contextMenuFactory")],n.prototype,"contextMenuFactory",void 0),B([h("popupService")],n.prototype,"popupService",void 0),B([h("valueFormatterService")],n.prototype,"valueFormatterService",void 0),B([h("stylingService")],n.prototype,"stylingService",void 0),B([h("columnHoverService")],n.prototype,"columnHoverService",void 0),B([h("userComponentFactory")],n.prototype,"userComponentFactory",void 0),B([h("userComponentRegistry")],n.prototype,"userComponentRegistry",void 0),B([h("animationFrameService")],n.prototype,"animationFrameService",void 0),B([h("dragService")],n.prototype,"dragService",void 0),B([h("dragAndDropService")],n.prototype,"dragAndDropService",void 0),B([h("sortController")],n.prototype,"sortController",void 0),B([h("filterManager")],n.prototype,"filterManager",void 0),B([h("rowContainerHeightService")],n.prototype,"rowContainerHeightService",void 0),B([h("frameworkOverrides")],n.prototype,"frameworkOverrides",void 0),B([h("cellPositionUtils")],n.prototype,"cellPositionUtils",void 0),B([h("rowPositionUtils")],n.prototype,"rowPositionUtils",void 0),B([h("selectionService")],n.prototype,"selectionService",void 0),B([Y("selectionHandleFactory")],n.prototype,"selectionHandleFactory",void 0),B([h("rowCssClassCalculator")],n.prototype,"rowCssClassCalculator",void 0),B([h("rowModel")],n.prototype,"rowModel",void 0),B([h("ctrlsService")],n.prototype,"ctrlsService",void 0),B([h("ctrlsFactory")],n.prototype,"ctrlsFactory",void 0),B([h("agStackComponentsRegistry")],n.prototype,"agStackComponentsRegistry",void 0),B([h("valueCache")],n.prototype,"valueCache",void 0),B([h("rowNodeEventThrottle")],n.prototype,"rowNodeEventThrottle",void 0),B([h("localeService")],n.prototype,"localeService",void 0),B([h("valueParserService")],n.prototype,"valueParserService",void 0),B([P],n.prototype,"postConstruct",null),n=B([x("beans")],n),n}(),hf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ff=function(n){hf(t,n);function t(e,r,o){var i=n.call(this)||this;return i.cellCtrl=e,i.beans=r,i.column=o,i}return t.prototype.onMouseEvent=function(e,r){if(!ot(r))switch(e){case"click":this.onCellClicked(r);break;case"mousedown":case"touchstart":this.onMouseDown(r);break;case"dblclick":this.onCellDoubleClicked(r);break;case"mouseout":this.onMouseOut(r);break;case"mouseover":this.onMouseOver(r);break}},t.prototype.onCellClicked=function(e){if(this.isDoubleClickOnIPad()){this.onCellDoubleClicked(e),e.preventDefault();return}var r=this.beans,o=r.eventService,i=r.rangeService,s=r.gridOptionsService,a=e.ctrlKey||e.metaKey;i&&a&&i.getCellRangeCount(this.cellCtrl.getCellPosition())>1&&i.intersectLastRange(!0);var l=this.cellCtrl.createEvent(e,v.EVENT_CELL_CLICKED);o.dispatchEvent(l);var u=this.column.getColDef();u.onCellClicked&&window.setTimeout(function(){return u.onCellClicked(l)},0);var c=(s.is("singleClickEdit")||u.singleClickEdit)&&!s.is("suppressClickEdit");c&&this.cellCtrl.startRowOrCellEdit()},t.prototype.isDoubleClickOnIPad=function(){if(!At()||ki("dblclick"))return!1;var e=new Date().getTime(),r=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,r},t.prototype.onCellDoubleClicked=function(e){var r=this.column.getColDef(),o=this.cellCtrl.createEvent(e,v.EVENT_CELL_DOUBLE_CLICKED);this.beans.eventService.dispatchEvent(o),typeof r.onCellDoubleClicked=="function"&&window.setTimeout(function(){return r.onCellDoubleClicked(o)},0);var i=!this.beans.gridOptionsService.is("singleClickEdit")&&!this.beans.gridOptionsService.is("suppressClickEdit");i&&this.cellCtrl.startRowOrCellEdit(null,e)},t.prototype.onMouseDown=function(e){var r=e.ctrlKey,o=e.metaKey,i=e.shiftKey,s=e.target,a=this.beans,l=a.eventService,u=a.rangeService;if(!this.isRightClickInExistingRange(e)){var c=u&&u.getCellRanges().length!=0;if(!i||!c){var p=He()&&!this.cellCtrl.isEditing()&&!vn(s);this.cellCtrl.focusCell(p)}if(i&&c&&e.preventDefault(),!this.containsWidget(s)){if(u){var d=this.cellCtrl.getCellPosition();if(i)u.extendLatestRangeToCell(d);else{var f=r||o;u.setRangeToCell(d,f)}}l.dispatchEvent(this.cellCtrl.createEvent(e,v.EVENT_CELL_MOUSE_DOWN))}}},t.prototype.isRightClickInExistingRange=function(e){var r=this.beans.rangeService;if(r){var o=r.isCellInAnyRange(this.cellCtrl.getCellPosition());if(o&&e.button===2)return!0}return!1},t.prototype.containsWidget=function(e){return Xt(e,"ag-selection-checkbox",3)},t.prototype.onMouseOut=function(e){if(!this.mouseStayingInsideCell(e)){var r=this.cellCtrl.createEvent(e,v.EVENT_CELL_MOUSE_OUT);this.beans.eventService.dispatchEvent(r),this.beans.columnHoverService.clearMouseOver()}},t.prototype.onMouseOver=function(e){if(!this.mouseStayingInsideCell(e)){var r=this.cellCtrl.createEvent(e,v.EVENT_CELL_MOUSE_OVER);this.beans.eventService.dispatchEvent(r),this.beans.columnHoverService.setMouseOver([this.column])}},t.prototype.mouseStayingInsideCell=function(e){if(!e.target||!e.relatedTarget)return!1;var r=this.cellCtrl.getGui(),o=r.contains(e.target),i=r.contains(e.relatedTarget);return o&&i},t.prototype.destroy=function(){},t}(Ll),vf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),gf=function(n){vf(t,n);function t(e,r,o,i,s){var a=n.call(this)||this;return a.cellCtrl=e,a.beans=r,a.rowNode=i,a.rowCtrl=s,a}return t.prototype.setComp=function(e){this.eGui=e},t.prototype.onKeyDown=function(e){var r=e.key;switch(r){case R.ENTER:this.onEnterKeyDown(e);break;case R.F2:this.onF2KeyDown(e);break;case R.ESCAPE:this.onEscapeKeyDown(e);break;case R.TAB:this.onTabKeyDown(e);break;case R.BACKSPACE:case R.DELETE:this.onBackspaceOrDeleteKeyDown(r,e);break;case R.DOWN:case R.UP:case R.RIGHT:case R.LEFT:this.onNavigationKeyDown(e,r);break}},t.prototype.onNavigationKeyDown=function(e,r){this.cellCtrl.isEditing()||(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled()?this.onShiftRangeSelect(e):this.beans.navigationService.navigateToNextCell(e,r,this.cellCtrl.getCellPosition(),!0),e.preventDefault())},t.prototype.onShiftRangeSelect=function(e){if(this.beans.rangeService){var r=this.beans.rangeService.extendLatestRangeInDirection(e);r&&this.beans.navigationService.ensureCellVisible(r)}},t.prototype.onTabKeyDown=function(e){this.beans.navigationService.onTabKeyDown(this.cellCtrl,e)},t.prototype.onBackspaceOrDeleteKeyDown=function(e,r){var o=this,i=o.cellCtrl,s=o.beans,a=o.rowNode,l=s.gridOptionsService,u=s.rangeService,c=s.eventService;i.isEditing()||(c.dispatchEvent({type:v.EVENT_KEY_SHORTCUT_CHANGED_CELL_START}),Ka(e,l.is("enableCellEditingOnBackspace"))?u&&l.isEnableRangeSelection()?u.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"}):i.isCellEditable()&&a.setDataValue(i.getColumn(),null,"cellClear"):i.startRowOrCellEdit(e,r),c.dispatchEvent({type:v.EVENT_KEY_SHORTCUT_CHANGED_CELL_END}))},t.prototype.onEnterKeyDown=function(e){if(this.cellCtrl.isEditing()||this.rowCtrl.isEditing())this.cellCtrl.stopEditingAndFocus(!1,e.shiftKey);else if(this.beans.gridOptionsService.is("enterNavigatesVertically")){var r=e.shiftKey?R.UP:R.DOWN;this.beans.navigationService.navigateToNextCell(null,r,this.cellCtrl.getCellPosition(),!1)}else this.cellCtrl.startRowOrCellEdit(R.ENTER,e),this.cellCtrl.isEditing()&&e.preventDefault()},t.prototype.onF2KeyDown=function(e){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(R.F2,e)},t.prototype.onEscapeKeyDown=function(e){this.cellCtrl.isEditing()&&(this.cellCtrl.stopRowOrCellEdit(!0),this.cellCtrl.focusCell(!0))},t.prototype.processCharacter=function(e){var r=e.target,o=r!==this.eGui;if(!(o||this.cellCtrl.isEditing())){var i=e.key;i===" "?this.onSpaceKeyDown(e):(this.cellCtrl.startRowOrCellEdit(i,e),e.preventDefault())}},t.prototype.onSpaceKeyDown=function(e){var r=this.beans.gridOptionsService;if(!this.cellCtrl.isEditing()&&r.isRowSelection()){var o=this.rowNode.isSelected(),i=!o;if(i||!r.is("suppressRowDeselection")){var s=this.beans.gridOptionsService.is("groupSelectsFiltered"),a=this.rowNode.setSelectedParams({newValue:i,rangeSelect:e.shiftKey,groupSelectsFiltered:s,event:e,source:"spaceKey"});o===void 0&&a===0&&this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:s,event:e,source:"spaceKey"})}}e.preventDefault()},t.prototype.destroy=function(){n.prototype.destroy.call(this)},t}(T),yf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Cf=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},mf=function(n){yf(t,n);function t(e,r,o){var i=n.call(this,'
')||this;return i.rowNode=e,i.column=r,i.eCell=o,i}return t.prototype.postConstruct=function(){var e=this.getGui();e.appendChild(oe("rowDrag",this.gridOptionsService,null)),this.addGuiEventListener("mousedown",function(r){r.stopPropagation()}),this.addDragSource(),this.checkVisibility()},t.prototype.addDragSource=function(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))},t.prototype.onDragStart=function(e){var r=this,o=this.column.getColDef().dndSourceOnRowDrag;e.dataTransfer.setDragImage(this.eCell,0,0);var i=function(){try{var a=JSON.stringify(r.rowNode.data);e.dataTransfer.setData("application/json",a),e.dataTransfer.setData("text/plain",a)}catch{}};if(o){var s={rowNode:this.rowNode,dragEvent:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};o(s)}else i()},t.prototype.checkVisibility=function(){var e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)},Cf([P],t.prototype,"postConstruct",null),t}(W),wf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ti=function(){return ti=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Jn=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Zn=function(n,t){for(var e=0,r=t.length,o=n.length;e=0;return d?i:o}return o},t.prototype.listenOnDomOrder=function(e){var r=this,o=function(){var i=r.gridOptionsService.is("ensureDomOrder"),s=r.gridOptionsService.isDomLayout("print");e.rowComp.setDomOrder(i||s)};this.addManagedPropertyListener("domLayout",o),o()},t.prototype.setAnimateFlags=function(e){if(!(this.isSticky()||!e)){var r=O(this.rowNode.oldRowTop),o=this.beans.columnModel.isPinningLeft(),i=this.beans.columnModel.isPinningRight();r?(this.slideInAnimation.center=!0,this.slideInAnimation.left=o,this.slideInAnimation.right=i):(this.fadeInAnimation.center=!0,this.fadeInAnimation.left=o,this.fadeInAnimation.right=i)}},t.prototype.isEditing=function(){return this.editingRow},t.prototype.stopRowEditing=function(e){this.stopEditing(e)},t.prototype.isFullWidth=function(){return this.rowType!==Se.Normal},t.prototype.getRowType=function(){return this.rowType},t.prototype.refreshFullWidth=function(){var e=this,r=function(u,c){if(!u)return!0;var p=u.rowComp.getFullWidthCellRenderer();if(!p||!p.refresh)return!1;var d=e.createFullWidthParams(u.element,c),f=p.refresh(d);return f},o=r(this.fullWidthGui,null),i=r(this.centerGui,null),s=r(this.leftGui,"left"),a=r(this.rightGui,"right"),l=o&&i&&s&&a;return l},t.prototype.addListeners=function(){var e=this;this.addManagedListener(this.rowNode,j.EVENT_HEIGHT_CHANGED,function(){return e.onRowHeightChanged()}),this.addManagedListener(this.rowNode,j.EVENT_ROW_SELECTED,function(){return e.onRowSelected()}),this.addManagedListener(this.rowNode,j.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addManagedListener(this.rowNode,j.EVENT_TOP_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(this.rowNode,j.EVENT_EXPANDED_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,j.EVENT_HAS_CHILDREN_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,j.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,j.EVENT_CELL_CHANGED,this.onRowNodeCellChanged.bind(this)),this.addManagedListener(this.rowNode,j.EVENT_HIGHLIGHT_CHANGED,this.onRowNodeHighlightChanged.bind(this)),this.addManagedListener(this.rowNode,j.EVENT_DRAGGING_CHANGED,this.onRowNodeDraggingChanged.bind(this)),this.addManagedListener(this.rowNode,j.EVENT_UI_LEVEL_CHANGED,this.onUiLevelChanged.bind(this));var r=this.beans.eventService;this.addManagedListener(r,v.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,this.onPaginationPixelOffsetChanged.bind(this)),this.addManagedListener(r,v.EVENT_HEIGHT_SCALE_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(r,v.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(r,v.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(r,v.EVENT_CELL_FOCUSED,this.onCellFocused.bind(this)),this.addManagedListener(r,v.EVENT_CELL_FOCUS_CLEARED,this.onCellFocusCleared.bind(this)),this.addManagedListener(r,v.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),this.addManagedListener(r,v.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedListener(r,v.EVENT_COLUMN_MOVED,this.onColumnMoved.bind(this)),this.addListenersForCellComps()},t.prototype.onColumnMoved=function(){this.updateColumnLists()},t.prototype.addListenersForCellComps=function(){var e=this;this.addManagedListener(this.rowNode,j.EVENT_ROW_INDEX_CHANGED,function(){e.getAllCellCtrls().forEach(function(r){return r.onRowIndexChanged()})}),this.addManagedListener(this.rowNode,j.EVENT_CELL_CHANGED,function(r){e.getAllCellCtrls().forEach(function(o){return o.onCellChanged(r)})})},t.prototype.onRowNodeDataChanged=function(e){var r=this;if(this.rowNode.detailNode&&this.beans.rowRenderer.refreshFullWidthRow(this.rowNode.detailNode),this.isFullWidth()){this.beans.rowRenderer.refreshFullWidthRow(this.rowNode);return}this.getAllCellCtrls().forEach(function(o){return o.refreshCell({suppressFlash:!e.update,newData:!e.update})}),this.allRowGuis.forEach(function(o){r.setRowCompRowId(o.rowComp),r.updateRowBusinessKey(),r.setRowCompRowBusinessKey(o.rowComp)}),this.onRowSelected(),this.postProcessCss()},t.prototype.onRowNodeCellChanged=function(){this.postProcessCss()},t.prototype.postProcessCss=function(){this.setStylesFromGridOptions(),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()},t.prototype.onRowNodeHighlightChanged=function(){var e=this.rowNode.highlighted;this.allRowGuis.forEach(function(r){var o=e===je.Above,i=e===je.Below;r.rowComp.addOrRemoveCssClass("ag-row-highlight-above",o),r.rowComp.addOrRemoveCssClass("ag-row-highlight-below",i)})},t.prototype.onRowNodeDraggingChanged=function(){this.postProcessRowDragging()},t.prototype.postProcessRowDragging=function(){var e=this.rowNode.dragging;this.allRowGuis.forEach(function(r){return r.rowComp.addOrRemoveCssClass("ag-row-dragging",e)})},t.prototype.updateExpandedCss=function(){var e=this.rowNode.isExpandable(),r=this.rowNode.expanded==!0;this.allRowGuis.forEach(function(o){o.rowComp.addOrRemoveCssClass("ag-row-group",e),o.rowComp.addOrRemoveCssClass("ag-row-group-expanded",e&&r),o.rowComp.addOrRemoveCssClass("ag-row-group-contracted",e&&!r),Ke(o.element,e&&r)})},t.prototype.onDisplayedColumnsChanged=function(){this.updateColumnLists(!0),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights()},t.prototype.onVirtualColumnsChanged=function(){this.updateColumnLists(!1,!0)},t.prototype.getRowPosition=function(){return{rowPinned:St(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}},t.prototype.onKeyboardNavigate=function(e){var r=this.allRowGuis.find(function(u){return u.element.contains(e.target)}),o=r?r.element:null,i=o===e.target;if(i){var s=this.rowNode,a=this.beans.focusService.getFocusedCell(),l={rowIndex:s.rowIndex,rowPinned:s.rowPinned,column:a&&a.column};this.beans.navigationService.navigateToNextCell(e,e.key,l,!0),e.preventDefault()}},t.prototype.onTabKeyDown=function(e){if(!(e.defaultPrevented||ot(e))){var r=this.allRowGuis.find(function(a){return a.element.contains(e.target)}),o=r?r.element:null,i=o===e.target,s=null;i||(s=this.beans.focusService.findNextFocusableElement(o,!1,e.shiftKey)),(this.isFullWidth()&&i||!s)&&this.beans.navigationService.onTabKeyDown(this,e)}},t.prototype.onFullWidthRowFocused=function(e){var r,o=this.rowNode,i=e?this.isFullWidth()&&e.rowIndex===o.rowIndex&&e.rowPinned==o.rowPinned:!1,s=this.fullWidthGui?this.fullWidthGui.element:(r=this.centerGui)===null||r===void 0?void 0:r.element;s&&(s.classList.toggle("ag-full-width-focus",i),i&&s.focus({preventScroll:!0}))},t.prototype.refreshCell=function(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),this.updateColumnLists()},t.prototype.removeCellCtrl=function(e,r){var o={list:[],map:{}};return e.list.forEach(function(i){i!==r&&(o.list.push(i),o.map[i.getInstanceId()]=i)}),o},t.prototype.onMouseEvent=function(e,r){switch(e){case"dblclick":this.onRowDblClick(r);break;case"click":this.onRowClick(r);break;case"touchstart":case"mousedown":this.onRowMouseDown(r);break}},t.prototype.createRowEvent=function(e,r){return{type:e,node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,rowPinned:this.rowNode.rowPinned,context:this.gridOptionsService.context,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,event:r}},t.prototype.createRowEventWithSource=function(e,r){var o=this.createRowEvent(e,r);return o.source=this,o},t.prototype.onRowDblClick=function(e){if(!ot(e)){var r=this.createRowEventWithSource(v.EVENT_ROW_DOUBLE_CLICKED,e);this.beans.eventService.dispatchEvent(r)}},t.prototype.onRowMouseDown=function(e){if(this.lastMouseDownOnDragger=Xt(e.target,"ag-row-drag",3),!!this.isFullWidth()){var r=this.rowNode,o=this.beans.columnModel;this.beans.rangeService&&this.beans.rangeService.removeAllCellRanges(),this.beans.focusService.setFocusedCell({rowIndex:r.rowIndex,column:o.getAllDisplayedColumns()[0],rowPinned:r.rowPinned,forceBrowserFocus:!0})}},t.prototype.onRowClick=function(e){var r=ot(e)||this.lastMouseDownOnDragger;if(!r){var o=this.createRowEventWithSource(v.EVENT_ROW_CLICKED,e);this.beans.eventService.dispatchEvent(o);var i=e.ctrlKey||e.metaKey,s=e.shiftKey,a=this.gridOptionsService.is("groupSelectsChildren");if(!(a&&this.rowNode.group||!this.rowNode.selectable||this.rowNode.rowPinned||!this.gridOptionsService.isRowSelection()||this.gridOptionsService.is("suppressRowClickSelection"))){var l=this.gridOptionsService.is("rowMultiSelectWithClick"),u=!this.gridOptionsService.is("suppressRowDeselection"),c="rowClicked";if(this.rowNode.isSelected())l?this.rowNode.setSelectedParams({newValue:!1,event:e,source:c}):i?u&&this.rowNode.setSelectedParams({newValue:!1,event:e,source:c}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!s,rangeSelect:s,event:e,source:c});else{var p=l?!1:!i;this.rowNode.setSelectedParams({newValue:!0,clearSelection:p,rangeSelect:s,event:e,source:c})}}}},t.prototype.setupDetailRowAutoHeight=function(e){var r=this;if(this.rowType===Se.FullWidthDetail&&this.gridOptionsService.is("detailRowAutoHeight")){var o=function(){var s=e.clientHeight;if(s!=null&&s>0){var a=function(){r.rowNode.setRowHeight(s),r.beans.clientSideRowModel?r.beans.clientSideRowModel.onRowHeightChanged():r.beans.serverSideRowModel&&r.beans.serverSideRowModel.onRowHeightChanged()};r.beans.frameworkOverrides.setTimeout(a,0)}},i=this.beans.resizeObserverService.observeResize(e,o);this.addDestroyFunc(i),o()}},t.prototype.createFullWidthParams=function(e,r){var o=this,i={fullWidth:!0,data:this.rowNode.data,node:this.rowNode,value:this.rowNode.key,valueFormatted:this.rowNode.key,rowIndex:this.rowNode.rowIndex,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,eGridCell:e,eParentOfValue:e,pinned:r,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:function(s,a,l,u){return o.addFullWidthRowDragging(s,a,l,u)}};return i},t.prototype.addFullWidthRowDragging=function(e,r,o,i){if(o===void 0&&(o=""),!!this.isFullWidth()){var s=new qo(function(){return o},this.rowNode,void 0,e,r,i);this.createManagedBean(s,this.beans.context)}},t.prototype.onUiLevelChanged=function(){var e=this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);if(this.rowLevel!=e){var r="ag-row-level-"+e,o="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(function(i){i.rowComp.addOrRemoveCssClass(r,!0),i.rowComp.addOrRemoveCssClass(o,!1)})}this.rowLevel=e},t.prototype.isFirstRowOnPage=function(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageFirstRow()},t.prototype.isLastRowOnPage=function(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageLastRow()},t.prototype.onModelUpdated=function(){this.refreshFirstAndLastRowStyles()},t.prototype.refreshFirstAndLastRowStyles=function(){var e=this.isFirstRowOnPage(),r=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach(function(o){return o.rowComp.addOrRemoveCssClass("ag-row-first",e)})),this.lastRowOnPage!==r&&(this.lastRowOnPage=r,this.allRowGuis.forEach(function(o){return o.rowComp.addOrRemoveCssClass("ag-row-last",r)}))},t.prototype.stopEditing=function(e){var r,o;if(e===void 0&&(e=!1),!this.stoppingRowEdit){var i=this.getAllCellCtrls(),s=this.editingRow;this.stoppingRowEdit=!0;var a=!1;try{for(var l=xf(i),u=l.next();!u.done;u=l.next()){var c=u.value,p=c.stopEditing(e);s&&!e&&!a&&p&&(a=!0)}}catch(f){r={error:f}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}if(a){var d=this.createRowEvent(v.EVENT_ROW_VALUE_CHANGED);this.beans.eventService.dispatchEvent(d)}s&&this.setEditingRow(!1),this.stoppingRowEdit=!1}},t.prototype.setInlineEditingCss=function(e){this.allRowGuis.forEach(function(r){r.rowComp.addOrRemoveCssClass("ag-row-inline-editing",e),r.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!e)})},t.prototype.setEditingRow=function(e){this.editingRow=e,this.allRowGuis.forEach(function(o){return o.rowComp.addOrRemoveCssClass("ag-row-editing",e)});var r=e?this.createRowEvent(v.EVENT_ROW_EDITING_STARTED):this.createRowEvent(v.EVENT_ROW_EDITING_STOPPED);this.beans.eventService.dispatchEvent(r)},t.prototype.startRowEditing=function(e,r,o){if(e===void 0&&(e=null),r===void 0&&(r=null),o===void 0&&(o=null),!this.editingRow){var i=this.getAllCellCtrls().reduce(function(s,a){var l=a===r;return l?a.startEditing(e,l,o):a.startEditing(null,l,o),s?!0:a.isEditing()},!1);i&&this.setEditingRow(!0)}},t.prototype.getAllCellCtrls=function(){if(this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0)return this.centerCellCtrls.list;var e=Zn(Zn(Zn([],Jn(this.centerCellCtrls.list)),Jn(this.leftCellCtrls.list)),Jn(this.rightCellCtrls.list));return e},t.prototype.postProcessClassesFromGridOptions=function(){var e=this,r=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);!r||!r.length||r.forEach(function(o){e.allRowGuis.forEach(function(i){return i.rowComp.addOrRemoveCssClass(o,!0)})})},t.prototype.postProcessRowClassRules=function(){var e=this;this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,function(r){e.allRowGuis.forEach(function(o){return o.rowComp.addOrRemoveCssClass(r,!0)})},function(r){e.allRowGuis.forEach(function(o){return o.rowComp.addOrRemoveCssClass(r,!1)})})},t.prototype.setStylesFromGridOptions=function(e){var r=this.processStylesFromGridOptions();this.forEachGui(e,function(o){return o.rowComp.setUserStyles(r)})},t.prototype.getPinnedForContainer=function(e){var r=e===ge.LEFT?"left":e===ge.RIGHT?"right":null;return r},t.prototype.getInitialRowClasses=function(e){var r=this.getPinnedForContainer(e),o={rowNode:this.rowNode,rowFocused:this.rowFocused,fadeRowIn:this.fadeInAnimation[e],rowIsEven:this.rowNode.rowIndex%2===0,rowLevel:this.rowLevel,fullWidthRow:this.isFullWidth(),firstRowOnPage:this.isFirstRowOnPage(),lastRowOnPage:this.isLastRowOnPage(),printLayout:this.printLayout,expandable:this.rowNode.isExpandable(),pinned:r};return this.beans.rowCssClassCalculator.getInitialRowClasses(o)},t.prototype.processStylesFromGridOptions=function(){var e=this.gridOptionsService.get("rowStyle");if(e&&typeof e=="function"){console.warn("AG Grid: rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead");return}var r=this.gridOptionsService.getCallback("getRowStyle"),o;if(r){var i={data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex};o=r(i)}return Object.assign({},e,o)},t.prototype.onRowSelected=function(e){var r=this,o=!!this.rowNode.isSelected();this.forEachGui(e,function(i){i.rowComp.addOrRemoveCssClass("ag-row-selected",o),dr(i.element,o?!0:void 0);var s=r.createAriaLabel();Dt(i.element,s??"")})},t.prototype.createAriaLabel=function(){var e=this.rowNode.isSelected();if(!(e&&this.gridOptionsService.is("suppressRowDeselection"))){var r=this.beans.localeService.getLocaleTextFunc(),o=r(e?"ariaRowDeselect":"ariaRowSelect","Press SPACE to "+(e?"deselect":"select")+" this row.");return o}},t.prototype.isUseAnimationFrameForCreate=function(){return this.useAnimationFrameForCreate},t.prototype.addHoverFunctionality=function(e){var r=this;this.active&&(this.addManagedListener(e,"mouseenter",function(){return r.rowNode.onMouseEnter()}),this.addManagedListener(e,"mouseleave",function(){return r.rowNode.onMouseLeave()}),this.addManagedListener(this.rowNode,j.EVENT_MOUSE_ENTER,function(){!r.beans.dragService.isDragging()&&!r.gridOptionsService.is("suppressRowHoverHighlight")&&(e.classList.add("ag-row-hover"),r.rowNode.setHovered(!0))}),this.addManagedListener(this.rowNode,j.EVENT_MOUSE_LEAVE,function(){e.classList.remove("ag-row-hover"),r.rowNode.setHovered(!1)}))},t.prototype.roundRowTopToBounds=function(e){var r=this.beans.ctrlsService.getGridBodyCtrl(),o=r.getScrollFeature().getVScrollPosition(),i=this.applyPaginationOffset(o.top,!0)-100,s=this.applyPaginationOffset(o.bottom,!0)+100;return Math.min(Math.max(i,e),s)},t.prototype.getFrameworkOverrides=function(){return this.beans.frameworkOverrides},t.prototype.forEachGui=function(e,r){var o=e?[e]:this.allRowGuis;o.forEach(r)},t.prototype.onRowHeightChanged=function(e){if(this.rowNode.rowHeight!=null){var r=this.rowNode.rowHeight,o=this.beans.environment.getDefaultRowHeight(),i=this.gridOptionsService.isGetRowHeightFunction(),s=i?this.gridOptionsService.getRowHeightForNode(this.rowNode).height:void 0,a=s?Math.min(o,s)-2+"px":void 0;this.forEachGui(e,function(l){l.element.style.height=r+"px",a&&l.element.style.setProperty("--ag-line-height",a)})}},t.prototype.addEventListener=function(e,r){n.prototype.addEventListener.call(this,e,r)},t.prototype.removeEventListener=function(e,r){n.prototype.removeEventListener.call(this,e,r)},t.prototype.destroyFirstPass=function(){this.active=!1,this.gridOptionsService.isAnimateRows()&&this.setupRemoveAnimation(),this.rowNode.setHovered(!1);var e=this.createRowEvent(v.EVENT_VIRTUAL_ROW_REMOVED);this.dispatchEvent(e),this.beans.eventService.dispatchEvent(e),n.prototype.destroy.call(this)},t.prototype.setupRemoveAnimation=function(){if(!this.isSticky()){var e=this.rowNode.rowTop!=null;if(e){var r=this.roundRowTopToBounds(this.rowNode.rowTop);this.setRowTop(r)}else this.allRowGuis.forEach(function(o){return o.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0)})}},t.prototype.destroySecondPass=function(){this.allRowGuis.length=0;var e=function(r){return r.list.forEach(function(o){return o.destroy()}),{list:[],map:{}}};this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)},t.prototype.setFocusedClasses=function(e){var r=this;this.forEachGui(e,function(o){o.rowComp.addOrRemoveCssClass("ag-row-focus",r.rowFocused),o.rowComp.addOrRemoveCssClass("ag-row-no-focus",!r.rowFocused)})},t.prototype.onCellFocused=function(){this.onCellFocusChanged()},t.prototype.onCellFocusCleared=function(){this.onCellFocusChanged()},t.prototype.onCellFocusChanged=function(){var e=this.beans.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);e!==this.rowFocused&&(this.rowFocused=e,this.setFocusedClasses()),!e&&this.editingRow&&this.stopEditing(!1)},t.prototype.onPaginationChanged=function(){var e=this.beans.paginationProxy.getCurrentPage();this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()},t.prototype.onTopChanged=function(){this.setRowTop(this.rowNode.rowTop)},t.prototype.onPaginationPixelOffsetChanged=function(){this.onTopChanged()},t.prototype.applyPaginationOffset=function(e,r){if(r===void 0&&(r=!1),this.rowNode.isRowPinned()||this.rowNode.sticky)return e;var o=this.beans.paginationProxy.getPixelOffset(),i=r?1:-1;return e+o*i},t.prototype.setRowTop=function(e){if(!this.printLayout&&O(e)){var r=this.applyPaginationOffset(e),o=this.rowNode.isRowPinned()||this.rowNode.sticky,i=o?r:this.beans.rowContainerHeightService.getRealPixelPosition(r),s=i+"px";this.setRowTopStyle(s)}},t.prototype.getInitialRowTop=function(e){var r=this.gridOptionsService.is("suppressRowTransform");return r?this.getInitialRowTopShared(e):void 0},t.prototype.getInitialTransform=function(e){var r=this.gridOptionsService.is("suppressRowTransform");return r?void 0:"translateY("+this.getInitialRowTopShared(e)+")"},t.prototype.getInitialRowTopShared=function(e){if(this.printLayout)return"";var r;if(this.isSticky())r=this.rowNode.stickyRowTop;else{var o=this.slideInAnimation[e]?this.roundRowTopToBounds(this.rowNode.oldRowTop):this.rowNode.rowTop,i=this.applyPaginationOffset(o);r=this.rowNode.isRowPinned()?i:this.beans.rowContainerHeightService.getRealPixelPosition(i)}return r+"px"},t.prototype.setRowTopStyle=function(e){var r=this.gridOptionsService.is("suppressRowTransform");this.allRowGuis.forEach(function(o){return r?o.rowComp.setTop(e):o.rowComp.setTransform("translateY("+e+")")})},t.prototype.getRowNode=function(){return this.rowNode},t.prototype.getCellCtrl=function(e){var r=null;return this.getAllCellCtrls().forEach(function(o){o.getColumn()==e&&(r=o)}),r!=null||this.getAllCellCtrls().forEach(function(o){o.getColSpanningList().indexOf(e)>=0&&(r=o)}),r},t.prototype.onRowIndexChanged=function(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())},t.prototype.updateRowIndexes=function(e){var r=this.rowNode.getRowIndexString(),o=this.beans.headerNavigationService.getHeaderRowCount(),i=this.rowNode.rowIndex%2===0,s=o+this.rowNode.rowIndex+1;this.forEachGui(e,function(a){a.rowComp.setRowIndex(r),a.rowComp.addOrRemoveCssClass("ag-row-even",i),a.rowComp.addOrRemoveCssClass("ag-row-odd",!i),Ji(a.element,s)})},t.prototype.getPinnedLeftRowElement=function(){return this.leftGui?this.leftGui.element:void 0},t.prototype.getPinnedRightRowElement=function(){return this.rightGui?this.rightGui.element:void 0},t.prototype.getBodyRowElement=function(){return this.centerGui?this.centerGui.element:void 0},t.prototype.getFullWidthRowElement=function(){return this.fullWidthGui?this.fullWidthGui.element:void 0},t.DOM_DATA_KEY_ROW_CTRL="renderedRow",t}(T),If=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Le=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Mf=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},Nf=function(n){If(t,n);function t(e){var r=n.call(this)||this;return r.element=e,r}return t.prototype.postConstruct=function(){this.addKeyboardListeners(),this.addMouseListeners(),this.mockContextMenuForIPad()},t.prototype.addKeyboardListeners=function(){var e="keydown",r=this.processKeyboardEvent.bind(this,e);this.addManagedListener(this.element,e,r)},t.prototype.addMouseListeners=function(){var e=this,r=ki("touchstart")?"touchstart":"mousedown",o=["dblclick","contextmenu","mouseover","mouseout","click",r];o.forEach(function(i){var s=e.processMouseEvent.bind(e,i);e.addManagedListener(e.element,i,s)})},t.prototype.processMouseEvent=function(e,r){if(!(!this.mouseEventService.isEventFromThisGrid(r)||ot(r))){var o=this.getRowForEvent(r),i=this.mouseEventService.getRenderedCellForEvent(r);e==="contextmenu"?this.handleContextMenuMouseEvent(r,null,o,i):(i&&i.onMouseEvent(e,r),o&&o.onMouseEvent(e,r))}},t.prototype.mockContextMenuForIPad=function(){var e=this;if(At()){var r=new be(this.element),o=function(i){var s=e.getRowForEvent(i.touchEvent),a=e.mouseEventService.getRenderedCellForEvent(i.touchEvent);e.handleContextMenuMouseEvent(null,i.touchEvent,s,a)};this.addManagedListener(r,be.EVENT_LONG_TAP,o),this.addDestroyFunc(function(){return r.destroy()})}},t.prototype.getRowForEvent=function(e){for(var r=e.target;r;){var o=this.gridOptionsService.getDomData(r,nr.DOM_DATA_KEY_ROW_CTRL);if(o)return o;r=r.parentElement}return null},t.prototype.handleContextMenuMouseEvent=function(e,r,o,i){var s=o?o.getRowNode():null,a=i?i.getColumn():null,l=null;if(a){var u=e||r;i.dispatchCellContextMenuEvent(u),l=this.valueService.getValue(a,s)}var c=this.ctrlsService.getGridBodyCtrl(),p=i?i.getGui():c.getGridBodyElement();this.contextMenuFactory&&this.contextMenuFactory.onContextMenu(e,r,s,a,l,p)},t.prototype.getControlsForEventTarget=function(e){return{cellCtrl:Oo(this.gridOptionsService,e,ir.DOM_DATA_KEY_CELL_CTRL),rowCtrl:Oo(this.gridOptionsService,e,nr.DOM_DATA_KEY_ROW_CTRL)}},t.prototype.processKeyboardEvent=function(e,r){var o=this.getControlsForEventTarget(r.target),i=o.cellCtrl,s=o.rowCtrl;r.defaultPrevented||(i?this.processCellKeyboardEvent(i,e,r):s&&s.isFullWidth()&&this.processFullWidthRowKeyboardEvent(s,e,r))},t.prototype.processCellKeyboardEvent=function(e,r,o){var i=e.getRowNode(),s=e.getColumn(),a=e.isEditing(),l=!Wo(this.gridOptionsService,o,i,s,a);if(l&&r==="keydown"){var u=!a&&this.navigationService.handlePageScrollingKey(o);u||e.onKeyDown(o),this.doGridOperations(o,e.isEditing()),On(o)&&e.processCharacter(o)}if(r==="keydown"){var c=e.createEvent(o,v.EVENT_CELL_KEY_DOWN);this.eventService.dispatchEvent(c)}},t.prototype.processFullWidthRowKeyboardEvent=function(e,r,o){var i=e.getRowNode(),s=this.focusService.getFocusedCell(),a=s&&s.column,l=!Wo(this.gridOptionsService,o,i,a,!1);if(l){var u=o.key;if(r==="keydown")switch(u){case R.PAGE_HOME:case R.PAGE_END:case R.PAGE_UP:case R.PAGE_DOWN:this.navigationService.handlePageScrollingKey(o,!0);break;case R.UP:case R.DOWN:e.onKeyboardNavigate(o);break;case R.TAB:e.onTabKeyDown(o);break}}if(r==="keydown"){var c=e.createRowEvent(v.EVENT_CELL_KEY_DOWN,o);this.eventService.dispatchEvent(c)}},t.prototype.doGridOperations=function(e,r){if(!(!e.ctrlKey&&!e.metaKey)&&!r&&this.mouseEventService.isEventFromThisGrid(e)){var o=$a(e);if(o===R.A)return this.onCtrlAndA(e);if(o===R.C)return this.onCtrlAndC(e);if(o===R.D)return this.onCtrlAndD(e);if(o===R.V)return this.onCtrlAndV(e);if(o===R.X)return this.onCtrlAndX(e);if(o===R.Y)return this.onCtrlAndY();if(o===R.Z)return this.onCtrlAndZ(e)}},t.prototype.onCtrlAndA=function(e){var r=this,o=r.pinnedRowModel,i=r.paginationProxy,s=r.rangeService;if(s&&i.isRowsToRender()){var a=Mf([o.isEmpty("top"),o.isEmpty("bottom")],2),l=a[0],u=a[1],c=l?null:"top",p=void 0,d=void 0;u?(p=null,d=this.paginationProxy.getRowCount()-1):(p="bottom",d=o.getPinnedBottomRowData().length-1);var f=this.columnModel.getAllDisplayedColumns();if(Pe(f))return;s.setCellRange({rowStartIndex:0,rowStartPinned:c,rowEndIndex:d,rowEndPinned:p,columnStart:f[0],columnEnd:Q(f)})}e.preventDefault()},t.prototype.onCtrlAndC=function(e){if(!(!this.clipboardService||this.gridOptionsService.is("enableCellTextSelection"))){var r=this.getControlsForEventTarget(e.target),o=r.cellCtrl,i=r.rowCtrl;o!=null&&o.isEditing()||i!=null&&i.isEditing()||(e.preventDefault(),this.clipboardService.copyToClipboard())}},t.prototype.onCtrlAndX=function(e){if(!(!this.clipboardService||this.gridOptionsService.is("enableCellTextSelection")||this.gridOptionsService.is("suppressCutToClipboard"))){var r=this.getControlsForEventTarget(e.target),o=r.cellCtrl,i=r.rowCtrl;o!=null&&o.isEditing()||i!=null&&i.isEditing()||(e.preventDefault(),this.clipboardService.cutToClipboard(void 0,"ui"))}},t.prototype.onCtrlAndV=function(e){var r=this.getControlsForEventTarget(e.target),o=r.cellCtrl,i=r.rowCtrl;o!=null&&o.isEditing()||i!=null&&i.isEditing()||this.clipboardService&&!this.gridOptionsService.is("suppressClipboardPaste")&&this.clipboardService.pasteFromClipboard()},t.prototype.onCtrlAndD=function(e){this.clipboardService&&!this.gridOptionsService.is("suppressClipboardPaste")&&this.clipboardService.copyRangeDown(),e.preventDefault()},t.prototype.onCtrlAndZ=function(e){this.gridOptionsService.is("undoRedoCellEditing")&&(e.preventDefault(),e.shiftKey?this.undoRedoService.redo("ui"):this.undoRedoService.undo("ui"))},t.prototype.onCtrlAndY=function(){this.undoRedoService.redo("ui")},Le([h("mouseEventService")],t.prototype,"mouseEventService",void 0),Le([h("valueService")],t.prototype,"valueService",void 0),Le([Y("contextMenuFactory")],t.prototype,"contextMenuFactory",void 0),Le([h("ctrlsService")],t.prototype,"ctrlsService",void 0),Le([h("navigationService")],t.prototype,"navigationService",void 0),Le([h("focusService")],t.prototype,"focusService",void 0),Le([h("undoRedoService")],t.prototype,"undoRedoService",void 0),Le([h("columnModel")],t.prototype,"columnModel",void 0),Le([h("paginationProxy")],t.prototype,"paginationProxy",void 0),Le([h("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),Le([Y("rangeService")],t.prototype,"rangeService",void 0),Le([Y("clipboardService")],t.prototype,"clipboardService",void 0),Le([P],t.prototype,"postConstruct",null),t}(T),Gf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ri=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Hf=function(n){Gf(t,n);function t(e){var r=n.call(this)||this;return r.centerContainerCtrl=e,r}return t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady(function(){e.gridBodyCtrl=e.ctrlsService.getGridBodyCtrl(),e.listenForResize()}),this.addManagedListener(this.eventService,v.EVENT_SCROLLBAR_WIDTH_CHANGED,this.onScrollbarWidthChanged.bind(this))},t.prototype.listenForResize=function(){var e=this,r=function(){return e.onCenterViewportResized()};this.centerContainerCtrl.registerViewportResizeListener(r),this.gridBodyCtrl.registerBodyViewportResizeListener(r)},t.prototype.onScrollbarWidthChanged=function(){this.checkViewportAndScrolls()},t.prototype.onCenterViewportResized=function(){if(this.centerContainerCtrl.isViewportVisible()){this.checkViewportAndScrolls();var e=this.centerContainerCtrl.getCenterWidth();e!==this.centerWidth&&(this.centerWidth=e,this.columnModel.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0},t.prototype.checkViewportAndScrolls=function(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.getScrollFeature().checkScrollLeft()},t.prototype.getBodyHeight=function(){return this.bodyHeight},t.prototype.checkBodyHeight=function(){var e=this.gridBodyCtrl.getBodyViewportElement(),r=Br(e);if(this.bodyHeight!==r){this.bodyHeight=r;var o={type:v.EVENT_BODY_HEIGHT_CHANGED};this.eventService.dispatchEvent(o)}},t.prototype.updateScrollVisibleService=function(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)},t.prototype.updateScrollVisibleServiceImpl=function(){var e={horizontalScrollShowing:this.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleService.setScrollsVisible(e)},t.prototype.isHorizontalScrollShowing=function(){return this.centerContainerCtrl.isHorizontalScrollShowing()},t.prototype.onHorizontalViewportChanged=function(){var e=this.centerContainerCtrl.getCenterWidth(),r=this.centerContainerCtrl.getViewportScrollLeft();this.columnModel.setViewportPosition(e,r)},ri([h("ctrlsService")],t.prototype,"ctrlsService",void 0),ri([h("columnModel")],t.prototype,"columnModel",void 0),ri([h("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),ri([P],t.prototype,"postConstruct",null),t}(T),Vf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Il=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Bf=function(n){Vf(t,n);function t(e){var r=n.call(this)||this;return r.element=e,r}return t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,v.EVENT_LEFT_PINNED_WIDTH_CHANGED,this.onPinnedLeftWidthChanged.bind(this))},t.prototype.onPinnedLeftWidthChanged=function(){var e=this.pinnedWidthService.getPinnedLeftWidth(),r=e>0;U(this.element,r),Be(this.element,e)},t.prototype.getWidth=function(){return this.pinnedWidthService.getPinnedLeftWidth()},Il([h("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),Il([P],t.prototype,"postConstruct",null),t}(T),Wf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ml=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},jf=function(n){Wf(t,n);function t(e){var r=n.call(this)||this;return r.element=e,r}return t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,v.EVENT_RIGHT_PINNED_WIDTH_CHANGED,this.onPinnedRightWidthChanged.bind(this))},t.prototype.onPinnedRightWidthChanged=function(){var e=this.pinnedWidthService.getPinnedRightWidth(),r=e>0;U(this.element,r),Be(this.element,e)},t.prototype.getWidth=function(){return this.pinnedWidthService.getPinnedRightWidth()},Ml([h("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),Ml([P],t.prototype,"postConstruct",null),t}(T),kf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Nl=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Gl=function(n){kf(t,n);function t(e,r){var o=n.call(this)||this;return o.eContainer=e,o.eWrapper=r,o}return t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,v.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onHeightChanged.bind(this))},t.prototype.onHeightChanged=function(){var e=this.maxDivHeightScaler.getUiContainerHeight(),r=e!=null?e+"px":"";this.eContainer.style.height=r,this.eWrapper&&(this.eWrapper.style.height=r)},Nl([h("rowContainerHeightService")],t.prototype,"maxDivHeightScaler",void 0),Nl([P],t.prototype,"postConstruct",null),t}(T),Uf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),es=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},zf=function(n){Uf(t,n);function t(e){var r=n.call(this)||this;return r.eContainer=e,r}return t.prototype.postConstruct=function(){var e=this;if(!(!this.gridOptionsService.isEnableRangeSelection()||N(this.rangeService))){var r={eElement:this.eContainer,onDragStart:this.rangeService.onDragStart.bind(this.rangeService),onDragStop:this.rangeService.onDragStop.bind(this.rangeService),onDragging:this.rangeService.onDragging.bind(this.rangeService)};this.dragService.addDragSource(r),this.addDestroyFunc(function(){return e.dragService.removeDragSource(r)})}},es([Y("rangeService")],t.prototype,"rangeService",void 0),es([h("dragService")],t.prototype,"dragService",void 0),es([P],t.prototype,"postConstruct",null),t}(T),$f=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ts=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},rs=function(n){$f(t,n);function t(e,r){r===void 0&&(r=!1);var o=n.call(this)||this;return o.callback=e,o.addSpacer=r,o}return t.prototype.postConstruct=function(){var e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,v.EVENT_LEFT_PINNED_WIDTH_CHANGED,e),this.addSpacer&&(this.addManagedListener(this.eventService,v.EVENT_RIGHT_PINNED_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,v.EVENT_SCROLL_VISIBILITY_CHANGED,e),this.addManagedListener(this.eventService,v.EVENT_SCROLLBAR_WIDTH_CHANGED,e)),this.setWidth()},t.prototype.setWidth=function(){var e=this.columnModel,r=this.gridOptionsService.isDomLayout("print"),o=e.getBodyContainerWidth(),i=e.getDisplayedColumnsLeftWidth(),s=e.getDisplayedColumnsRightWidth(),a;if(r)a=o+i+s;else if(a=o,this.addSpacer){var l=this.gridOptionsService.is("enableRtl")?i:s;l===0&&this.scrollVisibleService.isVerticalScrollShowing()&&(a+=this.gridOptionsService.getScrollbarWidth())}this.callback(a)},ts([h("columnModel")],t.prototype,"columnModel",void 0),ts([h("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),ts([P],t.prototype,"postConstruct",null),t}(T),Kf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Mt=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},oi=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},ii=function(n,t){for(var e=0,r=t.length,o=n.length;e=0&&r()},t.prototype.getContainerElement=function(){return this.eContainer},t.prototype.getViewportSizeFeature=function(){return this.viewportSizeFeature},t.prototype.setComp=function(e,r,o,i){var s=this;this.comp=e,this.eContainer=r,this.eViewport=o,this.eWrapper=i,this.createManagedBean(new Nf(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder(),this.stopHScrollOnPinnedRows();var a=[_.TOP_CENTER,_.TOP_LEFT,_.TOP_RIGHT],l=[_.STICKY_TOP_CENTER,_.STICKY_TOP_LEFT,_.STICKY_TOP_RIGHT],u=[_.BOTTOM_CENTER,_.BOTTOM_LEFT,_.BOTTOM_RIGHT],c=[_.CENTER,_.LEFT,_.RIGHT],p=ii(ii(ii(ii([],oi(a)),oi(u)),oi(c)),oi(l)),d=[_.CENTER,_.LEFT,_.RIGHT,_.FULL_WIDTH],f=[_.CENTER,_.TOP_CENTER,_.STICKY_TOP_CENTER,_.BOTTOM_CENTER],g=[_.LEFT,_.BOTTOM_LEFT,_.TOP_LEFT,_.STICKY_TOP_LEFT],y=[_.RIGHT,_.BOTTOM_RIGHT,_.TOP_RIGHT,_.STICKY_TOP_RIGHT];this.forContainers(g,function(){s.pinnedWidthFeature=s.createManagedBean(new Bf(s.eContainer)),s.addManagedListener(s.eventService,v.EVENT_LEFT_PINNED_WIDTH_CHANGED,function(){return s.onPinnedWidthChanged()})}),this.forContainers(y,function(){s.pinnedWidthFeature=s.createManagedBean(new jf(s.eContainer)),s.addManagedListener(s.eventService,v.EVENT_RIGHT_PINNED_WIDTH_CHANGED,function(){return s.onPinnedWidthChanged()})}),this.forContainers(d,function(){return s.createManagedBean(new Gl(s.eContainer,s.eWrapper))}),this.forContainers(p,function(){return s.createManagedBean(new zf(s.eContainer))}),this.forContainers(f,function(){return s.createManagedBean(new rs(function(m){return s.comp.setContainerWidth(m+"px")}))}),hr()&&(this.forContainers([_.CENTER],function(){var m=s.enableRtl?v.EVENT_LEFT_PINNED_WIDTH_CHANGED:v.EVENT_RIGHT_PINNED_WIDTH_CHANGED;s.addManagedListener(s.eventService,m,function(){return s.refreshPaddingForFakeScrollbar()})}),this.refreshPaddingForFakeScrollbar()),this.addListeners(),this.registerWithCtrlsService()},t.prototype.refreshPaddingForFakeScrollbar=function(){var e=this,r=e.enableRtl,o=e.columnModel,i=e.name,s=e.eWrapper,a=e.eContainer,l=r?_.LEFT:_.RIGHT;this.forContainers([_.CENTER,l],function(){var u=o.getContainerWidth(l),c=r?"marginLeft":"marginRight";i===_.CENTER?s.style[c]=u?"0px":"16px":a.style[c]=u?"16px":"0px"})},t.prototype.addListeners=function(){var e=this;this.addManagedListener(this.eventService,v.EVENT_SCROLL_VISIBILITY_CHANGED,function(){return e.onScrollVisibilityChanged()}),this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_CHANGED,function(){return e.onDisplayedColumnsChanged()}),this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,function(){return e.onDisplayedColumnsWidthChanged()}),this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_ROWS_CHANGED,function(r){return e.onDisplayedRowsChanged(r.afterScroll)}),this.onScrollVisibilityChanged(),this.onDisplayedColumnsChanged(),this.onDisplayedColumnsWidthChanged(),this.onDisplayedRowsChanged()},t.prototype.listenOnDomOrder=function(){var e=this,r=[_.STICKY_TOP_CENTER,_.STICKY_TOP_LEFT,_.STICKY_TOP_RIGHT,_.STICKY_TOP_FULL_WIDTH],o=r.indexOf(this.name)>=0;if(o){this.comp.setDomOrder(!0);return}var i=function(){var s=e.gridOptionsService.is("ensureDomOrder"),a=e.gridOptionsService.isDomLayout("print");e.comp.setDomOrder(s||a)};this.addManagedPropertyListener("domLayout",i),i()},t.prototype.stopHScrollOnPinnedRows=function(){var e=this;this.forContainers([_.TOP_CENTER,_.STICKY_TOP_CENTER,_.BOTTOM_CENTER],function(){var r=function(){return e.eViewport.scrollLeft=0};e.addManagedListener(e.eViewport,"scroll",r)})},t.prototype.onDisplayedColumnsChanged=function(){var e=this;this.forContainers([_.CENTER],function(){return e.onHorizontalViewportChanged()})},t.prototype.onDisplayedColumnsWidthChanged=function(){var e=this;this.forContainers([_.CENTER],function(){return e.onHorizontalViewportChanged()})},t.prototype.onScrollVisibilityChanged=function(){var e=this,r=this.gridOptionsService.getScrollbarWidth()||0;if(this.name===_.CENTER){var o=this.scrollVisibleService.isHorizontalScrollShowing(),i=o?r:0,s=i==0?"100%":"calc(100% + "+i+"px)";this.animationFrameService.requestAnimationFrame(function(){return e.comp.setViewportHeight(s)})}if(this.name===_.FULL_WIDTH){var a=hr()?16:0,l="calc(100% - "+a+"px)";this.eContainer.style.setProperty("width",l)}},t.prototype.addPreventScrollWhileDragging=function(){var e=this,r=function(o){e.dragService.isDragging()&&o.cancelable&&o.preventDefault()};this.eContainer.addEventListener("touchmove",r,{passive:!1}),this.addDestroyFunc(function(){return e.eContainer.removeEventListener("touchmove",r)})},t.prototype.onHorizontalViewportChanged=function(){var e=this.getCenterWidth(),r=this.getCenterViewportScrollLeft();this.columnModel.setViewportPosition(e,r)},t.prototype.getCenterWidth=function(){return Vo(this.eViewport)},t.prototype.getCenterViewportScrollLeft=function(){return jr(this.eViewport,this.enableRtl)},t.prototype.registerViewportResizeListener=function(e){var r=this.resizeObserverService.observeResize(this.eViewport,e);this.addDestroyFunc(function(){return r()})},t.prototype.isViewportVisible=function(){return Ct(this.eViewport)},t.prototype.getViewportScrollLeft=function(){return jr(this.eViewport,this.enableRtl)},t.prototype.isHorizontalScrollShowing=function(){var e=this.gridOptionsService.is("alwaysShowHorizontalScroll");return e||Ba(this.eViewport)},t.prototype.getViewportElement=function(){return this.eViewport},t.prototype.setContainerTranslateX=function(e){this.eContainer.style.transform="translateX("+e+"px)"},t.prototype.getHScrollPosition=function(){var e={left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth};return e},t.prototype.setCenterViewportScrollLeft=function(e){kr(this.eViewport,e,this.enableRtl)},t.prototype.isContainerVisible=function(){var e=t.getPinned(this.name);return!e||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0},t.prototype.onPinnedWidthChanged=function(){var e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged()),hr()&&this.refreshPaddingForFakeScrollbar()},t.prototype.onDisplayedRowsChanged=function(e){var r=this;if(e===void 0&&(e=!1),this.visible){var o=this.gridOptionsService.isDomLayout("print"),i=function(a){var l=a.isFullWidth(),u=r.embedFullWidthRows||o,c=r.isFullWithContainer?!u&&l:u||!l;return c},s=this.getRowCtrls().filter(i);this.comp.setRowCtrls(s,e)}else this.comp.setRowCtrls(this.EMPTY_CTRLS,!1)},t.prototype.getRowCtrls=function(){switch(this.name){case _.TOP_CENTER:case _.TOP_LEFT:case _.TOP_RIGHT:case _.TOP_FULL_WIDTH:return this.rowRenderer.getTopRowCtrls();case _.STICKY_TOP_CENTER:case _.STICKY_TOP_LEFT:case _.STICKY_TOP_RIGHT:case _.STICKY_TOP_FULL_WIDTH:return this.rowRenderer.getStickyTopRowCtrls();case _.BOTTOM_CENTER:case _.BOTTOM_LEFT:case _.BOTTOM_RIGHT:case _.BOTTOM_FULL_WIDTH:return this.rowRenderer.getBottomRowCtrls();default:return this.rowRenderer.getRowCtrls()}},Mt([h("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),Mt([h("dragService")],t.prototype,"dragService",void 0),Mt([h("ctrlsService")],t.prototype,"ctrlsService",void 0),Mt([h("columnModel")],t.prototype,"columnModel",void 0),Mt([h("resizeObserverService")],t.prototype,"resizeObserverService",void 0),Mt([h("animationFrameService")],t.prototype,"animationFrameService",void 0),Mt([h("rowRenderer")],t.prototype,"rowRenderer",void 0),Mt([P],t.prototype,"postConstruct",null),t}(T),Jf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),at=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Zf=`
-
`,ev=function(n){Jf(t,n);function t(){return n.call(this,Zf)||this}return t.prototype.init=function(){var e=this,r=function(i,s){var a=i+"px";s.style.minHeight=a,s.style.height=a},o={setRowAnimationCssOnBodyViewport:function(i,s){return e.setRowAnimationCssOnBodyViewport(i,s)},setColumnCount:function(i){return Ta(e.getGui(),i)},setRowCount:function(i){return Oa(e.getGui(),i)},setTopHeight:function(i){return r(i,e.eTop)},setBottomHeight:function(i){return r(i,e.eBottom)},setTopDisplay:function(i){return e.eTop.style.display=i},setBottomDisplay:function(i){return e.eBottom.style.display=i},setStickyTopHeight:function(i){return e.eStickyTop.style.height=i},setStickyTopTop:function(i){return e.eStickyTop.style.top=i},setStickyTopWidth:function(i){return e.eStickyTop.style.width=i},setColumnMovingCss:function(i,s){return e.addOrRemoveCssClass(i,s)},updateLayoutClasses:function(i,s){var a=[e.eBodyViewport.classList,e.eBodyClipper.classList,e.eBody.classList];a.forEach(function(l){l.toggle(ne.AUTO_HEIGHT,s.autoHeight),l.toggle(ne.NORMAL,s.normal),l.toggle(ne.PRINT,s.print)}),e.addOrRemoveCssClass(ne.AUTO_HEIGHT,s.autoHeight),e.addOrRemoveCssClass(ne.NORMAL,s.normal),e.addOrRemoveCssClass(ne.PRINT,s.print)},setAlwaysVerticalScrollClass:function(i,s){return e.eBodyViewport.classList.toggle(xl,s)},registerBodyViewportResizeListener:function(i){var s=e.resizeObserverService.observeResize(e.eBodyViewport,i);e.addDestroyFunc(function(){return s()})},setPinnedTopBottomOverflowY:function(i){return e.eTop.style.overflowY=e.eBottom.style.overflowY=i},setCellSelectableCss:function(i,s){[e.eTop,e.eBodyViewport,e.eBottom].forEach(function(a){return a.classList.toggle(i,s)})},setBodyViewportWidth:function(i){return e.eBodyViewport.style.width=i}};this.ctrl=this.createManagedBean(new Xh),this.ctrl.setComp(o,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop),(this.rangeService||this.gridOptionsService.get("rowSelection")==="multiple")&&Ra(this.getGui(),!0)},t.prototype.setRowAnimationCssOnBodyViewport=function(e,r){var o=this.eBodyViewport.classList;o.toggle(Rr.ANIMATION_ON,r),o.toggle(Rr.ANIMATION_OFF,!r)},t.prototype.getFloatingTopBottom=function(){return[this.eTop,this.eBottom]},at([h("resizeObserverService")],t.prototype,"resizeObserverService",void 0),at([Y("rangeService")],t.prototype,"rangeService",void 0),at([D("eBodyViewport")],t.prototype,"eBodyViewport",void 0),at([D("eStickyTop")],t.prototype,"eStickyTop",void 0),at([D("eTop")],t.prototype,"eTop",void 0),at([D("eBottom")],t.prototype,"eBottom",void 0),at([D("gridHeader")],t.prototype,"headerRootComp",void 0),at([D("eBodyClipper")],t.prototype,"eBodyClipper",void 0),at([D("eBody")],t.prototype,"eBody",void 0),at([P],t.prototype,"init",null),t}(W),tv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),os=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},rv=function(n){tv(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this))},t.prototype.onDisplayedColumnsChanged=function(){this.update()},t.prototype.onDisplayedColumnsWidthChanged=function(){this.update()},t.prototype.update=function(){this.updateImpl(),setTimeout(this.updateImpl.bind(this),500)},t.prototype.updateImpl=function(){var e=this.ctrlsService.getCenterRowContainerCtrl();if(e){var r={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(r)}},t.prototype.setScrollsVisible=function(e){var r=this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing;if(r){this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing;var o={type:v.EVENT_SCROLL_VISIBILITY_CHANGED};this.eventService.dispatchEvent(o)}},t.prototype.isHorizontalScrollShowing=function(){return this.horizontalScrollShowing},t.prototype.isVerticalScrollShowing=function(){return this.verticalScrollShowing},os([h("ctrlsService")],t.prototype,"ctrlsService",void 0),os([P],t.prototype,"postConstruct",null),t=os([x("scrollVisibleService")],t),t}(T),ov=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Vl=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},iv=function(n){ov(t,n);function t(){var r=n!==null&&n.apply(this,arguments)||this;return r.gridInstanceId=e.gridInstanceSequence.next(),r}e=t,t.prototype.stampTopLevelGridCompWithGridInstance=function(r){r[e.GRID_DOM_KEY]=this.gridInstanceId},t.prototype.getRenderedCellForEvent=function(r){return Oo(this.gridOptionsService,r.target,ir.DOM_DATA_KEY_CELL_CTRL)},t.prototype.isEventFromThisGrid=function(r){var o=this.isElementInThisGrid(r.target);return o},t.prototype.isElementInThisGrid=function(r){for(var o=r;o;){var i=o[e.GRID_DOM_KEY];if(O(i)){var s=i===this.gridInstanceId;return s}o=o.parentElement}return!1},t.prototype.getCellPositionForEvent=function(r){var o=this.getRenderedCellForEvent(r);return o?o.getCellPosition():null},t.prototype.getNormalisedPosition=function(r){var o=this.gridOptionsService.isDomLayout("normal"),i=r,s,a;if(i.clientX!=null||i.clientY!=null?(s=i.clientX,a=i.clientY):(s=i.x,a=i.y),o){var l=this.ctrlsService.getGridBodyCtrl(),u=l.getScrollFeature().getVScrollPosition(),c=l.getScrollFeature().getHScrollPosition();s+=c.left,a+=u.top}return{x:s,y:a}};var e;return t.gridInstanceSequence=new gr,t.GRID_DOM_KEY="__ag_grid_instance",Vl([h("ctrlsService")],t.prototype,"ctrlsService",void 0),t=e=Vl([x("mouseEventService")],t),t}(T),nv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ni=function(){return ni=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},sv=function(n){nv(t,n);function t(){var e=n.call(this)||this;return e.onPageDown=Gi(e.onPageDown,100),e.onPageUp=Gi(e.onPageUp,100),e}return t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady(function(r){e.gridBodyCon=r.gridBodyCtrl})},t.prototype.handlePageScrollingKey=function(e,r){r===void 0&&(r=!1);var o=e.key,i=e.altKey,s=e.ctrlKey||e.metaKey,a=!!this.rangeService&&e.shiftKey,l=this.mouseEventService.getCellPositionForEvent(e),u=!1;switch(o){case R.PAGE_HOME:case R.PAGE_END:!s&&!i&&(this.onHomeOrEndKey(o),u=!0);break;case R.LEFT:case R.RIGHT:case R.UP:case R.DOWN:if(!l)return!1;s&&!i&&!a&&(this.onCtrlUpDownLeftRight(o,l),u=!0);break;case R.PAGE_DOWN:case R.PAGE_UP:!s&&!i&&(u=this.handlePageUpDown(o,l,r));break}return u&&e.preventDefault(),u},t.prototype.handlePageUpDown=function(e,r,o){return o&&(r=this.focusService.getFocusedCell()),r?(e===R.PAGE_UP?this.onPageUp(r):this.onPageDown(r),!0):!1},t.prototype.navigateTo=function(e){var r=e.scrollIndex,o=e.scrollType,i=e.scrollColumn,s=e.focusIndex,a=e.focusColumn;if(O(i)&&!i.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(i),O(r)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(r,o),e.isAsync||this.gridBodyCon.getScrollFeature().ensureIndexVisible(s),this.focusService.setFocusedCell({rowIndex:s,column:a,rowPinned:null,forceBrowserFocus:!0}),this.rangeService){var l={rowIndex:s,rowPinned:null,column:a};this.rangeService.setRangeToCell(l)}},t.prototype.onPageDown=function(e){var r=this.ctrlsService.getGridBodyCtrl(),o=r.getScrollFeature().getVScrollPosition(),i=this.getViewportHeight(),s=this.paginationProxy.getPixelOffset(),a=o.top+i,l=this.paginationProxy.getRowIndexAtPixel(a+s);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,l):this.navigateToNextPage(e,l)},t.prototype.onPageUp=function(e){var r=this.ctrlsService.getGridBodyCtrl(),o=r.getScrollFeature().getVScrollPosition(),i=this.paginationProxy.getPixelOffset(),s=o.top,a=this.paginationProxy.getRowIndexAtPixel(s+i);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,a,!0):this.navigateToNextPage(e,a,!0)},t.prototype.navigateToNextPage=function(e,r,o){o===void 0&&(o=!1);var i=this.getViewportHeight(),s=this.paginationProxy.getPageFirstRow(),a=this.paginationProxy.getPageLastRow(),l=this.paginationProxy.getPixelOffset(),u=this.paginationProxy.getRow(e.rowIndex),c=o?(u==null?void 0:u.rowHeight)-i-l:i-l,p=(u==null?void 0:u.rowTop)+c,d=this.paginationProxy.getRowIndexAtPixel(p+l);if(d===e.rowIndex){var f=o?-1:1;r=d=e.rowIndex+f}var g;o?(g="bottom",da&&(d=a),r>a&&(r=a)),this.isRowTallerThanView(d)&&(r=d,g="top"),this.navigateTo({scrollIndex:r,scrollType:g,scrollColumn:null,focusIndex:d,focusColumn:e.column})},t.prototype.navigateToNextPageWithAutoHeight=function(e,r,o){var i=this;o===void 0&&(o=!1),this.navigateTo({scrollIndex:r,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:r,focusColumn:e.column}),setTimeout(function(){var s=i.getNextFocusIndexForAutoHeight(e,o);i.navigateTo({scrollIndex:r,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:s,focusColumn:e.column,isAsync:!0})},50)},t.prototype.getNextFocusIndexForAutoHeight=function(e,r){var o;r===void 0&&(r=!1);for(var i=r?-1:1,s=this.getViewportHeight(),a=this.paginationProxy.getPageLastRow(),l=0,u=e.rowIndex;u>=0&&u<=a;){var c=this.paginationProxy.getRow(u);if(c){var p=(o=c.rowHeight)!==null&&o!==void 0?o:0;if(l+p>s)break;l+=p}u+=i}return Math.max(0,Math.min(u,a))},t.prototype.getViewportHeight=function(){var e=this.ctrlsService.getGridBodyCtrl(),r=e.getScrollFeature().getVScrollPosition(),o=this.gridOptionsService.getScrollbarWidth(),i=r.bottom-r.top;return this.ctrlsService.getCenterRowContainerCtrl().isHorizontalScrollShowing()&&(i-=o),i},t.prototype.isRowTallerThanView=function(e){var r=this.paginationProxy.getRow(e);if(!r)return!1;var o=r.rowHeight;return typeof o!="number"?!1:o>this.getViewportHeight()},t.prototype.onCtrlUpDownLeftRight=function(e,r){var o=this.cellNavigationService.getNextCellToFocus(e,r,!0),i=o.rowIndex,s=o.column;this.navigateTo({scrollIndex:i,scrollType:null,scrollColumn:s,focusIndex:i,focusColumn:s})},t.prototype.onHomeOrEndKey=function(e){var r=e===R.PAGE_HOME,o=this.columnModel.getAllDisplayedColumns(),i=r?o[0]:Q(o),s=r?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow();this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:i,focusIndex:s,focusColumn:i})},t.prototype.onTabKeyDown=function(e,r){var o=r.shiftKey,i=this.tabToNextCellCommon(e,o,r);if(i){r.preventDefault();return}if(o){var s=e.getRowPosition(),a=s.rowIndex,l=s.rowPinned,u=l?a===0:a===this.paginationProxy.getPageFirstRow();u&&(this.gridOptionsService.getNum("headerHeight")===0?this.focusService.focusNextGridCoreContainer(!0,!0):(r.preventDefault(),this.focusService.focusLastHeader(r)))}else e instanceof ir&&e.focusCell(!0),this.focusService.focusNextGridCoreContainer(o)&&r.preventDefault()},t.prototype.tabToNextCell=function(e,r){var o=this.focusService.getFocusedCell();if(!o)return!1;var i=this.getCellByPosition(o);return!i&&(i=this.rowRenderer.getRowByPosition(o),!i||!i.isFullWidth())?!1:this.tabToNextCellCommon(i,e,r)},t.prototype.tabToNextCellCommon=function(e,r,o){var i=e.isEditing();if(!i&&e instanceof ir){var s=e,a=s.getRowCtrl();a&&(i=a.isEditing())}var l;return i?this.gridOptionsService.get("editType")==="fullRow"?l=this.moveToNextEditingRow(e,r,o):l=this.moveToNextEditingCell(e,r,o):l=this.moveToNextCellNotEditing(e,r),l||!!this.focusService.getFocusedHeader()},t.prototype.moveToNextEditingCell=function(e,r,o){o===void 0&&(o=null);var i=e.getCellPosition();e.getGui().focus(),e.stopEditing();var s=this.findNextCellToFocusOn(i,r,!0);return s==null?!1:(s.startEditing(null,!0,o),s.focusCell(!1),!0)},t.prototype.moveToNextEditingRow=function(e,r,o){o===void 0&&(o=null);var i=e.getCellPosition(),s=this.findNextCellToFocusOn(i,r,!0);if(s==null)return!1;var a=s.getCellPosition(),l=this.isCellEditable(i),u=this.isCellEditable(a),c=a&&i.rowIndex===a.rowIndex&&i.rowPinned===a.rowPinned;if(l&&e.setFocusOutOnEditor(),!c){var p=e.getRowCtrl();p.stopEditing();var d=s.getRowCtrl();d.startRowEditing(void 0,void 0,o)}return u?(s.setFocusInOnEditor(),s.focusCell()):s.focusCell(!0),!0},t.prototype.moveToNextCellNotEditing=function(e,r){var o=this.columnModel.getAllDisplayedColumns(),i;e instanceof nr?i=ni(ni({},e.getRowPosition()),{column:r?o[0]:Q(o)}):i=e.getCellPosition();var s=this.findNextCellToFocusOn(i,r,!1);if(s instanceof ir)s.focusCell(!0);else if(s)return this.tryToFocusFullWidthRow(s.getRowPosition(),r);return O(s)},t.prototype.findNextCellToFocusOn=function(e,r,o){for(var i=e;;){e!==i&&(e=i),r||(i=this.getLastCellOfColSpan(i)),i=this.cellNavigationService.getNextTabbedCell(i,r);var s=this.gridOptionsService.getCallback("tabToNextCell");if(O(s)){var a={backwards:r,editing:o,previousCellPosition:e,nextCellPosition:i||null},l=s(a);O(l)?(l.floating&&(z(function(){console.warn("AG Grid: tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?")},"no floating in userCell"),l.rowPinned=l.floating),i={rowIndex:l.rowIndex,column:l.column,rowPinned:l.rowPinned}):i=null}if(!i)return null;if(i.rowIndex<0){var u=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:u+i.rowIndex,column:i.column}}),null}var c=this.gridOptionsService.get("editType")==="fullRow";if(o&&!c){var p=this.isCellEditable(i);if(!p)continue}this.ensureCellVisible(i);var d=this.getCellByPosition(i);if(!d){var f=this.rowRenderer.getRowByPosition(i);if(!f||!f.isFullWidth()||o)continue;return f}if(!d.isSuppressNavigable())return this.rangeService&&this.rangeService.setRangeToCell(i),d}},t.prototype.isCellEditable=function(e){var r=this.lookupRowNodeForCell(e);return r?e.column.isCellEditable(r):!1},t.prototype.getCellByPosition=function(e){var r=this.rowRenderer.getRowByPosition(e);return r?r.getCellCtrl(e.column):null},t.prototype.lookupRowNodeForCell=function(e){return e.rowPinned==="top"?this.pinnedRowModel.getPinnedTopRow(e.rowIndex):e.rowPinned==="bottom"?this.pinnedRowModel.getPinnedBottomRow(e.rowIndex):this.paginationProxy.getRow(e.rowIndex)},t.prototype.navigateToNextCell=function(e,r,o,i){for(var s=o,a=!1;s&&(s===o||!this.isValidNavigateCell(s));)this.gridOptionsService.is("enableRtl")?r===R.LEFT&&(s=this.getLastCellOfColSpan(s)):r===R.RIGHT&&(s=this.getLastCellOfColSpan(s)),s=this.cellNavigationService.getNextCellToFocus(r,s),a=N(s);if(a&&e&&e.key===R.UP&&(s={rowIndex:-1,rowPinned:null,column:o.column}),i){var l=this.gridOptionsService.getCallback("navigateToNextCell");if(O(l)){var u={key:r,previousCellPosition:o,nextCellPosition:s||null,event:e},c=l(u);O(c)?(c.floating&&(z(function(){console.warn("AG Grid: tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?")},"no floating in userCell"),c.rowPinned=c.floating),s={rowPinned:c.rowPinned,rowIndex:c.rowIndex,column:c.column}):s=null}}if(s){if(s.rowIndex<0){var p=this.headerNavigationService.getHeaderRowCount();this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:p+s.rowIndex,column:o.column},event:e||void 0});return}var d=this.getNormalisedPosition(s);d?this.focusPosition(d):this.tryToFocusFullWidthRow(s)}},t.prototype.getNormalisedPosition=function(e){this.ensureCellVisible(e);var r=this.getCellByPosition(e);return r?(e=r.getCellPosition(),this.ensureCellVisible(e),e):null},t.prototype.tryToFocusFullWidthRow=function(e,r){r===void 0&&(r=!1);var o=this.columnModel.getAllDisplayedColumns(),i=this.rowRenderer.getRowByPosition(e);if(!i||!i.isFullWidth())return!1;var s=this.focusService.getFocusedCell(),a={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(r?Q(o):o[0])};this.focusPosition(a);var l=s!=null?this.rowPositionUtils.before(a,s):!1,u={type:v.EVENT_FULL_WIDTH_ROW_FOCUSED,rowIndex:a.rowIndex,rowPinned:a.rowPinned,column:a.column,isFullWidthCell:!0,floating:a.rowPinned,fromBelow:l};return this.eventService.dispatchEvent(u),!0},t.prototype.focusPosition=function(e){this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),this.rangeService&&this.rangeService.setRangeToCell(e)},t.prototype.isValidNavigateCell=function(e){var r=this.rowPositionUtils.getRowNode(e);return!!r},t.prototype.getLastCellOfColSpan=function(e){var r=this.getCellByPosition(e);if(!r)return e;var o=r.getColSpanningList();return o.length===1?e:{rowIndex:e.rowIndex,column:Q(o),rowPinned:e.rowPinned}},t.prototype.ensureCellVisible=function(e){var r=this.gridOptionsService.isGroupRowsSticky(),o=this.rowModel.getRow(e.rowIndex),i=r&&(o==null?void 0:o.sticky);!i&&N(e.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(e.column)},Ee([h("mouseEventService")],t.prototype,"mouseEventService",void 0),Ee([h("paginationProxy")],t.prototype,"paginationProxy",void 0),Ee([h("focusService")],t.prototype,"focusService",void 0),Ee([Y("rangeService")],t.prototype,"rangeService",void 0),Ee([h("columnModel")],t.prototype,"columnModel",void 0),Ee([h("rowModel")],t.prototype,"rowModel",void 0),Ee([h("ctrlsService")],t.prototype,"ctrlsService",void 0),Ee([h("rowRenderer")],t.prototype,"rowRenderer",void 0),Ee([h("headerNavigationService")],t.prototype,"headerNavigationService",void 0),Ee([h("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),Ee([h("cellNavigationService")],t.prototype,"cellNavigationService",void 0),Ee([h("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),Ee([P],t.prototype,"postConstruct",null),t=Ee([x("navigationService")],t),t}(T),av=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),lv=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},uv=function(n){av(t,n);function t(e){var r=n.call(this,'
')||this;return r.params=e,r}return t.prototype.postConstruct=function(){this.gridOptionsService.setDomData(this.getGui(),t.DOM_KEY_POPUP_EDITOR_WRAPPER,!0),this.addKeyDownListener()},t.prototype.addKeyDownListener=function(){var e=this,r=this.getGui(),o=this.params,i=function(s){Wo(e.gridOptionsService,s,o.node,o.column,!0)||o.onKeyDown(s)};this.addManagedListener(r,"keydown",i)},t.DOM_KEY_POPUP_EDITOR_WRAPPER="popupEditorWrapper",lv([P],t.prototype,"postConstruct",null),t}(wr),cv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),pv=function(n){cv(t,n);function t(e,r,o,i,s){var a=n.call(this)||this;a.rendererVersion=0,a.editorVersion=0,a.beans=e,a.column=r.getColumn(),a.rowNode=r.getRowNode(),a.rowCtrl=r.getRowCtrl(),a.eRow=i,a.setTemplate('
');var l=a.getGui();a.forceWrapper=r.isForceWrapper(),a.refreshWrapper(!1);var u=function(p,d,f){var g=f||l;d!=null&&d!=""?g.setAttribute(p,d):g.removeAttribute(p)},c={addOrRemoveCssClass:function(p,d){return a.addOrRemoveCssClass(p,d)},setUserStyles:function(p){return En(l,p)},getFocusableElement:function(){return a.getFocusableElement()},setTabIndex:function(p){return u("tabindex",p.toString())},setRole:function(p){return le(l,p)},setColId:function(p){return u("col-id",p)},setTitle:function(p){return u("title",p)},setIncludeSelection:function(p){return a.includeSelection=p},setIncludeRowDrag:function(p){return a.includeRowDrag=p},setIncludeDndSource:function(p){return a.includeDndSource=p},setRenderDetails:function(p,d,f){return a.setRenderDetails(p,d,f)},setEditDetails:function(p,d,f){return a.setEditDetails(p,d,f)},getCellEditor:function(){return a.cellEditor||null},getCellRenderer:function(){return a.cellRenderer||null},getParentOfValue:function(){return a.getParentOfValue()}};return a.cellCtrl=r,r.setComp(c,a.getGui(),a.eCellWrapper,o,s),a}return t.prototype.getParentOfValue=function(){return this.eCellValue?this.eCellValue:this.eCellWrapper?this.eCellWrapper:this.getGui()},t.prototype.setRenderDetails=function(e,r,o){var i=this.cellEditor&&!this.cellEditorPopupWrapper;if(!i){this.firstRender=this.firstRender==null;var s=this.refreshWrapper(!1);if(this.refreshEditStyles(!1),e){var a=o||s,l=a?!1:this.refreshCellRenderer(e);l||(this.destroyRenderer(),this.createCellRendererInstance(e))}else this.destroyRenderer(),this.insertValueWithoutCellRenderer(r)}},t.prototype.setEditDetails=function(e,r,o){e?this.createCellEditorInstance(e,r,o):this.destroyEditor()},t.prototype.removeControls=function(){this.checkboxSelectionComp=this.beans.context.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=this.beans.context.destroyBean(this.dndSourceComp),this.rowDraggingComp=this.beans.context.destroyBean(this.rowDraggingComp)},t.prototype.refreshWrapper=function(e){var r=this.includeRowDrag||this.includeDndSource||this.includeSelection,o=r||this.forceWrapper,i=o&&this.eCellWrapper==null;i&&(this.eCellWrapper=pe(''),this.getGui().appendChild(this.eCellWrapper));var s=!o&&this.eCellWrapper!=null;s&&(yt(this.eCellWrapper),this.eCellWrapper=void 0),this.addOrRemoveCssClass("ag-cell-value",!o);var a=!e&&o,l=a&&this.eCellValue==null;l&&(this.eCellValue=pe(''),this.eCellWrapper.appendChild(this.eCellValue));var u=!a&&this.eCellValue!=null;u&&(yt(this.eCellValue),this.eCellValue=void 0);var c=i||s||l||u;return c&&this.removeControls(),e||r&&this.addControls(),c},t.prototype.addControls=function(){this.includeRowDrag&&this.rowDraggingComp==null&&(this.rowDraggingComp=this.cellCtrl.createRowDragComp(),this.rowDraggingComp&&this.eCellWrapper.insertBefore(this.rowDraggingComp.getGui(),this.eCellValue)),this.includeDndSource&&this.dndSourceComp==null&&(this.dndSourceComp=this.cellCtrl.createDndSource(),this.eCellWrapper.insertBefore(this.dndSourceComp.getGui(),this.eCellValue)),this.includeSelection&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=this.cellCtrl.createSelectionCheckbox(),this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(),this.eCellValue))},t.prototype.createCellEditorInstance=function(e,r,o){var i=this,s=this.editorVersion,a=e.newAgStackInstance();if(a){var l=e.params;a.then(function(c){return i.afterCellEditorCreated(s,c,l,r,o)});var u=N(this.cellEditor);u&&l.cellStartedEdit&&this.cellCtrl.focusCell(!0)}},t.prototype.insertValueWithoutCellRenderer=function(e){var r=this.getParentOfValue();Ae(r);var o=e!=null?it(e):null;o!=null&&(r.innerHTML=o)},t.prototype.destroyEditorAndRenderer=function(){this.destroyRenderer(),this.destroyEditor()},t.prototype.destroyRenderer=function(){var e=this.beans.context;this.cellRenderer=e.destroyBean(this.cellRenderer),yt(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++},t.prototype.destroyEditor=function(){var e=this.beans.context;this.hideEditorPopup&&this.hideEditorPopup(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),yt(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++},t.prototype.refreshCellRenderer=function(e){if(this.cellRenderer==null||this.cellRenderer.refresh==null||this.cellRendererClass!==e.componentClass)return!1;var r=this.cellRenderer.refresh(e.params);return r===!0||r===void 0},t.prototype.createCellRendererInstance=function(e){var r=this,o=this.beans.gridOptionsService.is("suppressAnimationFrame"),i=!o,s=this.rendererVersion,a=e.componentClass,l=function(){var u=r.rendererVersion!==s||!r.isAlive();if(!u){var c=e.newAgStackInstance(),p=r.afterCellRendererCreated.bind(r,s,a);c&&c.then(p)}};i&&this.firstRender?this.beans.animationFrameService.createTask(l,this.rowNode.rowIndex,"createTasksP2"):l()},t.prototype.getCtrl=function(){return this.cellCtrl},t.prototype.getRowCtrl=function(){return this.rowCtrl},t.prototype.getCellRenderer=function(){return this.cellRenderer},t.prototype.getCellEditor=function(){return this.cellEditor},t.prototype.afterCellRendererCreated=function(e,r,o){var i=!this.isAlive()||e!==this.rendererVersion;if(i){this.beans.context.destroyBean(o);return}if(this.cellRenderer=o,this.cellRendererClass=r,this.cellRendererGui=this.cellRenderer.getGui(),this.cellRendererGui!=null){var s=this.getParentOfValue();Ae(s),s.appendChild(this.cellRendererGui)}},t.prototype.afterCellEditorCreated=function(e,r,o,i,s){var a=e!==this.editorVersion;if(a){this.beans.context.destroyBean(r);return}var l=r.isCancelBeforeStart&&r.isCancelBeforeStart();if(l){this.beans.context.destroyBean(r),this.cellCtrl.stopEditing(!0);return}if(!r.getGui){console.warn("AG Grid: cellEditor for column "+this.column.getId()+" is missing getGui() method"),this.beans.context.destroyBean(r);return}this.cellEditor=r,this.cellEditorGui=r.getGui();var u=i||r.isPopup!==void 0&&r.isPopup();u?this.addPopupCellEditor(o,s):this.addInCellEditor(),this.refreshEditStyles(!0,u),r.afterGuiAttached&&r.afterGuiAttached()},t.prototype.refreshEditStyles=function(e,r){var o;this.addOrRemoveCssClass("ag-cell-inline-editing",e&&!r),this.addOrRemoveCssClass("ag-cell-popup-editing",e&&!!r),this.addOrRemoveCssClass("ag-cell-not-inline-editing",!e||!!r),(o=this.rowCtrl)===null||o===void 0||o.setInlineEditingCss(e)},t.prototype.addInCellEditor=function(){var e=this.getGui(),r=this.beans.gridOptionsService.getDocument();if(e.contains(r.activeElement)&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),this.clearParentOfValue(),this.cellEditorGui){var o=this.getParentOfValue();o.appendChild(this.cellEditorGui)}},t.prototype.addPopupCellEditor=function(e,r){var o=this;this.beans.gridOptionsService.get("editType")==="fullRow"&&console.warn("AG Grid: popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.");var i=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(new uv(e));var s=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&s.appendChild(this.cellEditorGui);var a=this.beans.popupService,l=this.beans.gridOptionsService.is("stopEditingWhenCellsLoseFocus"),u=r??(i.getPopupPosition?i.getPopupPosition():"over"),c=this.beans.gridOptionsService.is("enableRtl"),p={ePopup:s,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),position:u,alignSide:c?"right":"left",keepWithinBounds:!0},d=a.positionPopupByComponent.bind(a,p),f=this.beans.localeService.getLocaleTextFunc(),g=a.addPopup({modal:l,eChild:s,closeOnEsc:!0,closedCallback:function(){o.cellCtrl.onPopupEditorClosed()},anchorToElement:this.getGui(),positionCallback:d,ariaLabel:f("ariaLabelCellEditor","Cell Editor")});g&&(this.hideEditorPopup=g.hideFunc)},t.prototype.detach=function(){this.eRow.removeChild(this.getGui())},t.prototype.destroy=function(){this.cellCtrl.stopEditing(),this.destroyEditorAndRenderer(),this.removeControls(),n.prototype.destroy.call(this)},t.prototype.clearParentOfValue=function(){var e=this.getGui(),r=this.beans.gridOptionsService.getDocument();e.contains(r.activeElement)&&Io()&&e.focus({preventScroll:!0}),Ae(this.getParentOfValue())},t}(W),dv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),hv=function(n){dv(t,n);function t(e,r,o){var i=n.call(this)||this;i.cellComps={},i.beans=r,i.rowCtrl=e,i.setTemplate('
');var s=i.getGui(),a=s.style,l={setDomOrder:function(u){return i.domOrder=u},setCellCtrls:function(u){return i.setCellCtrls(u)},showFullWidth:function(u){return i.showFullWidth(u)},getFullWidthCellRenderer:function(){return i.getFullWidthCellRenderer()},addOrRemoveCssClass:function(u,c){return i.addOrRemoveCssClass(u,c)},setUserStyles:function(u){return En(s,u)},setTop:function(u){return a.top=u},setTransform:function(u){return a.transform=u},setRowIndex:function(u){return s.setAttribute("row-index",u)},setRole:function(u){return le(s,u)},setRowId:function(u){return s.setAttribute("row-id",u)},setRowBusinessKey:function(u){return s.setAttribute("row-business-key",u)},setTabIndex:function(u){return s.setAttribute("tabindex",u.toString())}};return e.setComp(l,i.getGui(),o),i.addDestroyFunc(function(){e.unsetComp(o)}),i}return t.prototype.getInitialStyle=function(e){var r=this.rowCtrl.getInitialTransform(e),o=this.rowCtrl.getInitialRowTop(e);return r?"transform: "+r:"top: "+o},t.prototype.showFullWidth=function(e){var r=this,o=function(s){if(r.isAlive()){var a=s.getGui();r.getGui().appendChild(a),r.rowCtrl.setupDetailRowAutoHeight(a),r.setFullWidthRowComp(s)}else r.beans.context.destroyBean(s)},i=e.newAgStackInstance();i&&i.then(o)},t.prototype.setCellCtrls=function(e){var r=this,o=Object.assign({},this.cellComps);e.forEach(function(s){var a=s.getInstanceId(),l=r.cellComps[a];l==null?r.newCellComp(s):o[a]=null});var i=tt(o).filter(function(s){return s!=null});this.destroyCells(i),this.ensureDomOrder(e)},t.prototype.ensureDomOrder=function(e){var r=this;if(this.domOrder){var o=[];e.forEach(function(i){var s=r.cellComps[i.getInstanceId()];s&&o.push(s.getGui())}),Sn(this.getGui(),o)}},t.prototype.newCellComp=function(e){var r=new pv(this.beans,e,this.rowCtrl.isPrintLayout(),this.getGui(),this.rowCtrl.isEditing());this.cellComps[e.getInstanceId()]=r,this.getGui().appendChild(r.getGui())},t.prototype.destroy=function(){n.prototype.destroy.call(this),this.destroyAllCells()},t.prototype.destroyAllCells=function(){var e=tt(this.cellComps).filter(function(r){return r!=null});this.destroyCells(e)},t.prototype.setFullWidthRowComp=function(e){var r=this;this.fullWidthCellRenderer&&console.error("AG Grid - should not be setting fullWidthRowComponent twice"),this.fullWidthCellRenderer=e,this.addDestroyFunc(function(){r.fullWidthCellRenderer=r.beans.context.destroyBean(r.fullWidthCellRenderer)})},t.prototype.getFullWidthCellRenderer=function(){return this.fullWidthCellRenderer},t.prototype.destroyCells=function(e){var r=this;e.forEach(function(o){if(o){var i=o.getCtrl().getInstanceId();r.cellComps[i]===o&&(o.detach(),o.destroy(),r.cellComps[i]=null)}})},t}(W),fv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),is=function(){return is=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i};function vv(){var n=W.elementGettingCreated.getAttribute("name"),t=Hl.getRowContainerCssClasses(n),e,r=n===_.CENTER,o=n===_.TOP_CENTER||n===_.STICKY_TOP_CENTER||n===_.BOTTOM_CENTER;return r?e='`,ev=function(n){Jf(t,n);function t(){return n.call(this,Zf)||this}return t.prototype.init=function(){var e=this,r=function(i,s){var a=i+"px";s.style.minHeight=a,s.style.height=a},o={setRowAnimationCssOnBodyViewport:function(i,s){return e.setRowAnimationCssOnBodyViewport(i,s)},setColumnCount:function(i){return Ta(e.getGui(),i)},setRowCount:function(i){return Oa(e.getGui(),i)},setTopHeight:function(i){return r(i,e.eTop)},setBottomHeight:function(i){return r(i,e.eBottom)},setTopDisplay:function(i){return e.eTop.style.display=i},setBottomDisplay:function(i){return e.eBottom.style.display=i},setStickyTopHeight:function(i){return e.eStickyTop.style.height=i},setStickyTopTop:function(i){return e.eStickyTop.style.top=i},setStickyTopWidth:function(i){return e.eStickyTop.style.width=i},setColumnMovingCss:function(i,s){return e.addOrRemoveCssClass(i,s)},updateLayoutClasses:function(i,s){var a=[e.eBodyViewport.classList,e.eBodyClipper.classList,e.eBody.classList];a.forEach(function(l){l.toggle(ne.AUTO_HEIGHT,s.autoHeight),l.toggle(ne.NORMAL,s.normal),l.toggle(ne.PRINT,s.print)}),e.addOrRemoveCssClass(ne.AUTO_HEIGHT,s.autoHeight),e.addOrRemoveCssClass(ne.NORMAL,s.normal),e.addOrRemoveCssClass(ne.PRINT,s.print)},setAlwaysVerticalScrollClass:function(i,s){return e.eBodyViewport.classList.toggle(xl,s)},registerBodyViewportResizeListener:function(i){var s=e.resizeObserverService.observeResize(e.eBodyViewport,i);e.addDestroyFunc(function(){return s()})},setPinnedTopBottomOverflowY:function(i){return e.eTop.style.overflowY=e.eBottom.style.overflowY=i},setCellSelectableCss:function(i,s){[e.eTop,e.eBodyViewport,e.eBottom].forEach(function(a){return a.classList.toggle(i,s)})},setBodyViewportWidth:function(i){return e.eBodyViewport.style.width=i}};this.ctrl=this.createManagedBean(new Xh),this.ctrl.setComp(o,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop),(this.rangeService||this.gridOptionsService.get("rowSelection")==="multiple")&&Ra(this.getGui(),!0)},t.prototype.setRowAnimationCssOnBodyViewport=function(e,r){var o=this.eBodyViewport.classList;o.toggle(Rr.ANIMATION_ON,r),o.toggle(Rr.ANIMATION_OFF,!r)},t.prototype.getFloatingTopBottom=function(){return[this.eTop,this.eBottom]},at([h("resizeObserverService")],t.prototype,"resizeObserverService",void 0),at([Y("rangeService")],t.prototype,"rangeService",void 0),at([D("eBodyViewport")],t.prototype,"eBodyViewport",void 0),at([D("eStickyTop")],t.prototype,"eStickyTop",void 0),at([D("eTop")],t.prototype,"eTop",void 0),at([D("eBottom")],t.prototype,"eBottom",void 0),at([D("gridHeader")],t.prototype,"headerRootComp",void 0),at([D("eBodyClipper")],t.prototype,"eBodyClipper",void 0),at([D("eBody")],t.prototype,"eBody",void 0),at([P],t.prototype,"init",null),t}(W),tv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),os=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},rv=function(n){tv(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this))},t.prototype.onDisplayedColumnsChanged=function(){this.update()},t.prototype.onDisplayedColumnsWidthChanged=function(){this.update()},t.prototype.update=function(){this.updateImpl(),setTimeout(this.updateImpl.bind(this),500)},t.prototype.updateImpl=function(){var e=this.ctrlsService.getCenterRowContainerCtrl();if(e){var r={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(r)}},t.prototype.setScrollsVisible=function(e){var r=this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing;if(r){this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing;var o={type:v.EVENT_SCROLL_VISIBILITY_CHANGED};this.eventService.dispatchEvent(o)}},t.prototype.isHorizontalScrollShowing=function(){return this.horizontalScrollShowing},t.prototype.isVerticalScrollShowing=function(){return this.verticalScrollShowing},os([h("ctrlsService")],t.prototype,"ctrlsService",void 0),os([P],t.prototype,"postConstruct",null),t=os([x("scrollVisibleService")],t),t}(T),ov=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Vl=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},iv=function(n){ov(t,n);function t(){var r=n!==null&&n.apply(this,arguments)||this;return r.gridInstanceId=e.gridInstanceSequence.next(),r}e=t,t.prototype.stampTopLevelGridCompWithGridInstance=function(r){r[e.GRID_DOM_KEY]=this.gridInstanceId},t.prototype.getRenderedCellForEvent=function(r){return Oo(this.gridOptionsService,r.target,ir.DOM_DATA_KEY_CELL_CTRL)},t.prototype.isEventFromThisGrid=function(r){var o=this.isElementInThisGrid(r.target);return o},t.prototype.isElementInThisGrid=function(r){for(var o=r;o;){var i=o[e.GRID_DOM_KEY];if(O(i)){var s=i===this.gridInstanceId;return s}o=o.parentElement}return!1},t.prototype.getCellPositionForEvent=function(r){var o=this.getRenderedCellForEvent(r);return o?o.getCellPosition():null},t.prototype.getNormalisedPosition=function(r){var o=this.gridOptionsService.isDomLayout("normal"),i=r,s,a;if(i.clientX!=null||i.clientY!=null?(s=i.clientX,a=i.clientY):(s=i.x,a=i.y),o){var l=this.ctrlsService.getGridBodyCtrl(),u=l.getScrollFeature().getVScrollPosition(),c=l.getScrollFeature().getHScrollPosition();s+=c.left,a+=u.top}return{x:s,y:a}};var e;return t.gridInstanceSequence=new gr,t.GRID_DOM_KEY="__ag_grid_instance",Vl([h("ctrlsService")],t.prototype,"ctrlsService",void 0),t=e=Vl([x("mouseEventService")],t),t}(T),nv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ni=function(){return ni=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},sv=function(n){nv(t,n);function t(){var e=n.call(this)||this;return e.onPageDown=Gi(e.onPageDown,100),e.onPageUp=Gi(e.onPageUp,100),e}return t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady(function(r){e.gridBodyCon=r.gridBodyCtrl})},t.prototype.handlePageScrollingKey=function(e,r){r===void 0&&(r=!1);var o=e.key,i=e.altKey,s=e.ctrlKey||e.metaKey,a=!!this.rangeService&&e.shiftKey,l=this.mouseEventService.getCellPositionForEvent(e),u=!1;switch(o){case R.PAGE_HOME:case R.PAGE_END:!s&&!i&&(this.onHomeOrEndKey(o),u=!0);break;case R.LEFT:case R.RIGHT:case R.UP:case R.DOWN:if(!l)return!1;s&&!i&&!a&&(this.onCtrlUpDownLeftRight(o,l),u=!0);break;case R.PAGE_DOWN:case R.PAGE_UP:!s&&!i&&(u=this.handlePageUpDown(o,l,r));break}return u&&e.preventDefault(),u},t.prototype.handlePageUpDown=function(e,r,o){return o&&(r=this.focusService.getFocusedCell()),r?(e===R.PAGE_UP?this.onPageUp(r):this.onPageDown(r),!0):!1},t.prototype.navigateTo=function(e){var r=e.scrollIndex,o=e.scrollType,i=e.scrollColumn,s=e.focusIndex,a=e.focusColumn;if(O(i)&&!i.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(i),O(r)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(r,o),e.isAsync||this.gridBodyCon.getScrollFeature().ensureIndexVisible(s),this.focusService.setFocusedCell({rowIndex:s,column:a,rowPinned:null,forceBrowserFocus:!0}),this.rangeService){var l={rowIndex:s,rowPinned:null,column:a};this.rangeService.setRangeToCell(l)}},t.prototype.onPageDown=function(e){var r=this.ctrlsService.getGridBodyCtrl(),o=r.getScrollFeature().getVScrollPosition(),i=this.getViewportHeight(),s=this.paginationProxy.getPixelOffset(),a=o.top+i,l=this.paginationProxy.getRowIndexAtPixel(a+s);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,l):this.navigateToNextPage(e,l)},t.prototype.onPageUp=function(e){var r=this.ctrlsService.getGridBodyCtrl(),o=r.getScrollFeature().getVScrollPosition(),i=this.paginationProxy.getPixelOffset(),s=o.top,a=this.paginationProxy.getRowIndexAtPixel(s+i);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,a,!0):this.navigateToNextPage(e,a,!0)},t.prototype.navigateToNextPage=function(e,r,o){o===void 0&&(o=!1);var i=this.getViewportHeight(),s=this.paginationProxy.getPageFirstRow(),a=this.paginationProxy.getPageLastRow(),l=this.paginationProxy.getPixelOffset(),u=this.paginationProxy.getRow(e.rowIndex),c=o?(u==null?void 0:u.rowHeight)-i-l:i-l,p=(u==null?void 0:u.rowTop)+c,d=this.paginationProxy.getRowIndexAtPixel(p+l);if(d===e.rowIndex){var f=o?-1:1;r=d=e.rowIndex+f}var g;o?(g="bottom",da&&(d=a),r>a&&(r=a)),this.isRowTallerThanView(d)&&(r=d,g="top"),this.navigateTo({scrollIndex:r,scrollType:g,scrollColumn:null,focusIndex:d,focusColumn:e.column})},t.prototype.navigateToNextPageWithAutoHeight=function(e,r,o){var i=this;o===void 0&&(o=!1),this.navigateTo({scrollIndex:r,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:r,focusColumn:e.column}),setTimeout(function(){var s=i.getNextFocusIndexForAutoHeight(e,o);i.navigateTo({scrollIndex:r,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:s,focusColumn:e.column,isAsync:!0})},50)},t.prototype.getNextFocusIndexForAutoHeight=function(e,r){var o;r===void 0&&(r=!1);for(var i=r?-1:1,s=this.getViewportHeight(),a=this.paginationProxy.getPageLastRow(),l=0,u=e.rowIndex;u>=0&&u<=a;){var c=this.paginationProxy.getRow(u);if(c){var p=(o=c.rowHeight)!==null&&o!==void 0?o:0;if(l+p>s)break;l+=p}u+=i}return Math.max(0,Math.min(u,a))},t.prototype.getViewportHeight=function(){var e=this.ctrlsService.getGridBodyCtrl(),r=e.getScrollFeature().getVScrollPosition(),o=this.gridOptionsService.getScrollbarWidth(),i=r.bottom-r.top;return this.ctrlsService.getCenterRowContainerCtrl().isHorizontalScrollShowing()&&(i-=o),i},t.prototype.isRowTallerThanView=function(e){var r=this.paginationProxy.getRow(e);if(!r)return!1;var o=r.rowHeight;return typeof o!="number"?!1:o>this.getViewportHeight()},t.prototype.onCtrlUpDownLeftRight=function(e,r){var o=this.cellNavigationService.getNextCellToFocus(e,r,!0),i=o.rowIndex,s=o.column;this.navigateTo({scrollIndex:i,scrollType:null,scrollColumn:s,focusIndex:i,focusColumn:s})},t.prototype.onHomeOrEndKey=function(e){var r=e===R.PAGE_HOME,o=this.columnModel.getAllDisplayedColumns(),i=r?o[0]:Q(o),s=r?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow();this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:i,focusIndex:s,focusColumn:i})},t.prototype.onTabKeyDown=function(e,r){var o=r.shiftKey,i=this.tabToNextCellCommon(e,o,r);if(i){r.preventDefault();return}if(o){var s=e.getRowPosition(),a=s.rowIndex,l=s.rowPinned,u=l?a===0:a===this.paginationProxy.getPageFirstRow();u&&(this.gridOptionsService.getNum("headerHeight")===0?this.focusService.focusNextGridCoreContainer(!0,!0):(r.preventDefault(),this.focusService.focusLastHeader(r)))}else e instanceof ir&&e.focusCell(!0),this.focusService.focusNextGridCoreContainer(o)&&r.preventDefault()},t.prototype.tabToNextCell=function(e,r){var o=this.focusService.getFocusedCell();if(!o)return!1;var i=this.getCellByPosition(o);return!i&&(i=this.rowRenderer.getRowByPosition(o),!i||!i.isFullWidth())?!1:this.tabToNextCellCommon(i,e,r)},t.prototype.tabToNextCellCommon=function(e,r,o){var i=e.isEditing();if(!i&&e instanceof ir){var s=e,a=s.getRowCtrl();a&&(i=a.isEditing())}var l;return i?this.gridOptionsService.get("editType")==="fullRow"?l=this.moveToNextEditingRow(e,r,o):l=this.moveToNextEditingCell(e,r,o):l=this.moveToNextCellNotEditing(e,r),l||!!this.focusService.getFocusedHeader()},t.prototype.moveToNextEditingCell=function(e,r,o){o===void 0&&(o=null);var i=e.getCellPosition();e.getGui().focus(),e.stopEditing();var s=this.findNextCellToFocusOn(i,r,!0);return s==null?!1:(s.startEditing(null,!0,o),s.focusCell(!1),!0)},t.prototype.moveToNextEditingRow=function(e,r,o){o===void 0&&(o=null);var i=e.getCellPosition(),s=this.findNextCellToFocusOn(i,r,!0);if(s==null)return!1;var a=s.getCellPosition(),l=this.isCellEditable(i),u=this.isCellEditable(a),c=a&&i.rowIndex===a.rowIndex&&i.rowPinned===a.rowPinned;if(l&&e.setFocusOutOnEditor(),!c){var p=e.getRowCtrl();p.stopEditing();var d=s.getRowCtrl();d.startRowEditing(void 0,void 0,o)}return u?(s.setFocusInOnEditor(),s.focusCell()):s.focusCell(!0),!0},t.prototype.moveToNextCellNotEditing=function(e,r){var o=this.columnModel.getAllDisplayedColumns(),i;e instanceof nr?i=ni(ni({},e.getRowPosition()),{column:r?o[0]:Q(o)}):i=e.getCellPosition();var s=this.findNextCellToFocusOn(i,r,!1);if(s instanceof ir)s.focusCell(!0);else if(s)return this.tryToFocusFullWidthRow(s.getRowPosition(),r);return O(s)},t.prototype.findNextCellToFocusOn=function(e,r,o){for(var i=e;;){e!==i&&(e=i),r||(i=this.getLastCellOfColSpan(i)),i=this.cellNavigationService.getNextTabbedCell(i,r);var s=this.gridOptionsService.getCallback("tabToNextCell");if(O(s)){var a={backwards:r,editing:o,previousCellPosition:e,nextCellPosition:i||null},l=s(a);O(l)?(l.floating&&(z(function(){console.warn("AG Grid: tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?")},"no floating in userCell"),l.rowPinned=l.floating),i={rowIndex:l.rowIndex,column:l.column,rowPinned:l.rowPinned}):i=null}if(!i)return null;if(i.rowIndex<0){var u=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:u+i.rowIndex,column:i.column}}),null}var c=this.gridOptionsService.get("editType")==="fullRow";if(o&&!c){var p=this.isCellEditable(i);if(!p)continue}this.ensureCellVisible(i);var d=this.getCellByPosition(i);if(!d){var f=this.rowRenderer.getRowByPosition(i);if(!f||!f.isFullWidth()||o)continue;return f}if(!d.isSuppressNavigable())return this.rangeService&&this.rangeService.setRangeToCell(i),d}},t.prototype.isCellEditable=function(e){var r=this.lookupRowNodeForCell(e);return r?e.column.isCellEditable(r):!1},t.prototype.getCellByPosition=function(e){var r=this.rowRenderer.getRowByPosition(e);return r?r.getCellCtrl(e.column):null},t.prototype.lookupRowNodeForCell=function(e){return e.rowPinned==="top"?this.pinnedRowModel.getPinnedTopRow(e.rowIndex):e.rowPinned==="bottom"?this.pinnedRowModel.getPinnedBottomRow(e.rowIndex):this.paginationProxy.getRow(e.rowIndex)},t.prototype.navigateToNextCell=function(e,r,o,i){for(var s=o,a=!1;s&&(s===o||!this.isValidNavigateCell(s));)this.gridOptionsService.is("enableRtl")?r===R.LEFT&&(s=this.getLastCellOfColSpan(s)):r===R.RIGHT&&(s=this.getLastCellOfColSpan(s)),s=this.cellNavigationService.getNextCellToFocus(r,s),a=N(s);if(a&&e&&e.key===R.UP&&(s={rowIndex:-1,rowPinned:null,column:o.column}),i){var l=this.gridOptionsService.getCallback("navigateToNextCell");if(O(l)){var u={key:r,previousCellPosition:o,nextCellPosition:s||null,event:e},c=l(u);O(c)?(c.floating&&(z(function(){console.warn("AG Grid: tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?")},"no floating in userCell"),c.rowPinned=c.floating),s={rowPinned:c.rowPinned,rowIndex:c.rowIndex,column:c.column}):s=null}}if(s){if(s.rowIndex<0){var p=this.headerNavigationService.getHeaderRowCount();this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:p+s.rowIndex,column:o.column},event:e||void 0});return}var d=this.getNormalisedPosition(s);d?this.focusPosition(d):this.tryToFocusFullWidthRow(s)}},t.prototype.getNormalisedPosition=function(e){this.ensureCellVisible(e);var r=this.getCellByPosition(e);return r?(e=r.getCellPosition(),this.ensureCellVisible(e),e):null},t.prototype.tryToFocusFullWidthRow=function(e,r){r===void 0&&(r=!1);var o=this.columnModel.getAllDisplayedColumns(),i=this.rowRenderer.getRowByPosition(e);if(!i||!i.isFullWidth())return!1;var s=this.focusService.getFocusedCell(),a={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(r?Q(o):o[0])};this.focusPosition(a);var l=s!=null?this.rowPositionUtils.before(a,s):!1,u={type:v.EVENT_FULL_WIDTH_ROW_FOCUSED,rowIndex:a.rowIndex,rowPinned:a.rowPinned,column:a.column,isFullWidthCell:!0,floating:a.rowPinned,fromBelow:l};return this.eventService.dispatchEvent(u),!0},t.prototype.focusPosition=function(e){this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),this.rangeService&&this.rangeService.setRangeToCell(e)},t.prototype.isValidNavigateCell=function(e){var r=this.rowPositionUtils.getRowNode(e);return!!r},t.prototype.getLastCellOfColSpan=function(e){var r=this.getCellByPosition(e);if(!r)return e;var o=r.getColSpanningList();return o.length===1?e:{rowIndex:e.rowIndex,column:Q(o),rowPinned:e.rowPinned}},t.prototype.ensureCellVisible=function(e){var r=this.gridOptionsService.isGroupRowsSticky(),o=this.rowModel.getRow(e.rowIndex),i=r&&(o==null?void 0:o.sticky);!i&&N(e.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(e.column)},Ee([h("mouseEventService")],t.prototype,"mouseEventService",void 0),Ee([h("paginationProxy")],t.prototype,"paginationProxy",void 0),Ee([h("focusService")],t.prototype,"focusService",void 0),Ee([Y("rangeService")],t.prototype,"rangeService",void 0),Ee([h("columnModel")],t.prototype,"columnModel",void 0),Ee([h("rowModel")],t.prototype,"rowModel",void 0),Ee([h("ctrlsService")],t.prototype,"ctrlsService",void 0),Ee([h("rowRenderer")],t.prototype,"rowRenderer",void 0),Ee([h("headerNavigationService")],t.prototype,"headerNavigationService",void 0),Ee([h("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),Ee([h("cellNavigationService")],t.prototype,"cellNavigationService",void 0),Ee([h("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),Ee([P],t.prototype,"postConstruct",null),t=Ee([x("navigationService")],t),t}(T),av=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),lv=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},uv=function(n){av(t,n);function t(e){var r=n.call(this,'
')||this;return r.params=e,r}return t.prototype.postConstruct=function(){this.gridOptionsService.setDomData(this.getGui(),t.DOM_KEY_POPUP_EDITOR_WRAPPER,!0),this.addKeyDownListener()},t.prototype.addKeyDownListener=function(){var e=this,r=this.getGui(),o=this.params,i=function(s){Wo(e.gridOptionsService,s,o.node,o.column,!0)||o.onKeyDown(s)};this.addManagedListener(r,"keydown",i)},t.DOM_KEY_POPUP_EDITOR_WRAPPER="popupEditorWrapper",lv([P],t.prototype,"postConstruct",null),t}(wr),cv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),pv=function(n){cv(t,n);function t(e,r,o,i,s){var a=n.call(this)||this;a.rendererVersion=0,a.editorVersion=0,a.beans=e,a.column=r.getColumn(),a.rowNode=r.getRowNode(),a.rowCtrl=r.getRowCtrl(),a.eRow=i,a.setTemplate('
');var l=a.getGui();a.forceWrapper=r.isForceWrapper(),a.refreshWrapper(!1);var u=function(p,d,f){var g=f||l;d!=null&&d!=""?g.setAttribute(p,d):g.removeAttribute(p)},c={addOrRemoveCssClass:function(p,d){return a.addOrRemoveCssClass(p,d)},setUserStyles:function(p){return En(l,p)},getFocusableElement:function(){return a.getFocusableElement()},setTabIndex:function(p){return u("tabindex",p.toString())},setRole:function(p){return le(l,p)},setColId:function(p){return u("col-id",p)},setTitle:function(p){return u("title",p)},setIncludeSelection:function(p){return a.includeSelection=p},setIncludeRowDrag:function(p){return a.includeRowDrag=p},setIncludeDndSource:function(p){return a.includeDndSource=p},setRenderDetails:function(p,d,f){return a.setRenderDetails(p,d,f)},setEditDetails:function(p,d,f){return a.setEditDetails(p,d,f)},getCellEditor:function(){return a.cellEditor||null},getCellRenderer:function(){return a.cellRenderer||null},getParentOfValue:function(){return a.getParentOfValue()}};return a.cellCtrl=r,r.setComp(c,a.getGui(),a.eCellWrapper,o,s),a}return t.prototype.getParentOfValue=function(){return this.eCellValue?this.eCellValue:this.eCellWrapper?this.eCellWrapper:this.getGui()},t.prototype.setRenderDetails=function(e,r,o){var i=this.cellEditor&&!this.cellEditorPopupWrapper;if(!i){this.firstRender=this.firstRender==null;var s=this.refreshWrapper(!1);if(this.refreshEditStyles(!1),e){var a=o||s,l=a?!1:this.refreshCellRenderer(e);l||(this.destroyRenderer(),this.createCellRendererInstance(e))}else this.destroyRenderer(),this.insertValueWithoutCellRenderer(r)}},t.prototype.setEditDetails=function(e,r,o){e?this.createCellEditorInstance(e,r,o):this.destroyEditor()},t.prototype.removeControls=function(){this.checkboxSelectionComp=this.beans.context.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=this.beans.context.destroyBean(this.dndSourceComp),this.rowDraggingComp=this.beans.context.destroyBean(this.rowDraggingComp)},t.prototype.refreshWrapper=function(e){var r=this.includeRowDrag||this.includeDndSource||this.includeSelection,o=r||this.forceWrapper,i=o&&this.eCellWrapper==null;i&&(this.eCellWrapper=pe(''),this.getGui().appendChild(this.eCellWrapper));var s=!o&&this.eCellWrapper!=null;s&&(yt(this.eCellWrapper),this.eCellWrapper=void 0),this.addOrRemoveCssClass("ag-cell-value",!o);var a=!e&&o,l=a&&this.eCellValue==null;l&&(this.eCellValue=pe(''),this.eCellWrapper.appendChild(this.eCellValue));var u=!a&&this.eCellValue!=null;u&&(yt(this.eCellValue),this.eCellValue=void 0);var c=i||s||l||u;return c&&this.removeControls(),e||r&&this.addControls(),c},t.prototype.addControls=function(){this.includeRowDrag&&this.rowDraggingComp==null&&(this.rowDraggingComp=this.cellCtrl.createRowDragComp(),this.rowDraggingComp&&this.eCellWrapper.insertBefore(this.rowDraggingComp.getGui(),this.eCellValue)),this.includeDndSource&&this.dndSourceComp==null&&(this.dndSourceComp=this.cellCtrl.createDndSource(),this.eCellWrapper.insertBefore(this.dndSourceComp.getGui(),this.eCellValue)),this.includeSelection&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=this.cellCtrl.createSelectionCheckbox(),this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(),this.eCellValue))},t.prototype.createCellEditorInstance=function(e,r,o){var i=this,s=this.editorVersion,a=e.newAgStackInstance();if(a){var l=e.params;a.then(function(c){return i.afterCellEditorCreated(s,c,l,r,o)});var u=N(this.cellEditor);u&&l.cellStartedEdit&&this.cellCtrl.focusCell(!0)}},t.prototype.insertValueWithoutCellRenderer=function(e){var r=this.getParentOfValue();Ae(r);var o=e!=null?it(e):null;o!=null&&(r.innerHTML=o)},t.prototype.destroyEditorAndRenderer=function(){this.destroyRenderer(),this.destroyEditor()},t.prototype.destroyRenderer=function(){var e=this.beans.context;this.cellRenderer=e.destroyBean(this.cellRenderer),yt(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++},t.prototype.destroyEditor=function(){var e=this.beans.context;this.hideEditorPopup&&this.hideEditorPopup(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),yt(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++},t.prototype.refreshCellRenderer=function(e){if(this.cellRenderer==null||this.cellRenderer.refresh==null||this.cellRendererClass!==e.componentClass)return!1;var r=this.cellRenderer.refresh(e.params);return r===!0||r===void 0},t.prototype.createCellRendererInstance=function(e){var r=this,o=this.beans.gridOptionsService.is("suppressAnimationFrame"),i=!o,s=this.rendererVersion,a=e.componentClass,l=function(){var u=r.rendererVersion!==s||!r.isAlive();if(!u){var c=e.newAgStackInstance(),p=r.afterCellRendererCreated.bind(r,s,a);c&&c.then(p)}};i&&this.firstRender?this.beans.animationFrameService.createTask(l,this.rowNode.rowIndex,"createTasksP2"):l()},t.prototype.getCtrl=function(){return this.cellCtrl},t.prototype.getRowCtrl=function(){return this.rowCtrl},t.prototype.getCellRenderer=function(){return this.cellRenderer},t.prototype.getCellEditor=function(){return this.cellEditor},t.prototype.afterCellRendererCreated=function(e,r,o){var i=!this.isAlive()||e!==this.rendererVersion;if(i){this.beans.context.destroyBean(o);return}if(this.cellRenderer=o,this.cellRendererClass=r,this.cellRendererGui=this.cellRenderer.getGui(),this.cellRendererGui!=null){var s=this.getParentOfValue();Ae(s),s.appendChild(this.cellRendererGui)}},t.prototype.afterCellEditorCreated=function(e,r,o,i,s){var a=e!==this.editorVersion;if(a){this.beans.context.destroyBean(r);return}var l=r.isCancelBeforeStart&&r.isCancelBeforeStart();if(l){this.beans.context.destroyBean(r),this.cellCtrl.stopEditing(!0);return}if(!r.getGui){console.warn("AG Grid: cellEditor for column "+this.column.getId()+" is missing getGui() method"),this.beans.context.destroyBean(r);return}this.cellEditor=r,this.cellEditorGui=r.getGui();var u=i||r.isPopup!==void 0&&r.isPopup();u?this.addPopupCellEditor(o,s):this.addInCellEditor(),this.refreshEditStyles(!0,u),r.afterGuiAttached&&r.afterGuiAttached()},t.prototype.refreshEditStyles=function(e,r){var o;this.addOrRemoveCssClass("ag-cell-inline-editing",e&&!r),this.addOrRemoveCssClass("ag-cell-popup-editing",e&&!!r),this.addOrRemoveCssClass("ag-cell-not-inline-editing",!e||!!r),(o=this.rowCtrl)===null||o===void 0||o.setInlineEditingCss(e)},t.prototype.addInCellEditor=function(){var e=this.getGui(),r=this.beans.gridOptionsService.getDocument();if(e.contains(r.activeElement)&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),this.clearParentOfValue(),this.cellEditorGui){var o=this.getParentOfValue();o.appendChild(this.cellEditorGui)}},t.prototype.addPopupCellEditor=function(e,r){var o=this;this.beans.gridOptionsService.get("editType")==="fullRow"&&console.warn("AG Grid: popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.");var i=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(new uv(e));var s=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&s.appendChild(this.cellEditorGui);var a=this.beans.popupService,l=this.beans.gridOptionsService.is("stopEditingWhenCellsLoseFocus"),u=r??(i.getPopupPosition?i.getPopupPosition():"over"),c=this.beans.gridOptionsService.is("enableRtl"),p={ePopup:s,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),position:u,alignSide:c?"right":"left",keepWithinBounds:!0},d=a.positionPopupByComponent.bind(a,p),f=this.beans.localeService.getLocaleTextFunc(),g=a.addPopup({modal:l,eChild:s,closeOnEsc:!0,closedCallback:function(){o.cellCtrl.onPopupEditorClosed()},anchorToElement:this.getGui(),positionCallback:d,ariaLabel:f("ariaLabelCellEditor","Cell Editor")});g&&(this.hideEditorPopup=g.hideFunc)},t.prototype.detach=function(){this.eRow.removeChild(this.getGui())},t.prototype.destroy=function(){this.cellCtrl.stopEditing(),this.destroyEditorAndRenderer(),this.removeControls(),n.prototype.destroy.call(this)},t.prototype.clearParentOfValue=function(){var e=this.getGui(),r=this.beans.gridOptionsService.getDocument();e.contains(r.activeElement)&&Mo()&&e.focus({preventScroll:!0}),Ae(this.getParentOfValue())},t}(W),dv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),hv=function(n){dv(t,n);function t(e,r,o){var i=n.call(this)||this;i.cellComps={},i.beans=r,i.rowCtrl=e,i.setTemplate('
');var s=i.getGui(),a=s.style,l={setDomOrder:function(u){return i.domOrder=u},setCellCtrls:function(u){return i.setCellCtrls(u)},showFullWidth:function(u){return i.showFullWidth(u)},getFullWidthCellRenderer:function(){return i.getFullWidthCellRenderer()},addOrRemoveCssClass:function(u,c){return i.addOrRemoveCssClass(u,c)},setUserStyles:function(u){return En(s,u)},setTop:function(u){return a.top=u},setTransform:function(u){return a.transform=u},setRowIndex:function(u){return s.setAttribute("row-index",u)},setRole:function(u){return le(s,u)},setRowId:function(u){return s.setAttribute("row-id",u)},setRowBusinessKey:function(u){return s.setAttribute("row-business-key",u)},setTabIndex:function(u){return s.setAttribute("tabindex",u.toString())}};return e.setComp(l,i.getGui(),o),i.addDestroyFunc(function(){e.unsetComp(o)}),i}return t.prototype.getInitialStyle=function(e){var r=this.rowCtrl.getInitialTransform(e),o=this.rowCtrl.getInitialRowTop(e);return r?"transform: "+r:"top: "+o},t.prototype.showFullWidth=function(e){var r=this,o=function(s){if(r.isAlive()){var a=s.getGui();r.getGui().appendChild(a),r.rowCtrl.setupDetailRowAutoHeight(a),r.setFullWidthRowComp(s)}else r.beans.context.destroyBean(s)},i=e.newAgStackInstance();i&&i.then(o)},t.prototype.setCellCtrls=function(e){var r=this,o=Object.assign({},this.cellComps);e.forEach(function(s){var a=s.getInstanceId(),l=r.cellComps[a];l==null?r.newCellComp(s):o[a]=null});var i=tt(o).filter(function(s){return s!=null});this.destroyCells(i),this.ensureDomOrder(e)},t.prototype.ensureDomOrder=function(e){var r=this;if(this.domOrder){var o=[];e.forEach(function(i){var s=r.cellComps[i.getInstanceId()];s&&o.push(s.getGui())}),Sn(this.getGui(),o)}},t.prototype.newCellComp=function(e){var r=new pv(this.beans,e,this.rowCtrl.isPrintLayout(),this.getGui(),this.rowCtrl.isEditing());this.cellComps[e.getInstanceId()]=r,this.getGui().appendChild(r.getGui())},t.prototype.destroy=function(){n.prototype.destroy.call(this),this.destroyAllCells()},t.prototype.destroyAllCells=function(){var e=tt(this.cellComps).filter(function(r){return r!=null});this.destroyCells(e)},t.prototype.setFullWidthRowComp=function(e){var r=this;this.fullWidthCellRenderer&&console.error("AG Grid - should not be setting fullWidthRowComponent twice"),this.fullWidthCellRenderer=e,this.addDestroyFunc(function(){r.fullWidthCellRenderer=r.beans.context.destroyBean(r.fullWidthCellRenderer)})},t.prototype.getFullWidthCellRenderer=function(){return this.fullWidthCellRenderer},t.prototype.destroyCells=function(e){var r=this;e.forEach(function(o){if(o){var i=o.getCtrl().getInstanceId();r.cellComps[i]===o&&(o.detach(),o.destroy(),r.cellComps[i]=null)}})},t}(W),fv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),is=function(){return is=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i};function vv(){var n=W.elementGettingCreated.getAttribute("name"),t=Hl.getRowContainerCssClasses(n),e,r=n===_.CENTER,o=n===_.TOP_CENTER||n===_.STICKY_TOP_CENTER||n===_.BOTTOM_CENTER;return r?e='`:o?e='`:e='
',e}var gv=function(n){fv(t,n);function t(){var e=n.call(this,vv())||this;return e.rowComps={},e.name=W.elementGettingCreated.getAttribute("name"),e.type=Yf(e.name),e}return t.prototype.postConstruct=function(){var e=this,r={setViewportHeight:function(i){return e.eViewport.style.height=i},setRowCtrls:function(i){return e.setRowCtrls(i)},setDomOrder:function(i){e.domOrder=i},setContainerWidth:function(i){return e.eContainer.style.width=i}},o=this.createManagedBean(new Hl(this.name));o.setComp(r,this.eContainer,this.eViewport,this.eWrapper)},t.prototype.preDestroy=function(){this.setRowCtrls([])},t.prototype.setRowCtrls=function(e){var r=this,o=is({},this.rowComps);this.rowComps={},this.lastPlacedElement=null;var i=function(s){var a=s.getInstanceId(),l=o[a];if(l)r.rowComps[a]=l,delete o[a],r.ensureDomOrder(l.getGui());else{if(!s.getRowNode().displayed)return;var u=new hv(s,r.beans,r.type);r.rowComps[a]=u,r.appendRow(u.getGui())}};e.forEach(i),tt(o).forEach(function(s){r.eContainer.removeChild(s.getGui()),s.destroy()}),le(this.eContainer,e.length?"rowgroup":"presentation")},t.prototype.appendRow=function(e){this.domOrder?Va(this.eContainer,e,this.lastPlacedElement):this.eContainer.appendChild(e),this.lastPlacedElement=e},t.prototype.ensureDomOrder=function(e){this.domOrder&&(wn(this.eContainer,e,this.lastPlacedElement),this.lastPlacedElement=e)},Tr([h("beans")],t.prototype,"beans",void 0),Tr([D("eViewport")],t.prototype,"eViewport",void 0),Tr([D("eContainer")],t.prototype,"eContainer",void 0),Tr([D("eWrapper")],t.prototype,"eWrapper",void 0),Tr([P],t.prototype,"postConstruct",null),Tr([ae],t.prototype,"preDestroy",null),t}(W),Bl=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},yv=function(){function n(t){this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=t}return n.prototype.onDragEnter=function(t){var e=this;if(this.clearColumnsList(),!this.gridOptionsService.is("functionsReadOnly")){var r=t.dragItem.columns;r&&r.forEach(function(o){o.isPrimary()&&(o.isAnyFunctionActive()||(o.isAllowValue()?e.columnsToAggregate.push(o):o.isAllowRowGroup()?e.columnsToGroup.push(o):o.isAllowPivot()&&e.columnsToPivot.push(o)))})}},n.prototype.getIconName=function(){var t=this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length;return t>0?this.pinned?de.ICON_PINNED:de.ICON_MOVE:null},n.prototype.onDragLeave=function(t){this.clearColumnsList()},n.prototype.clearColumnsList=function(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0},n.prototype.onDragging=function(t){},n.prototype.onDragStop=function(t){this.columnsToAggregate.length>0&&this.columnModel.addValueColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&this.columnModel.addRowGroupColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&this.columnModel.addPivotColumns(this.columnsToPivot,"toolPanelDragAndDrop")},Bl([h("columnModel")],n.prototype,"columnModel",void 0),Bl([h("gridOptionsService")],n.prototype,"gridOptionsService",void 0),n}(),Xr=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Cv=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},mv=function(){function n(t,e){this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.pinned=t,this.eContainer=e,this.centerContainer=!O(t)}return n.prototype.init=function(){var t=this;this.ctrlsService.whenReady(function(){t.gridBodyCon=t.ctrlsService.getGridBodyCtrl()})},n.prototype.getIconName=function(){return this.pinned?de.ICON_PINNED:de.ICON_MOVE},n.prototype.onDragEnter=function(t){var e=t.dragItem.columns,r=t.dragSource.type===Ce.ToolPanel;if(r)this.setColumnsVisible(e,!0,"uiColumnDragged");else{var o=t.dragItem.visibleState,i=(e||[]).filter(function(s){return o[s.getId()]});this.setColumnsVisible(i,!0,"uiColumnDragged")}this.setColumnsPinned(e,this.pinned,"uiColumnDragged"),this.onDragging(t,!0,!0)},n.prototype.onDragLeave=function(){this.ensureIntervalCleared(),this.lastMovedInfo=null},n.prototype.setColumnsVisible=function(t,e,r){if(r===void 0&&(r="api"),t){var o=t.filter(function(i){return!i.getColDef().lockVisible});this.columnModel.setColumnsVisible(o,e,r)}},n.prototype.setColumnsPinned=function(t,e,r){if(r===void 0&&(r="api"),t){var o=t.filter(function(i){return!i.getColDef().lockPinned});this.columnModel.setColumnsPinned(o,e,r)}},n.prototype.onDragStop=function(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null},n.prototype.normaliseX=function(t){if(this.gridOptionsService.is("enableRtl")){var e=this.eContainer.clientWidth;t=e-t}return this.centerContainer&&(t+=this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft()),t},n.prototype.checkCenterForScrolling=function(t){if(this.centerContainer){var e=this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft(),r=e+this.ctrlsService.getCenterRowContainerCtrl().getCenterWidth();this.gridOptionsService.is("enableRtl")?(this.needToMoveRight=tr-50):(this.needToMoveLeft=tr-50),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}},n.prototype.onDragging=function(t,e,r,o){var i=this,s;if(t===void 0&&(t=this.lastDraggingEvent),e===void 0&&(e=!1),r===void 0&&(r=!1),o===void 0&&(o=!1),o){if(this.lastMovedInfo){var a=this.lastMovedInfo,l=a.columns,u=a.toIndex;this.moveColumns(l,u,"uiColumnMoved",!0)}return}if(this.lastDraggingEvent=t,!N(t.hDirection)){var c=this.normaliseX(t.x);e||this.checkCenterForScrolling(c);var p=this.normaliseDirection(t.hDirection),d=t.dragSource.type,f=((s=t.dragSource.getDragItem().columns)===null||s===void 0?void 0:s.filter(function(g){return g.getColDef().lockPinned?g.getPinned()==i.pinned:!0}))||[];this.attemptMoveColumns({dragSourceType:d,allMovingColumns:f,hDirection:p,mouseX:c,fromEnter:e,fakeEvent:r})}},n.prototype.normaliseDirection=function(t){if(this.gridOptionsService.is("enableRtl"))switch(t){case st.Left:return st.Right;case st.Right:return st.Left;default:console.error("AG Grid: Unknown direction "+t)}else return t},n.prototype.attemptMoveColumns=function(t){var e=t.dragSourceType,r=t.hDirection,o=t.mouseX,i=t.fromEnter,s=t.fakeEvent,a=r===st.Left,l=r===st.Right,u=t.allMovingColumns;if(e===Ce.HeaderCell){var c=[];u.forEach(function(F){for(var I=null,V=F.getParent();V!=null&&V.getDisplayedLeafColumns().length===1;)I=V,V=V.getParent();if(I!=null){var k=I.getProvidedColumnGroup();k.getLeafColumns().forEach(function(K){c.includes(K)||c.push(K)})}else c.includes(F)||c.push(F)}),u=c}var p=u.slice();this.columnModel.sortColumnsLikeGridColumns(p);var d=this.calculateValidMoves(p,l,o),f=this.calculateOldIndex(p);if(d.length!==0){var g=d[0],y=f!==null&&!i;if(e==Ce.HeaderCell&&(y=f!==null),!(y&&!s&&(a&&g>=f||l&&g<=f))){for(var m=this.columnModel.getAllDisplayedColumns(),C=[],w=null,S=0;Su.length?[l,u]:[u,l],2),l=a[0],u=a[1],l.forEach(function(c){u.indexOf(c)===-1&&r++})},i=0;i0){for(var f=0;f0){var m=l[c-1];y=u.indexOf(m)+1}else y=u.indexOf(l[0]),y===-1&&(y=0);var C=[y],w=function(M,F){return M-F};if(e){for(var S=y+1,E=s.length-1;S<=E;)C.push(S),S++;C.sort(w)}else{for(var S=y,E=s.length-1,A=s[S];S<=E&&this.isColumnHidden(i,A);)S++,C.push(S),A=s[S];S=y-1;for(var b=0;S>=b;)C.push(S),S--;C.sort(w).reverse()}return C},n.prototype.isColumnHidden=function(t,e){return t.indexOf(e)<0},n.prototype.ensureIntervalStarted=function(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.needToMoveLeft?this.dragAndDropService.setGhostIcon(de.ICON_LEFT,!0):this.dragAndDropService.setGhostIcon(de.ICON_RIGHT,!0))},n.prototype.ensureIntervalCleared=function(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.dragAndDropService.setGhostIcon(de.ICON_MOVE))},n.prototype.moveInterval=function(){var t;this.intervalCount++,t=10+this.intervalCount*5,t>100&&(t=100);var e=null,r=this.gridBodyCon.getScrollFeature();if(this.needToMoveLeft?e=r.scrollHorizontally(-t):this.needToMoveRight&&(e=r.scrollHorizontally(t)),e!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;var o=this.lastDraggingEvent.dragItem.columns,i=o.filter(function(a){return!a.getColDef().lockPinned});if(i.length>0&&(this.dragAndDropService.setGhostIcon(de.ICON_PINNED),this.failedMoveAttempts>7)){var s=this.needToMoveLeft?"left":"right";this.setColumnsPinned(i,s,"uiColumnDragged"),this.dragAndDropService.nudge()}}},Xr([h("columnModel")],n.prototype,"columnModel",void 0),Xr([h("dragAndDropService")],n.prototype,"dragAndDropService",void 0),Xr([h("gridOptionsService")],n.prototype,"gridOptionsService",void 0),Xr([h("ctrlsService")],n.prototype,"ctrlsService",void 0),Xr([P],n.prototype,"init",null),n}(),wv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Jr=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Sv=function(n){wv(t,n);function t(e,r){var o=n.call(this)||this;return o.pinned=e,o.eContainer=r,o}return t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady(function(r){switch(e.pinned){case"left":e.eSecondaryContainers=[[r.gridBodyCtrl.getBodyViewportElement(),r.leftRowContainerCtrl.getContainerElement()],[r.bottomLeftRowContainerCtrl.getContainerElement()],[r.topLeftRowContainerCtrl.getContainerElement()]];break;case"right":e.eSecondaryContainers=[[r.gridBodyCtrl.getBodyViewportElement(),r.rightRowContainerCtrl.getContainerElement()],[r.bottomRightRowContainerCtrl.getContainerElement()],[r.topRightRowContainerCtrl.getContainerElement()]];break;default:e.eSecondaryContainers=[[r.gridBodyCtrl.getBodyViewportElement(),r.centerRowContainerCtrl.getViewportElement()],[r.bottomCenterRowContainerCtrl.getViewportElement()],[r.topCenterRowContainerCtrl.getViewportElement()]];break}})},t.prototype.isInterestedIn=function(e){return e===Ce.HeaderCell||e===Ce.ToolPanel&&this.gridOptionsService.is("allowDragFromColumnsToolPanel")},t.prototype.getSecondaryContainers=function(){return this.eSecondaryContainers},t.prototype.getContainer=function(){return this.eContainer},t.prototype.init=function(){this.moveColumnFeature=this.createManagedBean(new mv(this.pinned,this.eContainer)),this.bodyDropPivotTarget=this.createManagedBean(new yv(this.pinned)),this.dragAndDropService.addDropTarget(this)},t.prototype.getIconName=function(){return this.currentDropListener.getIconName()},t.prototype.isDropColumnInPivotMode=function(e){return this.columnModel.isPivotMode()&&e.dragSource.type===Ce.ToolPanel},t.prototype.onDragEnter=function(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)},t.prototype.onDragLeave=function(e){this.currentDropListener.onDragLeave(e)},t.prototype.onDragging=function(e){this.currentDropListener.onDragging(e)},t.prototype.onDragStop=function(e){this.currentDropListener.onDragStop(e)},Jr([h("dragAndDropService")],t.prototype,"dragAndDropService",void 0),Jr([h("columnModel")],t.prototype,"columnModel",void 0),Jr([h("ctrlsService")],t.prototype,"ctrlsService",void 0),Jr([P],t.prototype,"postConstruct",null),Jr([P],t.prototype,"init",null),t}(T),Ev=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},_v=function(n,t){for(var e=0,r=t.length,o=n.length;e=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Ov=function(n){Rv(t,n);function t(e){var r=n.call(this,t.TEMPLATE,e)||this;return r.headerCompVersion=0,r.column=e.getColumnGroupChild(),r.pinned=e.getPinned(),r}return t.prototype.postConstruct=function(){var e=this,r=this.getGui(),o=function(a,l,u){var c=u||r;l!=null&&l!=""?c.setAttribute(a,l):c.removeAttribute(a)},i={setWidth:function(a){return r.style.width=a},addOrRemoveCssClass:function(a,l){return e.addOrRemoveCssClass(a,l)},setColId:function(a){return o("col-id",a)},setTitle:function(a){return o("title",a)},setAriaDescription:function(a){return ma(r,a)},setAriaSort:function(a){return a?Da(r,a):Aa(r)},setUserCompDetails:function(a){return e.setUserCompDetails(a)},getUserCompInstance:function(){return e.headerComp}};this.ctrl.setComp(i,this.getGui(),this.eResize,this.eHeaderCompWrapper);var s=this.ctrl.getSelectAllGui();this.eResize.insertAdjacentElement("afterend",s)},t.prototype.destroyHeaderComp=function(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)},t.prototype.setUserCompDetails=function(e){var r=this;this.headerCompVersion++;var o=this.headerCompVersion;e.newAgStackInstance().then(function(i){return r.afterCompCreated(o,i)})},t.prototype.afterCompCreated=function(e,r){if(e!=this.headerCompVersion||!this.isAlive()){this.destroyBean(r);return}this.destroyHeaderComp(),this.headerComp=r,this.headerCompGui=r.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())},t.TEMPLATE=`
+
`:e='
',e}var gv=function(n){fv(t,n);function t(){var e=n.call(this,vv())||this;return e.rowComps={},e.name=W.elementGettingCreated.getAttribute("name"),e.type=Yf(e.name),e}return t.prototype.postConstruct=function(){var e=this,r={setViewportHeight:function(i){return e.eViewport.style.height=i},setRowCtrls:function(i){return e.setRowCtrls(i)},setDomOrder:function(i){e.domOrder=i},setContainerWidth:function(i){return e.eContainer.style.width=i}},o=this.createManagedBean(new Hl(this.name));o.setComp(r,this.eContainer,this.eViewport,this.eWrapper)},t.prototype.preDestroy=function(){this.setRowCtrls([])},t.prototype.setRowCtrls=function(e){var r=this,o=is({},this.rowComps);this.rowComps={},this.lastPlacedElement=null;var i=function(s){var a=s.getInstanceId(),l=o[a];if(l)r.rowComps[a]=l,delete o[a],r.ensureDomOrder(l.getGui());else{if(!s.getRowNode().displayed)return;var u=new hv(s,r.beans,r.type);r.rowComps[a]=u,r.appendRow(u.getGui())}};e.forEach(i),tt(o).forEach(function(s){r.eContainer.removeChild(s.getGui()),s.destroy()}),le(this.eContainer,e.length?"rowgroup":"presentation")},t.prototype.appendRow=function(e){this.domOrder?Va(this.eContainer,e,this.lastPlacedElement):this.eContainer.appendChild(e),this.lastPlacedElement=e},t.prototype.ensureDomOrder=function(e){this.domOrder&&(wn(this.eContainer,e,this.lastPlacedElement),this.lastPlacedElement=e)},Tr([h("beans")],t.prototype,"beans",void 0),Tr([D("eViewport")],t.prototype,"eViewport",void 0),Tr([D("eContainer")],t.prototype,"eContainer",void 0),Tr([D("eWrapper")],t.prototype,"eWrapper",void 0),Tr([P],t.prototype,"postConstruct",null),Tr([ae],t.prototype,"preDestroy",null),t}(W),Bl=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},yv=function(){function n(t){this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=t}return n.prototype.onDragEnter=function(t){var e=this;if(this.clearColumnsList(),!this.gridOptionsService.is("functionsReadOnly")){var r=t.dragItem.columns;r&&r.forEach(function(o){o.isPrimary()&&(o.isAnyFunctionActive()||(o.isAllowValue()?e.columnsToAggregate.push(o):o.isAllowRowGroup()?e.columnsToGroup.push(o):o.isAllowPivot()&&e.columnsToPivot.push(o)))})}},n.prototype.getIconName=function(){var t=this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length;return t>0?this.pinned?de.ICON_PINNED:de.ICON_MOVE:null},n.prototype.onDragLeave=function(t){this.clearColumnsList()},n.prototype.clearColumnsList=function(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0},n.prototype.onDragging=function(t){},n.prototype.onDragStop=function(t){this.columnsToAggregate.length>0&&this.columnModel.addValueColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&this.columnModel.addRowGroupColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&this.columnModel.addPivotColumns(this.columnsToPivot,"toolPanelDragAndDrop")},Bl([h("columnModel")],n.prototype,"columnModel",void 0),Bl([h("gridOptionsService")],n.prototype,"gridOptionsService",void 0),n}(),Xr=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Cv=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},mv=function(){function n(t,e){this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.pinned=t,this.eContainer=e,this.centerContainer=!O(t)}return n.prototype.init=function(){var t=this;this.ctrlsService.whenReady(function(){t.gridBodyCon=t.ctrlsService.getGridBodyCtrl()})},n.prototype.getIconName=function(){return this.pinned?de.ICON_PINNED:de.ICON_MOVE},n.prototype.onDragEnter=function(t){var e=t.dragItem.columns,r=t.dragSource.type===Ce.ToolPanel;if(r)this.setColumnsVisible(e,!0,"uiColumnDragged");else{var o=t.dragItem.visibleState,i=(e||[]).filter(function(s){return o[s.getId()]});this.setColumnsVisible(i,!0,"uiColumnDragged")}this.setColumnsPinned(e,this.pinned,"uiColumnDragged"),this.onDragging(t,!0,!0)},n.prototype.onDragLeave=function(){this.ensureIntervalCleared(),this.lastMovedInfo=null},n.prototype.setColumnsVisible=function(t,e,r){if(r===void 0&&(r="api"),t){var o=t.filter(function(i){return!i.getColDef().lockVisible});this.columnModel.setColumnsVisible(o,e,r)}},n.prototype.setColumnsPinned=function(t,e,r){if(r===void 0&&(r="api"),t){var o=t.filter(function(i){return!i.getColDef().lockPinned});this.columnModel.setColumnsPinned(o,e,r)}},n.prototype.onDragStop=function(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null},n.prototype.normaliseX=function(t){if(this.gridOptionsService.is("enableRtl")){var e=this.eContainer.clientWidth;t=e-t}return this.centerContainer&&(t+=this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft()),t},n.prototype.checkCenterForScrolling=function(t){if(this.centerContainer){var e=this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft(),r=e+this.ctrlsService.getCenterRowContainerCtrl().getCenterWidth();this.gridOptionsService.is("enableRtl")?(this.needToMoveRight=tr-50):(this.needToMoveLeft=tr-50),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}},n.prototype.onDragging=function(t,e,r,o){var i=this,s;if(t===void 0&&(t=this.lastDraggingEvent),e===void 0&&(e=!1),r===void 0&&(r=!1),o===void 0&&(o=!1),o){if(this.lastMovedInfo){var a=this.lastMovedInfo,l=a.columns,u=a.toIndex;this.moveColumns(l,u,"uiColumnMoved",!0)}return}if(this.lastDraggingEvent=t,!N(t.hDirection)){var c=this.normaliseX(t.x);e||this.checkCenterForScrolling(c);var p=this.normaliseDirection(t.hDirection),d=t.dragSource.type,f=((s=t.dragSource.getDragItem().columns)===null||s===void 0?void 0:s.filter(function(g){return g.getColDef().lockPinned?g.getPinned()==i.pinned:!0}))||[];this.attemptMoveColumns({dragSourceType:d,allMovingColumns:f,hDirection:p,mouseX:c,fromEnter:e,fakeEvent:r})}},n.prototype.normaliseDirection=function(t){if(this.gridOptionsService.is("enableRtl"))switch(t){case st.Left:return st.Right;case st.Right:return st.Left;default:console.error("AG Grid: Unknown direction "+t)}else return t},n.prototype.attemptMoveColumns=function(t){var e=t.dragSourceType,r=t.hDirection,o=t.mouseX,i=t.fromEnter,s=t.fakeEvent,a=r===st.Left,l=r===st.Right,u=t.allMovingColumns;if(e===Ce.HeaderCell){var c=[];u.forEach(function(F){for(var M=null,V=F.getParent();V!=null&&V.getDisplayedLeafColumns().length===1;)M=V,V=V.getParent();if(M!=null){var k=M.getProvidedColumnGroup();k.getLeafColumns().forEach(function(K){c.includes(K)||c.push(K)})}else c.includes(F)||c.push(F)}),u=c}var p=u.slice();this.columnModel.sortColumnsLikeGridColumns(p);var d=this.calculateValidMoves(p,l,o),f=this.calculateOldIndex(p);if(d.length!==0){var g=d[0],y=f!==null&&!i;if(e==Ce.HeaderCell&&(y=f!==null),!(y&&!s&&(a&&g>=f||l&&g<=f))){for(var m=this.columnModel.getAllDisplayedColumns(),C=[],w=null,S=0;Su.length?[l,u]:[u,l],2),l=a[0],u=a[1],l.forEach(function(c){u.indexOf(c)===-1&&r++})},i=0;i0){for(var f=0;f0){var m=l[c-1];y=u.indexOf(m)+1}else y=u.indexOf(l[0]),y===-1&&(y=0);var C=[y],w=function(I,F){return I-F};if(e){for(var S=y+1,E=s.length-1;S<=E;)C.push(S),S++;C.sort(w)}else{for(var S=y,E=s.length-1,A=s[S];S<=E&&this.isColumnHidden(i,A);)S++,C.push(S),A=s[S];S=y-1;for(var b=0;S>=b;)C.push(S),S--;C.sort(w).reverse()}return C},n.prototype.isColumnHidden=function(t,e){return t.indexOf(e)<0},n.prototype.ensureIntervalStarted=function(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.needToMoveLeft?this.dragAndDropService.setGhostIcon(de.ICON_LEFT,!0):this.dragAndDropService.setGhostIcon(de.ICON_RIGHT,!0))},n.prototype.ensureIntervalCleared=function(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.dragAndDropService.setGhostIcon(de.ICON_MOVE))},n.prototype.moveInterval=function(){var t;this.intervalCount++,t=10+this.intervalCount*5,t>100&&(t=100);var e=null,r=this.gridBodyCon.getScrollFeature();if(this.needToMoveLeft?e=r.scrollHorizontally(-t):this.needToMoveRight&&(e=r.scrollHorizontally(t)),e!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;var o=this.lastDraggingEvent.dragItem.columns,i=o.filter(function(a){return!a.getColDef().lockPinned});if(i.length>0&&(this.dragAndDropService.setGhostIcon(de.ICON_PINNED),this.failedMoveAttempts>7)){var s=this.needToMoveLeft?"left":"right";this.setColumnsPinned(i,s,"uiColumnDragged"),this.dragAndDropService.nudge()}}},Xr([h("columnModel")],n.prototype,"columnModel",void 0),Xr([h("dragAndDropService")],n.prototype,"dragAndDropService",void 0),Xr([h("gridOptionsService")],n.prototype,"gridOptionsService",void 0),Xr([h("ctrlsService")],n.prototype,"ctrlsService",void 0),Xr([P],n.prototype,"init",null),n}(),wv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Jr=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Sv=function(n){wv(t,n);function t(e,r){var o=n.call(this)||this;return o.pinned=e,o.eContainer=r,o}return t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady(function(r){switch(e.pinned){case"left":e.eSecondaryContainers=[[r.gridBodyCtrl.getBodyViewportElement(),r.leftRowContainerCtrl.getContainerElement()],[r.bottomLeftRowContainerCtrl.getContainerElement()],[r.topLeftRowContainerCtrl.getContainerElement()]];break;case"right":e.eSecondaryContainers=[[r.gridBodyCtrl.getBodyViewportElement(),r.rightRowContainerCtrl.getContainerElement()],[r.bottomRightRowContainerCtrl.getContainerElement()],[r.topRightRowContainerCtrl.getContainerElement()]];break;default:e.eSecondaryContainers=[[r.gridBodyCtrl.getBodyViewportElement(),r.centerRowContainerCtrl.getViewportElement()],[r.bottomCenterRowContainerCtrl.getViewportElement()],[r.topCenterRowContainerCtrl.getViewportElement()]];break}})},t.prototype.isInterestedIn=function(e){return e===Ce.HeaderCell||e===Ce.ToolPanel&&this.gridOptionsService.is("allowDragFromColumnsToolPanel")},t.prototype.getSecondaryContainers=function(){return this.eSecondaryContainers},t.prototype.getContainer=function(){return this.eContainer},t.prototype.init=function(){this.moveColumnFeature=this.createManagedBean(new mv(this.pinned,this.eContainer)),this.bodyDropPivotTarget=this.createManagedBean(new yv(this.pinned)),this.dragAndDropService.addDropTarget(this)},t.prototype.getIconName=function(){return this.currentDropListener.getIconName()},t.prototype.isDropColumnInPivotMode=function(e){return this.columnModel.isPivotMode()&&e.dragSource.type===Ce.ToolPanel},t.prototype.onDragEnter=function(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)},t.prototype.onDragLeave=function(e){this.currentDropListener.onDragLeave(e)},t.prototype.onDragging=function(e){this.currentDropListener.onDragging(e)},t.prototype.onDragStop=function(e){this.currentDropListener.onDragStop(e)},Jr([h("dragAndDropService")],t.prototype,"dragAndDropService",void 0),Jr([h("columnModel")],t.prototype,"columnModel",void 0),Jr([h("ctrlsService")],t.prototype,"ctrlsService",void 0),Jr([P],t.prototype,"postConstruct",null),Jr([P],t.prototype,"init",null),t}(T),Ev=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},_v=function(n,t){for(var e=0,r=t.length,o=n.length;e=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Ov=function(n){Rv(t,n);function t(e){var r=n.call(this,t.TEMPLATE,e)||this;return r.headerCompVersion=0,r.column=e.getColumnGroupChild(),r.pinned=e.getPinned(),r}return t.prototype.postConstruct=function(){var e=this,r=this.getGui(),o=function(a,l,u){var c=u||r;l!=null&&l!=""?c.setAttribute(a,l):c.removeAttribute(a)},i={setWidth:function(a){return r.style.width=a},addOrRemoveCssClass:function(a,l){return e.addOrRemoveCssClass(a,l)},setColId:function(a){return o("col-id",a)},setTitle:function(a){return o("title",a)},setAriaDescription:function(a){return ma(r,a)},setAriaSort:function(a){return a?Da(r,a):Aa(r)},setUserCompDetails:function(a){return e.setUserCompDetails(a)},getUserCompInstance:function(){return e.headerComp}};this.ctrl.setComp(i,this.getGui(),this.eResize,this.eHeaderCompWrapper);var s=this.ctrl.getSelectAllGui();this.eResize.insertAdjacentElement("afterend",s)},t.prototype.destroyHeaderComp=function(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)},t.prototype.setUserCompDetails=function(e){var r=this;this.headerCompVersion++;var o=this.headerCompVersion;e.newAgStackInstance().then(function(i){return r.afterCompCreated(o,i)})},t.prototype.afterCompCreated=function(e,r){if(e!=this.headerCompVersion||!this.isAlive()){this.destroyBean(r);return}this.destroyHeaderComp(),this.headerComp=r,this.headerCompGui=r.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())},t.TEMPLATE=`
`,si([D("eResize")],t.prototype,"eResize",void 0),si([D("eHeaderCompWrapper")],t.prototype,"eHeaderCompWrapper",void 0),si([P],t.prototype,"postConstruct",null),si([ae],t.prototype,"destroyHeaderComp",null),t}(Yn),Tv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ns=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Pv=function(n){Tv(t,n);function t(e){return n.call(this,t.TEMPLATE,e)||this}return t.prototype.postConstruct=function(){var e=this,r=this.getGui(),o=function(s,a){return a!=null?r.setAttribute(s,a):r.removeAttribute(s)},i={addOrRemoveCssClass:function(s,a){return e.addOrRemoveCssClass(s,a)},setResizableDisplayed:function(s){return U(e.eResize,s)},setWidth:function(s){return r.style.width=s},setColId:function(s){return r.setAttribute("col-id",s)},setAriaExpanded:function(s){return o("aria-expanded",s)},setTitle:function(s){return o("title",s)},setUserCompDetails:function(s){return e.setUserCompDetails(s)}};this.ctrl.setComp(i,r,this.eResize)},t.prototype.setUserCompDetails=function(e){var r=this;e.newAgStackInstance().then(function(o){return r.afterHeaderCompCreated(o)})},t.prototype.afterHeaderCompCreated=function(e){var r=this,o=function(){return r.destroyBean(e)};if(!this.isAlive()){o();return}var i=this.getGui(),s=e.getGui();i.appendChild(s),this.addDestroyFunc(o),this.ctrl.setDragSource(i)},t.TEMPLATE=`
-
`,ns([h("userComponentFactory")],t.prototype,"userComponentFactory",void 0),ns([D("eResize")],t.prototype,"eResize",void 0),ns([P],t.prototype,"postConstruct",null),t}(Yn),Dv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),jl=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},he;(function(n){n.COLUMN_GROUP="group",n.COLUMN="column",n.FLOATING_FILTER="filter"})(he||(he={}));var Av=function(n){Dv(t,n);function t(e){var r=n.call(this)||this;r.headerComps={};var o=e.getType()==he.COLUMN_GROUP?"ag-header-row-column-group":e.getType()==he.FLOATING_FILTER?"ag-header-row-column-filter":"ag-header-row-column";return r.setTemplate('
'),r.ctrl=e,r}return t.prototype.init=function(){var e=this,r={setTransform:function(o){return e.getGui().style.transform=o},setHeight:function(o){return e.getGui().style.height=o},setTop:function(o){return e.getGui().style.top=o},setHeaderCtrls:function(o){return e.setHeaderCtrls(o)},setWidth:function(o){return e.getGui().style.width=o},setAriaRowIndex:function(o){return Ji(e.getGui(),o)}};this.ctrl.setComp(r)},t.prototype.destroyHeaderCtrls=function(){this.setHeaderCtrls([])},t.prototype.setHeaderCtrls=function(e){var r=this;if(this.isAlive()){var o=this.headerComps;this.headerComps={},e.forEach(function(u){var c=u.getInstanceId(),p=o[c];delete o[c],p==null&&(p=r.createHeaderComp(u),r.getGui().appendChild(p.getGui())),r.headerComps[c]=p}),J(o,function(u,c){r.getGui().removeChild(c.getGui()),r.destroyBean(c)});var i=this.gridOptionsService.is("ensureDomOrder"),s=this.gridOptionsService.isDomLayout("print");if(i||s){var a=tt(this.headerComps);a.sort(function(u,c){var p=u.getCtrl().getColumnGroupChild().getLeft(),d=c.getCtrl().getColumnGroupChild().getLeft();return p-d});var l=a.map(function(u){return u.getGui()});Sn(this.getGui(),l)}}},t.prototype.createHeaderComp=function(e){var r;switch(this.ctrl.getType()){case he.COLUMN_GROUP:r=new Pv(e);break;case he.FLOATING_FILTER:r=new Hh(e);break;default:r=new Ov(e);break}return this.createBean(r),r.setParentComponent(this),r},jl([P],t.prototype,"init",null),jl([ae],t.prototype,"destroyHeaderCtrls",null),t}(W),bv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ss=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Fv=0,ai=function(n){bv(t,n);function t(e,r){var o=n.call(this)||this;return o.lastFocusEvent=null,o.columnGroupChild=e,o.parentRowCtrl=r,o.instanceId=e.getUniqueId()+"-"+Fv++,o}return t.prototype.shouldStopEventPropagation=function(e){var r=this.focusService.getFocusedHeader(),o=r.headerRowIndex,i=r.column;return za(this.gridOptionsService,e,o,i)},t.prototype.getWrapperHasFocus=function(){var e=this.gridOptionsService.getDocument(),r=e.activeElement;return r===this.eGui},t.prototype.setGui=function(e){this.eGui=e,this.addDomData()},t.prototype.handleKeyDown=function(e){var r=this.getWrapperHasFocus();switch(e.key){case R.PAGE_DOWN:case R.PAGE_UP:case R.PAGE_HOME:case R.PAGE_END:r&&e.preventDefault()}},t.prototype.addDomData=function(){var e=this,r=t.DOM_DATA_KEY_HEADER_CTRL;this.gridOptionsService.setDomData(this.eGui,r,this),this.addDestroyFunc(function(){return e.gridOptionsService.setDomData(e.eGui,r,null)})},t.prototype.getGui=function(){return this.eGui},t.prototype.focus=function(e){return this.eGui?(this.lastFocusEvent=e||null,this.eGui.focus(),!0):!1},t.prototype.getRowIndex=function(){return this.parentRowCtrl.getRowIndex()},t.prototype.getParentRowCtrl=function(){return this.parentRowCtrl},t.prototype.getPinned=function(){return this.parentRowCtrl.getPinned()},t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.getColumnGroupChild=function(){return this.columnGroupChild},t.DOM_DATA_KEY_HEADER_CTRL="headerCtrl",ss([h("focusService")],t.prototype,"focusService",void 0),ss([h("beans")],t.prototype,"beans",void 0),ss([h("userComponentFactory")],t.prototype,"userComponentFactory",void 0),t}(T),xv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Lv=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},as=function(n){xv(t,n);function t(e,r,o,i){var s=n.call(this)||this;return s.columnOrGroup=e,s.eCell=r,s.ariaEl=s.eCell.querySelector("[role=columnheader]")||s.eCell,s.colsSpanning=i,s.beans=o,s}return t.prototype.setColsSpanning=function(e){this.colsSpanning=e,this.onLeftChanged()},t.prototype.getColumnOrGroup=function(){return this.beans.gridOptionsService.is("enableRtl")&&this.colsSpanning?Q(this.colsSpanning):this.columnOrGroup},t.prototype.postConstruct=function(){this.addManagedListener(this.columnOrGroup,X.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.setLeftFirstTime(),this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onLeftChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onLeftChanged.bind(this))},t.prototype.setLeftFirstTime=function(){var e=this.beans.gridOptionsService.is("suppressColumnMoveAnimation"),r=O(this.columnOrGroup.getOldLeft()),o=this.beans.columnAnimationService.isActive()&&r&&!e;o?this.animateInLeft():this.onLeftChanged()},t.prototype.animateInLeft=function(){var e=this,r=this.getColumnOrGroup(),o=r.getLeft(),i=r.getOldLeft(),s=this.modifyLeftForPrintLayout(r,i),a=this.modifyLeftForPrintLayout(r,o);this.setLeft(s),this.actualLeft=a,this.beans.columnAnimationService.executeNextVMTurn(function(){e.actualLeft===a&&e.setLeft(a)})},t.prototype.onLeftChanged=function(){var e=this.getColumnOrGroup(),r=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,r),this.setLeft(this.actualLeft)},t.prototype.modifyLeftForPrintLayout=function(e,r){var o=this.beans.gridOptionsService.isDomLayout("print");if(!o||e.getPinned()==="left")return r;var i=this.beans.columnModel.getDisplayedColumnsLeftWidth();if(e.getPinned()==="right"){var s=this.beans.columnModel.getBodyContainerWidth();return i+s+r}return i+r},t.prototype.setLeft=function(e){O(e)&&(this.eCell.style.left=e+"px");var r;if(this.columnOrGroup instanceof X)r=this.columnOrGroup;else{var o=this.columnOrGroup,i=o.getLeafColumns();if(!i.length)return;i.length>1&&Pa(this.ariaEl,i.length),r=i[0]}var s=this.beans.columnModel.getAriaColumnIndex(r);Zi(this.ariaEl,s)},Lv([P],t.prototype,"postConstruct",null),t}(T),Mv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),kl=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},ls=function(n){Mv(t,n);function t(e,r){var o=n.call(this)||this;return o.columns=e,o.element=r,o}return t.prototype.postConstruct=function(){this.gridOptionsService.is("columnHoverHighlight")&&this.addMouseHoverListeners()},t.prototype.addMouseHoverListeners=function(){this.addManagedListener(this.element,"mouseout",this.onMouseOut.bind(this)),this.addManagedListener(this.element,"mouseover",this.onMouseOver.bind(this))},t.prototype.onMouseOut=function(){this.columnHoverService.clearMouseOver()},t.prototype.onMouseOver=function(){this.columnHoverService.setMouseOver(this.columns)},kl([h("columnHoverService")],t.prototype,"columnHoverService",void 0),kl([P],t.prototype,"postConstruct",null),t}(T),Iv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),us=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Nv=function(n){Iv(t,n);function t(e,r){var o=n.call(this,e,r)||this;return o.iconCreated=!1,o.column=e,o}return t.prototype.setComp=function(e,r,o,i){n.prototype.setGui.call(this,r),this.comp=e,this.eButtonShowMainFilter=o,this.eFloatingFilterBody=i,this.setupActive(),this.setupWidth(),this.setupLeft(),this.setupHover(),this.setupFocus(),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(),this.setupUi(),this.addManagedListener(this.eButtonShowMainFilter,"click",this.showParentFilter.bind(this)),this.setupFilterChangedListener(),this.addManagedListener(this.column,X.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this))},t.prototype.setupActive=function(){var e=this.column.getColDef(),r=!!e.filter,o=!!e.floatingFilter;this.active=r&&o},t.prototype.setupUi=function(){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)){var e=oe("filter",this.gridOptionsService,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}},t.prototype.setupFocus=function(){this.createManagedBean(new xt(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))},t.prototype.setupAria=function(){var e=this.localeService.getLocaleTextFunc();Dt(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))},t.prototype.onTabKeyDown=function(e){var r=this.gridOptionsService.getDocument(),o=r.activeElement,i=o===this.eGui;if(!i){var s=this.focusService.findNextFocusableElement(this.eGui,null,e.shiftKey);if(s){this.beans.headerNavigationService.scrollToColumn(this.column),e.preventDefault(),s.focus();return}var a=this.findNextColumnWithFloatingFilter(e.shiftKey);a&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:this.getParentRowCtrl().getRowIndex(),column:a},event:e})&&e.preventDefault()}},t.prototype.findNextColumnWithFloatingFilter=function(e){var r=this.beans.columnModel,o=this.column;do if(o=e?r.getDisplayedColBefore(o):r.getDisplayedColAfter(o),!o)break;while(!o.getColDef().filter||!o.getColDef().floatingFilter);return o},t.prototype.handleKeyDown=function(e){n.prototype.handleKeyDown.call(this,e);var r=this.getWrapperHasFocus();switch(e.key){case R.UP:case R.DOWN:r||e.preventDefault();case R.LEFT:case R.RIGHT:if(r)return;e.stopPropagation();case R.ENTER:r&&this.focusService.focusInto(this.eGui)&&e.preventDefault();break;case R.ESCAPE:r||this.eGui.focus()}},t.prototype.onFocusIn=function(e){var r=this.eGui.contains(e.relatedTarget);if(!r){var o=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&Xt(e.relatedTarget,"ag-floating-filter");if(o&&i&&e.target===this.eGui){var s=this.lastFocusEvent,a=!!(s&&s.key===R.TAB);if(s&&a){var l=s.shiftKey;this.focusService.focusInto(this.eGui,l)}}var u=this.getRowIndex();this.beans.focusService.setFocusedHeader(u,this.column)}},t.prototype.setupHover=function(){var e=this;this.createManagedBean(new ls([this.column],this.eGui));var r=function(){if(e.gridOptionsService.is("columnHoverHighlight")){var o=e.columnHoverService.isHovered(e.column);e.comp.addOrRemoveCssClass("ag-column-hover",o)}};this.addManagedListener(this.eventService,v.EVENT_COLUMN_HOVER_CHANGED,r),r()},t.prototype.setupLeft=function(){var e=new as(this.column,this.eGui,this.beans);this.createManagedBean(e)},t.prototype.setupFilterButton=function(){var e=this.column.getColDef();this.suppressFilterButton=e.floatingFilterComponentParams?!!e.floatingFilterComponentParams.suppressFilterButton:!1},t.prototype.setupUserComp=function(){var e=this;if(this.active){var r=this.filterManager.getFloatingFilterCompDetails(this.column,function(){return e.showParentFilter()});r&&this.setCompDetails(r)}},t.prototype.setCompDetails=function(e){this.userCompDetails=e,this.comp.setCompDetails(e)},t.prototype.showParentFilter=function(){var e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.menuFactory.showMenuAfterButtonClick(this.column,e,"floatingFilter","filterMenuTab",["filterMenuTab"])},t.prototype.setupSyncWithFilter=function(){var e=this;if(this.active){var r=function(o){var i=e.comp.getFloatingFilterComp();i&&i.then(function(s){if(s){var a=e.filterManager.getCurrentFloatingFilterParentModel(e.column);s.onParentModelChanged(a,o)}})};this.destroySyncListener=this.addManagedListener(this.column,X.EVENT_FILTER_CHANGED,r),this.filterManager.isFilterActive(this.column)&&r(null)}},t.prototype.setupWidth=function(){var e=this,r=function(){var o=e.column.getActualWidth()+"px";e.comp.setWidth(o)};this.addManagedListener(this.column,X.EVENT_WIDTH_CHANGED,r),r()},t.prototype.setupFilterChangedListener=function(){this.active&&(this.destroyFilterChangedListener=this.addManagedListener(this.column,X.EVENT_FILTER_CHANGED,this.updateFilterButton.bind(this)))},t.prototype.updateFilterButton=function(){!this.suppressFilterButton&&this.comp&&this.comp.setButtonWrapperDisplayed(this.filterManager.isFilterAllowed(this.column))},t.prototype.onColDefChanged=function(){var e=this,r,o,i=this.active;this.setupActive();var s=!i&&this.active;i&&!this.active&&((r=this.destroySyncListener)===null||r===void 0||r.call(this),(o=this.destroyFilterChangedListener)===null||o===void 0||o.call(this));var a=this.active?this.filterManager.getFloatingFilterCompDetails(this.column,function(){return e.showParentFilter()}):null,l=this.comp.getFloatingFilterComp();!l||!a?this.updateCompDetails(a,s):l.then(function(u){var c;(!u||((c=e.userCompDetails)===null||c===void 0?void 0:c.componentClass)!==a.componentClass)&&e.updateCompDetails(a,s)})},t.prototype.updateCompDetails=function(e,r){this.setCompDetails(e),this.setupFilterButton(),this.setupUi(),r&&(this.setupSyncWithFilter(),this.setupFilterChangedListener())},us([h("filterManager")],t.prototype,"filterManager",void 0),us([h("columnHoverService")],t.prototype,"columnHoverService",void 0),us([h("menuFactory")],t.prototype,"menuFactory",void 0),t}(ai),Gv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),cs=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Hv=function(n){Gv(t,n);function t(e,r,o,i,s){var a=n.call(this)||this;return a.pinned=e,a.column=r,a.eResize=o,a.comp=i,a.ctrl=s,a}return t.prototype.postConstruct=function(){var e=this,r=this.column.getColDef(),o=[],i,s,a=function(){if(U(e.eResize,i),!!i){var c=e.horizontalResizeService.addResizeBar({eResizeBar:e.eResize,onResizeStart:e.onResizeStart.bind(e),onResizing:e.onResizing.bind(e,!1),onResizeEnd:e.onResizing.bind(e,!0)});if(o.push(c),s){var p=e.gridOptionsService.is("skipHeaderOnAutoSize"),d=function(){e.columnModel.autoSizeColumn(e.column,p,"uiColumnResized")};e.eResize.addEventListener("dblclick",d);var f=new be(e.eResize);f.addEventListener(be.EVENT_DOUBLE_TAP,d),e.addDestroyFunc(function(){e.eResize.removeEventListener("dblclick",d),f.removeEventListener(be.EVENT_DOUBLE_TAP,d),f.destroy()})}}},l=function(){o.forEach(function(c){return c()}),o.length=0},u=function(){var c=e.column.isResizable(),p=!e.gridOptionsService.is("suppressAutoSize")&&!r.suppressAutoSize,d=c!==i||p!==s;d&&(i=c,s=p,l(),a())};u(),this.addDestroyFunc(l),this.ctrl.addRefreshFunction(u)},t.prototype.onResizing=function(e,r){var o=this.normaliseResizeAmount(r),i=[{key:this.column,newWidth:this.resizeStartWidth+o}];this.columnModel.setColumnWidths(i,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.comp.addOrRemoveCssClass("ag-column-resizing",!1)},t.prototype.onResizeStart=function(e){this.resizeStartWidth=this.column.getActualWidth(),this.resizeWithShiftKey=e,this.comp.addOrRemoveCssClass("ag-column-resizing",!0)},t.prototype.normaliseResizeAmount=function(e){var r=e,o=this.pinned!=="left",i=this.pinned==="right";return this.gridOptionsService.is("enableRtl")?o&&(r*=-1):i&&(r*=-1),r},cs([h("horizontalResizeService")],t.prototype,"horizontalResizeService",void 0),cs([h("columnModel")],t.prototype,"columnModel",void 0),cs([P],t.prototype,"postConstruct",null),t}(T),Vv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),li=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Bv=function(n){Vv(t,n);function t(e){var r=n.call(this)||this;r.cbSelectAllVisible=!1,r.processingEventFromCheckbox=!1,r.column=e;var o=e.getColDef();return r.filteredOnly=!!(o!=null&&o.headerCheckboxSelectionFilteredOnly),r.currentPageOnly=!!(o!=null&&o.headerCheckboxSelectionCurrentPageOnly),r}return t.prototype.onSpaceKeyDown=function(e){var r=this.cbSelectAll,o=this.gridOptionsService.getDocument();r.isDisplayed()&&!r.getGui().contains(o.activeElement)&&(e.preventDefault(),r.setValue(!r.getValue()))},t.prototype.getCheckboxGui=function(){return this.cbSelectAll.getGui()},t.prototype.setComp=function(e){this.headerCellCtrl=e,this.cbSelectAll=this.createManagedBean(new mr),this.cbSelectAll.addCssClass("ag-header-select-all"),le(this.cbSelectAll.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedListener(this.eventService,v.EVENT_NEW_COLUMNS_LOADED,this.showOrHideSelectAll.bind(this)),this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_CHANGED,this.showOrHideSelectAll.bind(this)),this.addManagedListener(this.eventService,v.EVENT_SELECTION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_PAGINATION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_MODEL_UPDATED,this.onModelChanged.bind(this)),this.addManagedListener(this.cbSelectAll,mr.EVENT_CHANGED,this.onCbSelectAll.bind(this)),Fo(this.cbSelectAll.getGui(),!0),this.cbSelectAll.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()},t.prototype.showOrHideSelectAll=function(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setDisplayed(this.cbSelectAllVisible,{skipAriaHidden:!0}),this.cbSelectAllVisible&&(this.checkRightRowModelType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel()},t.prototype.onModelChanged=function(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()},t.prototype.onSelectionChanged=function(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()},t.prototype.updateStateOfCheckbox=function(){if(!this.processingEventFromCheckbox){this.processingEventFromCheckbox=!0;var e=this.selectionService.getSelectAllState(this.filteredOnly,this.currentPageOnly);this.cbSelectAll.setValue(e),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}},t.prototype.refreshSelectAllLabel=function(){var e=this.localeService.getLocaleTextFunc(),r=this.cbSelectAll.getValue(),o=r?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),i=e("ariaRowSelectAll","Press Space to toggle all rows selection");this.cbSelectAllVisible?this.headerCellCtrl.setAriaDescriptionProperty("selectAll",i+" ("+o+")"):this.headerCellCtrl.setAriaDescriptionProperty("selectAll",null),this.cbSelectAll.setInputAriaLabel(i+" ("+o+")"),this.headerCellCtrl.refreshAriaDescription()},t.prototype.checkRightRowModelType=function(e){var r=this.rowModel.getType(),o=r==="clientSide"||r==="serverSide";return o?!0:(console.warn("AG Grid: "+e+" is only available if using 'clientSide' or 'serverSide' rowModelType, you are using "+r+"."),!1)},t.prototype.onCbSelectAll=function(){if(!this.processingEventFromCheckbox&&this.cbSelectAllVisible){var e=this.cbSelectAll.getValue(),r="uiSelectAll";this.currentPageOnly?r="uiSelectAllCurrentPage":this.filteredOnly&&(r="uiSelectAllFiltered");var o={source:r,justFiltered:this.filteredOnly,justCurrentPage:this.currentPageOnly};e?this.selectionService.selectAllRowNodes(o):this.selectionService.deselectAllRowNodes(o)}},t.prototype.isCheckboxSelection=function(){var e=this.column.getColDef().headerCheckboxSelection;if(typeof e=="function"){var r=e,o={column:this.column,colDef:this.column.getColDef(),columnApi:this.columnApi,api:this.gridApi,context:this.gridOptionsService.context};e=r(o)}return e?this.checkRightRowModelType("headerCheckboxSelection"):!1},li([h("gridApi")],t.prototype,"gridApi",void 0),li([h("columnApi")],t.prototype,"columnApi",void 0),li([h("rowModel")],t.prototype,"rowModel",void 0),li([h("selectionService")],t.prototype,"selectionService",void 0),t}(T),Wv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ul=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Pr;(function(n){n.TAB_GUARD="ag-tab-guard",n.TAB_GUARD_TOP="ag-tab-guard-top",n.TAB_GUARD_BOTTOM="ag-tab-guard-bottom"})(Pr||(Pr={}));var jv=function(n){Wv(t,n);function t(e){var r=n.call(this)||this;r.skipTabGuardFocus=!1;var o=e.comp,i=e.eTopGuard,s=e.eBottomGuard,a=e.focusInnerElement,l=e.onFocusIn,u=e.onFocusOut,c=e.shouldStopEventPropagation,p=e.onTabKeyDown,d=e.handleKeyDown,f=e.eFocusableElement;return r.comp=o,r.eTopGuard=i,r.eBottomGuard=s,r.providedFocusInnerElement=a,r.eFocusableElement=f,r.providedFocusIn=l,r.providedFocusOut=u,r.providedShouldStopEventPropagation=c,r.providedOnTabKeyDown=p,r.providedHandleKeyDown=d,r}return t.prototype.postConstruct=function(){var e=this;this.createManagedBean(new xt(this.eFocusableElement,{shouldStopEventPropagation:function(){return e.shouldStopEventPropagation()},onTabKeyDown:function(r){return e.onTabKeyDown(r)},handleKeyDown:function(r){return e.handleKeyDown(r)},onFocusIn:function(r){return e.onFocusIn(r)},onFocusOut:function(r){return e.onFocusOut(r)}})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach(function(r){return e.addManagedListener(r,"focus",e.onFocus.bind(e))})},t.prototype.handleKeyDown=function(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)},t.prototype.tabGuardsAreActive=function(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")},t.prototype.shouldStopEventPropagation=function(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1},t.prototype.activateTabGuards=function(){var e=this.gridOptionsService.getNum("tabIndex")||0;this.comp.setTabIndex(e.toString())},t.prototype.deactivateTabGuards=function(){this.comp.setTabIndex()},t.prototype.onFocus=function(e){if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}var r=e.target===this.eBottomGuard;this.providedFocusInnerElement?this.providedFocusInnerElement(r):this.focusInnerElement(r)},t.prototype.onFocusIn=function(e){this.providedFocusIn&&this.providedFocusIn(e)||this.deactivateTabGuards()},t.prototype.onFocusOut=function(e){this.providedFocusOut&&this.providedFocusOut(e)||this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards()},t.prototype.onTabKeyDown=function(e){var r=this;if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(!e.defaultPrevented){var o=this.tabGuardsAreActive();o&&this.deactivateTabGuards();var i=this.getNextFocusableElement(e.shiftKey);o&&setTimeout(function(){return r.activateTabGuards()},0),i&&(i.focus(),e.preventDefault())}},t.prototype.focusInnerElement=function(e){e===void 0&&(e=!1);var r=this.focusService.findFocusableElements(this.eFocusableElement);this.tabGuardsAreActive()&&(r.splice(0,1),r.splice(r.length-1,1)),r.length&&r[e?r.length-1:0].focus({preventScroll:!0})},t.prototype.getNextFocusableElement=function(e){return this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e)},t.prototype.forceFocusOutOfContainer=function(e){e===void 0&&(e=!1);var r=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,r.focus()},Ul([h("focusService")],t.prototype,"focusService",void 0),Ul([P],t.prototype,"postConstruct",null),t}(T),kv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Zr=function(){return Zr=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Uv=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},zv=function(n,t){for(var e=0,r=t.length,o=n.length;e0?i.indexOf(o)===-1&&i.push(o):(e.instancesMonitored.set(r,[o]),r.addEventListener("keydown",e.toggleKeyboardMode),r.addEventListener("mousedown",e.toggleKeyboardMode))},t.removeKeyboardModeEvents=function(r,o){var i=e.instancesMonitored.get(r),s=[];i&&i.length&&(s=zv([],Uv(i)).filter(function(a){return a!==o}),e.instancesMonitored.set(r,s)),s.length===0&&(r.removeEventListener("keydown",e.toggleKeyboardMode),r.removeEventListener("mousedown",e.toggleKeyboardMode))},t.toggleKeyboardMode=function(r){var o=e.keyboardModeActive,i=r.type==="keydown";if(!(i&&(r.ctrlKey||r.metaKey||r.altKey))&&!(o&&i||!o&&!i)){e.keyboardModeActive=i;var s=r.target.ownerDocument;if(s){var a=e.instancesMonitored.get(s);a&&a.forEach(function(l){l.dispatchEvent({type:i?v.EVENT_KEYBOARD_FOCUS:v.EVENT_MOUSE_FOCUS})})}}},t.prototype.init=function(){var r=this,o=this.clearFocusedCell.bind(this);this.addManagedListener(this.eventService,v.EVENT_COLUMN_PIVOT_MODE_CHANGED,o),this.addManagedListener(this.eventService,v.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverythingChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_COLUMN_GROUP_OPENED,o),this.addManagedListener(this.eventService,v.EVENT_COLUMN_ROW_GROUP_CHANGED,o),this.ctrlsService.whenReady(function(i){r.gridCtrl=i.gridCtrl;var s=r.gridOptionsService.getDocument();e.addKeyboardModeEvents(s,r.gridCtrl),r.addDestroyFunc(function(){return r.unregisterGridCompController(r.gridCtrl)})})},t.prototype.unregisterGridCompController=function(r){var o=this.gridOptionsService.getDocument();e.removeKeyboardModeEvents(o,r)},t.prototype.onColumnEverythingChanged=function(){if(this.focusedCellPosition){var r=this.focusedCellPosition.column,o=this.columnModel.getGridColumn(r.getId());r!==o&&this.clearFocusedCell()}},t.prototype.isKeyboardMode=function(){return e.keyboardModeActive},t.prototype.getFocusCellToUseAfterRefresh=function(){var r=this.gridOptionsService.getDocument();return this.gridOptionsService.is("suppressFocusAfterRefresh")||!this.focusedCellPosition||this.isDomDataMissingInHierarchy(r.activeElement,nr.DOM_DATA_KEY_ROW_CTRL)?null:this.focusedCellPosition},t.prototype.getFocusHeaderToUseAfterRefresh=function(){var r=this.gridOptionsService.getDocument();return this.gridOptionsService.is("suppressFocusAfterRefresh")||!this.focusedHeaderPosition||this.isDomDataMissingInHierarchy(r.activeElement,ai.DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeaderPosition},t.prototype.isDomDataMissingInHierarchy=function(r,o){for(var i=r;i;){var s=this.gridOptionsService.getDomData(i,o);if(s)return!1;i=i.parentNode}return!0},t.prototype.getFocusedCell=function(){return this.focusedCellPosition},t.prototype.shouldRestoreFocus=function(r){var o=this;return this.isCellRestoreFocused(r)?(setTimeout(function(){o.restoredFocusedCellPosition=null},0),!0):!1},t.prototype.isCellRestoreFocused=function(r){return this.restoredFocusedCellPosition==null?!1:this.cellPositionUtils.equals(r,this.restoredFocusedCellPosition)},t.prototype.setRestoreFocusedCell=function(r){this.getFrameworkOverrides().renderingEngine==="react"&&(this.restoredFocusedCellPosition=r)},t.prototype.getFocusEventParams=function(){var r=this.focusedCellPosition,o=r.rowIndex,i=r.rowPinned,s=r.column,a={rowIndex:o,rowPinned:i,column:s,isFullWidthCell:!1},l=this.rowRenderer.getRowByPosition({rowIndex:o,rowPinned:i});return l&&(a.isFullWidthCell=l.isFullWidth()),a},t.prototype.clearFocusedCell=function(){if(this.restoredFocusedCellPosition=null,this.focusedCellPosition!=null){var r=Zr({type:v.EVENT_CELL_FOCUS_CLEARED},this.getFocusEventParams());this.focusedCellPosition=null,this.eventService.dispatchEvent(r)}},t.prototype.setFocusedCell=function(r){var o=r.column,i=r.rowIndex,s=r.rowPinned,a=r.forceBrowserFocus,l=a===void 0?!1:a,u=r.preventScrollOnBrowserFocus,c=u===void 0?!1:u,p=this.columnModel.getGridColumn(o);if(!p){this.focusedCellPosition=null;return}this.focusedCellPosition=p?{rowIndex:i,rowPinned:St(s),column:p}:null;var d=Zr(Zr({type:v.EVENT_CELL_FOCUSED},this.getFocusEventParams()),{forceBrowserFocus:l,preventScrollOnBrowserFocus:c,floating:null});this.eventService.dispatchEvent(d)},t.prototype.isCellFocused=function(r){return this.focusedCellPosition==null?!1:this.cellPositionUtils.equals(r,this.focusedCellPosition)},t.prototype.isRowNodeFocused=function(r){return this.isRowFocused(r.rowIndex,r.rowPinned)},t.prototype.isHeaderWrapperFocused=function(r){if(this.focusedHeaderPosition==null)return!1;var o=r.getColumnGroupChild(),i=r.getRowIndex(),s=r.getPinned(),a=this.focusedHeaderPosition,l=a.column,u=a.headerRowIndex;return o===l&&i===u&&s==l.getPinned()},t.prototype.clearFocusedHeader=function(){this.focusedHeaderPosition=null},t.prototype.getFocusedHeader=function(){return this.focusedHeaderPosition},t.prototype.setFocusedHeader=function(r,o){this.focusedHeaderPosition={headerRowIndex:r,column:o}},t.prototype.focusHeaderPosition=function(r){var o=r.direction,i=r.fromTab,s=r.allowUserOverride,a=r.event,l=r.headerPosition;if(s){var u=this.getFocusedHeader(),c=this.headerNavigationService.getHeaderRowCount();if(i){var p=this.gridOptionsService.getCallback("tabToNextHeader");if(p){var d={backwards:o==="Before",previousHeaderPosition:u,nextHeaderPosition:l,headerRowCount:c};l=p(d)}}else{var p=this.gridOptionsService.getCallback("navigateToNextHeader");if(p&&a){var f={key:a.key,previousHeaderPosition:u,nextHeaderPosition:l,headerRowCount:c,event:a};l=p(f)}}}if(!l)return!1;if(l.headerRowIndex===-1)return this.focusGridView(l.column);this.headerNavigationService.scrollToColumn(l.column,o);var g=this.ctrlsService.getHeaderRowContainerCtrl(l.column.getPinned()),y=g.focusHeader(l.headerRowIndex,l.column,a);return y},t.prototype.focusFirstHeader=function(){var r=this.columnModel.getAllDisplayedColumns()[0];return r?(r.getParent()&&(r=this.columnModel.getColumnGroupAtLevel(r,0)),this.focusHeaderPosition({headerPosition:{headerRowIndex:0,column:r}})):!1},t.prototype.focusLastHeader=function(r){var o=this.headerNavigationService.getHeaderRowCount()-1,i=Q(this.columnModel.getAllDisplayedColumns());return this.focusHeaderPosition({headerPosition:{headerRowIndex:o,column:i},event:r})},t.prototype.isAnyCellFocused=function(){return!!this.focusedCellPosition},t.prototype.isRowFocused=function(r,o){return this.focusedCellPosition==null?!1:this.focusedCellPosition.rowIndex===r&&this.focusedCellPosition.rowPinned===St(o)},t.prototype.findFocusableElements=function(r,o,i){i===void 0&&(i=!1);var s=Ga,a=fn;o&&(a+=", "+o),i&&(a+=', [tabindex="-1"]');var l=Array.prototype.slice.apply(r.querySelectorAll(s)),u=Array.prototype.slice.apply(r.querySelectorAll(a));if(!u.length)return l;var c=function(p,d){return p.filter(function(f){return d.indexOf(f)===-1})};return c(l,u)},t.prototype.focusInto=function(r,o,i){o===void 0&&(o=!1),i===void 0&&(i=!1);var s=this.findFocusableElements(r,null,i),a=o?Q(s):s[0];return a?(a.focus({preventScroll:!0}),!0):!1},t.prototype.findFocusableElementBeforeTabGuard=function(r,o){if(!o)return null;var i=this.findFocusableElements(r),s=i.indexOf(o);if(s===-1)return null;for(var a=-1,l=s-1;l>=0;l--)if(i[l].classList.contains(Pr.TAB_GUARD_TOP)){a=l;break}return a<=0?null:i[a-1]},t.prototype.findNextFocusableElement=function(r,o,i){r===void 0&&(r=this.eGridDiv);var s=this.findFocusableElements(r,o?':not([tabindex="-1"])':null),a=this.gridOptionsService.getDocument(),l=a.activeElement,u;o?u=s.findIndex(function(p){return p.contains(l)}):u=s.indexOf(l);var c=u+(i?-1:1);return c<0||c>=s.length?null:s[c]},t.prototype.isTargetUnderManagedComponent=function(r,o){if(!o)return!1;var i=r.querySelectorAll("."+xt.FOCUS_MANAGED_CLASS);if(!i.length)return!1;for(var s=0;s=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Kv=function(n){$v(t,n);function t(e,r){var o=n.call(this,e,r)||this;return o.refreshFunctions=[],o.userHeaderClasses=new Set,o.ariaDescriptionProperties=new Map,o.column=e,o}return t.prototype.setComp=function(e,r,o,i){var s=this;n.prototype.setGui.call(this,r),this.comp=e,this.updateState(),this.setupWidth(),this.setupMovingCss(),this.setupMenuClass(),this.setupSortableClass(),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight(i),this.addColumnHoverListener(),this.setupFilterCss(),this.setupColId(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(),this.setupSelectAll(),this.setupUserComp(),this.refreshAria(),this.createManagedBean(new Hv(this.getPinned(),this.column,o,e,this)),this.createManagedBean(new ls([this.column],r)),this.createManagedBean(new as(this.column,r,this.beans)),this.createManagedBean(new xt(r,{shouldStopEventPropagation:function(a){return s.shouldStopEventPropagation(a)},onTabKeyDown:function(){return null},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addMouseDownListenerIfNeeded(r),this.addManagedListener(this.column,X.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_COLUMN_VALUE_CHANGED,this.onColumnValueChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onColumnRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_COLUMN_PIVOT_CHANGED,this.onColumnPivotChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))},t.prototype.addMouseDownListenerIfNeeded=function(e){var r=this;if(He()){var o=["mousedown","touchstart"],i=this.gridOptionsService.getDocument();o.forEach(function(s){r.addManagedListener(e,s,function(a){var l=i.activeElement;l!==e&&!e.contains(l)&&(e.focus(),Nt.toggleKeyboardMode(a))})})}},t.prototype.setupUserComp=function(){var e=this.lookupUserCompDetails();this.setCompDetails(e)},t.prototype.setCompDetails=function(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)},t.prototype.lookupUserCompDetails=function(){var e=this.createParams(),r=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(r,e)},t.prototype.createParams=function(){var e=this,r=this.column.getColDef(),o={column:this.column,displayName:this.displayName,enableSorting:r.sortable,enableMenu:this.menuEnabled,showColumnMenu:function(i){e.gridApi.showColumnMenuAfterButtonClick(e.column,i)},progressSort:function(i){e.sortController.progressSort(e.column,!!i,"uiColumnSorted")},setSort:function(i,s){e.sortController.setSortForColumn(e.column,i,!!s,"uiColumnSorted")},api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsService.context,eGridHeader:this.getGui()};return o},t.prototype.setupSelectAll=function(){this.selectAllFeature=this.createManagedBean(new Bv(this.column)),this.selectAllFeature.setComp(this)},t.prototype.getSelectAllGui=function(){return this.selectAllFeature.getCheckboxGui()},t.prototype.handleKeyDown=function(e){n.prototype.handleKeyDown.call(this,e),e.key===R.SPACE&&this.selectAllFeature.onSpaceKeyDown(e),e.key===R.ENTER&&this.onEnterKeyDown(e)},t.prototype.onEnterKeyDown=function(e){var r=this.comp.getUserCompInstance();if(r){if(e.ctrlKey||e.metaKey)this.menuEnabled&&r.showMenu&&(e.preventDefault(),r.showMenu());else if(this.sortable){var o=e.shiftKey;this.sortController.progressSort(this.column,o,"uiColumnSorted")}}},t.prototype.isMenuEnabled=function(){return this.menuEnabled},t.prototype.onFocusIn=function(e){if(!this.getGui().contains(e.relatedTarget)){var r=this.getRowIndex();this.focusService.setFocusedHeader(r,this.column)}this.setActiveHeader(!0)},t.prototype.onFocusOut=function(e){this.getGui().contains(e.relatedTarget)||this.setActiveHeader(!1)},t.prototype.setupTooltip=function(){var e=this,r={getColumn:function(){return e.column},getColDef:function(){return e.column.getColDef()},getGui:function(){return e.eGui},getLocation:function(){return"header"},getTooltipValue:function(){var i=e.column.getColDef().headerTooltip;return i}},o=this.createManagedBean(new Xn(r,this.beans));o.setComp(this.comp),this.refreshFunctions.push(function(){return o.refreshToolTip()})},t.prototype.setupClassesFromColDef=function(){var e=this,r=function(){var o=e.column.getColDef(),i=Wl.getHeaderClassesFromColDef(o,e.gridOptionsService,e.column,null),s=e.userHeaderClasses;e.userHeaderClasses=new Set(i),i.forEach(function(a){s.has(a)?s.delete(a):e.comp.addOrRemoveCssClass(a,!0)}),s.forEach(function(a){return e.comp.addOrRemoveCssClass(a,!1)})};this.refreshFunctions.push(r),r()},t.prototype.setDragSource=function(e){var r=this;if(this.dragSourceElement=e,this.removeDragSource(),!!e&&this.draggable){var o=!this.gridOptionsService.is("suppressDragLeaveHidesColumns");this.moveDragSource={type:Ce.HeaderCell,eElement:e,defaultIconName:o?de.ICON_HIDE:de.ICON_NOT_ALLOWED,getDragItem:function(){return r.createDragItem()},dragItemName:this.displayName,onDragStarted:function(){return r.column.setMoving(!0,"uiColumnMoved")},onDragStopped:function(){return r.column.setMoving(!1,"uiColumnMoved")},onGridEnter:function(i){var s;if(o){var a=((s=i==null?void 0:i.columns)===null||s===void 0?void 0:s.filter(function(l){return!l.getColDef().lockVisible}))||[];r.columnModel.setColumnsVisible(a,!0,"uiColumnMoved")}},onGridExit:function(i){var s;if(o){var a=((s=i==null?void 0:i.columns)===null||s===void 0?void 0:s.filter(function(l){return!l.getColDef().lockVisible}))||[];r.columnModel.setColumnsVisible(a,!1,"uiColumnMoved")}}},this.dragAndDropService.addDragSource(this.moveDragSource,!0)}},t.prototype.createDragItem=function(){var e={};return e[this.column.getId()]=this.column.isVisible(),{columns:[this.column],visibleState:e}},t.prototype.removeDragSource=function(){this.moveDragSource&&(this.dragAndDropService.removeDragSource(this.moveDragSource),this.moveDragSource=void 0)},t.prototype.onColDefChanged=function(){this.refresh()},t.prototype.updateState=function(){var e=this.column.getColDef();this.menuEnabled=this.menuFactory.isMenuEnabled(this.column)&&!e.suppressMenu,this.sortable=e.sortable,this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()},t.prototype.addRefreshFunction=function(e){this.refreshFunctions.push(e)},t.prototype.refresh=function(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),this.refreshFunctions.forEach(function(e){return e()})},t.prototype.refreshHeaderComp=function(){var e=this.lookupUserCompDetails(),r=this.comp.getUserCompInstance(),o=r!=null&&this.userCompDetails.componentClass==e.componentClass,i=o?this.attemptHeaderCompRefresh(e.params):!1;i?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)},t.prototype.attemptHeaderCompRefresh=function(e){var r=this.comp.getUserCompInstance();if(!r||!r.refresh)return!1;var o=r.refresh(e);return o},t.prototype.calculateDisplayName=function(){return this.columnModel.getDisplayNameForColumn(this.column,"header",!0)},t.prototype.checkDisplayName=function(){this.displayName!==this.calculateDisplayName()&&this.refresh()},t.prototype.workOutDraggable=function(){var e=this.column.getColDef(),r=this.gridOptionsService.is("suppressMovableColumns"),o=!r&&!e.suppressMovable&&!e.lockPosition;return!!o||!!e.enableRowGroup||!!e.enablePivot},t.prototype.onColumnRowGroupChanged=function(){this.checkDisplayName()},t.prototype.onColumnPivotChanged=function(){this.checkDisplayName()},t.prototype.onColumnValueChanged=function(){this.checkDisplayName()},t.prototype.setupWidth=function(){var e=this,r=function(){var o=e.column.getActualWidth();e.comp.setWidth(o+"px")};this.addManagedListener(this.column,X.EVENT_WIDTH_CHANGED,r),r()},t.prototype.setupMovingCss=function(){var e=this,r=function(){e.comp.addOrRemoveCssClass("ag-header-cell-moving",e.column.isMoving())};this.addManagedListener(this.column,X.EVENT_MOVING_CHANGED,r),r()},t.prototype.setupMenuClass=function(){var e=this,r=function(){e.comp.addOrRemoveCssClass("ag-column-menu-visible",e.column.isMenuVisible())};this.addManagedListener(this.column,X.EVENT_MENU_VISIBLE_CHANGED,r),r()},t.prototype.setupSortableClass=function(){var e=this,r=function(){e.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!e.sortable)};r(),this.addRefreshFunction(r),this.addManagedListener(this.eventService,X.EVENT_SORT_CHANGED,this.refreshAriaSort.bind(this))},t.prototype.setupWrapTextClass=function(){var e=this,r=function(){var o=!!e.column.getColDef().wrapHeaderText;e.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",o)};r(),this.addRefreshFunction(r)},t.prototype.onHeaderHeightChanged=function(){this.refreshSpanHeaderHeight()},t.prototype.refreshSpanHeaderHeight=function(){var e=this,r=e.eGui,o=e.column,i=e.comp,s=e.columnModel,a=e.gridOptionsService;if(o.isSpanHeaderHeight()){var l=this.getColumnGroupPaddingInfo(),u=l.numberOfParents,c=l.isSpanningTotal;if(i.addOrRemoveCssClass("ag-header-span-height",u>0),u!==0){i.addOrRemoveCssClass("ag-header-span-total",c);var p=a.is("pivotMode"),d=p?s.getPivotGroupHeaderHeight():s.getGroupHeaderHeight(),f=s.getColumnHeaderRowHeight(),g=u*d;r.style.setProperty("top",-g+"px"),r.style.setProperty("height",f+g+"px")}}},t.prototype.getColumnGroupPaddingInfo=function(){var e=this.column.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};for(var r=e.getPaddingLevel()+1,o=!0;e;){if(!e.isPadding()){o=!1;break}e=e.getParent()}return{numberOfParents:r,isSpanningTotal:o}},t.prototype.setupAutoHeight=function(e){var r=this,o=function(c){if(r.isAlive()){var p=bt(r.getGui()),d=p.paddingTop,f=p.paddingBottom,g=p.borderBottomWidth,y=p.borderTopWidth,m=d+f+g+y,C=e.offsetHeight,w=C+m;if(c<5){var S=r.beans.gridOptionsService.getDocument(),E=!S||!S.contains(e),A=w==0;if(E||A){r.beans.frameworkOverrides.setTimeout(function(){return o(c+1)},0);return}}r.columnModel.setColumnHeaderHeight(r.column,w)}},i=!1,s,a=function(){var c=r.column.isAutoHeaderHeight();c&&!i&&l(),!c&&i&&u()},l=function(){i=!0,o(0),r.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),s=r.resizeObserverService.observeResize(e,function(){return o(0)})},u=function(){i=!1,s&&s(),r.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),s=void 0};a(),this.addDestroyFunc(function(){return u()}),this.addManagedListener(this.column,X.EVENT_WIDTH_CHANGED,function(){return i&&o(0)}),this.addManagedListener(this.eventService,X.EVENT_SORT_CHANGED,function(){i&&r.beans.frameworkOverrides.setTimeout(function(){return o(0)})}),this.addRefreshFunction(a)},t.prototype.refreshAriaSort=function(){if(this.sortable){var e=this.localeService.getLocaleTextFunc(),r=this.sortController.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(ga(r)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort."))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)},t.prototype.refreshAriaMenu=function(){if(this.menuEnabled){var e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press CTRL ENTER to open column menu."))}else this.setAriaDescriptionProperty("menu",null)},t.prototype.setAriaDescriptionProperty=function(e,r){r!=null?this.ariaDescriptionProperties.set(e,r):this.ariaDescriptionProperties.delete(e)},t.prototype.refreshAriaDescription=function(){var e=Array.from(this.ariaDescriptionProperties.values());this.comp.setAriaDescription(e.length?e.join(" "):void 0)},t.prototype.refreshAria=function(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaDescription()},t.prototype.addColumnHoverListener=function(){var e=this,r=function(){if(e.gridOptionsService.is("columnHoverHighlight")){var o=e.columnHoverService.isHovered(e.column);e.comp.addOrRemoveCssClass("ag-column-hover",o)}};this.addManagedListener(this.eventService,v.EVENT_COLUMN_HOVER_CHANGED,r),r()},t.prototype.setupFilterCss=function(){var e=this,r=function(){e.comp.addOrRemoveCssClass("ag-header-cell-filtered",e.column.isFilterActive())};this.addManagedListener(this.column,X.EVENT_FILTER_ACTIVE_CHANGED,r),r()},t.prototype.setupColId=function(){this.comp.setColId(this.column.getColId())},t.prototype.addActiveHeaderMouseListeners=function(){var e=this,r=function(o){return e.setActiveHeader(o.type==="mouseenter")};this.addManagedListener(this.getGui(),"mouseenter",r),this.addManagedListener(this.getGui(),"mouseleave",r)},t.prototype.setActiveHeader=function(e){this.comp.addOrRemoveCssClass("ag-header-active",e)},mt([h("columnModel")],t.prototype,"columnModel",void 0),mt([h("columnHoverService")],t.prototype,"columnHoverService",void 0),mt([h("sortController")],t.prototype,"sortController",void 0),mt([h("menuFactory")],t.prototype,"menuFactory",void 0),mt([h("dragAndDropService")],t.prototype,"dragAndDropService",void 0),mt([h("resizeObserverService")],t.prototype,"resizeObserverService",void 0),mt([h("gridApi")],t.prototype,"gridApi",void 0),mt([h("columnApi")],t.prototype,"columnApi",void 0),mt([ae],t.prototype,"removeDragSource",null),t}(ai),Yv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ui=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},qv=function(n){Yv(t,n);function t(e,r,o,i){var s=n.call(this)||this;return s.eResize=r,s.comp=e,s.pinned=o,s.columnGroup=i,s}return t.prototype.postConstruct=function(){var e=this;if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}var r=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(this.addDestroyFunc(r),!this.gridOptionsService.is("suppressAutoSize")){var o=this.gridOptionsService.is("skipHeaderOnAutoSize");this.eResize.addEventListener("dblclick",function(){var i=[],s=e.columnGroup.getDisplayedLeafColumns();s.forEach(function(a){a.getColDef().suppressAutoSize||i.push(a.getColId())}),i.length>0&&e.columnModel.autoSizeColumns({columns:i,skipHeader:o,stopAtGroup:e.columnGroup,source:"uiColumnResized"}),e.resizeLeafColumnsToFit("uiColumnResized")})}},t.prototype.onResizeStart=function(e){var r=this;this.calculateInitialValues();var o=null;if(e&&(o=this.columnModel.getDisplayedGroupAfter(this.columnGroup)),o){var i=o.getDisplayedLeafColumns();this.resizeTakeFromCols=i.filter(function(s){return s.isResizable()}),this.resizeTakeFromStartWidth=0,this.resizeTakeFromCols.forEach(function(s){return r.resizeTakeFromStartWidth+=s.getActualWidth()}),this.resizeTakeFromRatios=[],this.resizeTakeFromCols.forEach(function(s){return r.resizeTakeFromRatios.push(s.getActualWidth()/r.resizeTakeFromStartWidth)})}else this.resizeTakeFromCols=null,this.resizeTakeFromStartWidth=null,this.resizeTakeFromRatios=null;this.comp.addOrRemoveCssClass("ag-column-resizing",!0)},t.prototype.onResizing=function(e,r,o){o===void 0&&(o="uiColumnResized");var i=this.normaliseDragChange(r),s=this.resizeStartWidth+i;this.resizeColumns(s,o,e)},t.prototype.resizeLeafColumnsToFit=function(e){var r=this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup);this.calculateInitialValues(),r>this.resizeStartWidth&&this.resizeColumns(r,e,!0)},t.prototype.resizeColumns=function(e,r,o){o===void 0&&(o=!0);var i=[];if(i.push({columns:this.resizeCols,ratios:this.resizeRatios,width:e}),this.resizeTakeFromCols){var s=e-this.resizeStartWidth;i.push({columns:this.resizeTakeFromCols,ratios:this.resizeTakeFromRatios,width:this.resizeTakeFromStartWidth-s})}this.columnModel.resizeColumnSets({resizeSets:i,finished:o,source:r}),o&&this.comp.addOrRemoveCssClass("ag-column-resizing",!1)},t.prototype.calculateInitialValues=function(){var e=this,r=this.columnGroup.getDisplayedLeafColumns();this.resizeCols=r.filter(function(o){return o.isResizable()}),this.resizeStartWidth=0,this.resizeCols.forEach(function(o){return e.resizeStartWidth+=o.getActualWidth()}),this.resizeRatios=[],this.resizeCols.forEach(function(o){return e.resizeRatios.push(o.getActualWidth()/e.resizeStartWidth)})},t.prototype.normaliseDragChange=function(e){var r=e;return this.gridOptionsService.is("enableRtl")?this.pinned!=="left"&&(r*=-1):this.pinned==="right"&&(r*=-1),r},ui([h("horizontalResizeService")],t.prototype,"horizontalResizeService",void 0),ui([h("autoWidthCalculator")],t.prototype,"autoWidthCalculator",void 0),ui([h("columnModel")],t.prototype,"columnModel",void 0),ui([P],t.prototype,"postConstruct",null),t}(T),Qv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Xv=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Jv=function(n){Qv(t,n);function t(e,r){var o=n.call(this)||this;return o.removeChildListenersFuncs=[],o.columnGroup=r,o.comp=e,o}return t.prototype.postConstruct=function(){this.addListenersToChildrenColumns(),this.addManagedListener(this.columnGroup,we.EVENT_DISPLAYED_CHILDREN_CHANGED,this.onDisplayedChildrenChanged.bind(this)),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))},t.prototype.addListenersToChildrenColumns=function(){var e=this;this.removeListenersOnChildrenColumns();var r=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach(function(o){o.addEventListener("widthChanged",r),o.addEventListener("visibleChanged",r),e.removeChildListenersFuncs.push(function(){o.removeEventListener("widthChanged",r),o.removeEventListener("visibleChanged",r)})})},t.prototype.removeListenersOnChildrenColumns=function(){this.removeChildListenersFuncs.forEach(function(e){return e()}),this.removeChildListenersFuncs=[]},t.prototype.onDisplayedChildrenChanged=function(){this.addListenersToChildrenColumns(),this.onWidthChanged()},t.prototype.onWidthChanged=function(){var e=this.columnGroup.getActualWidth();this.comp.setWidth(e+"px"),this.comp.addOrRemoveCssClass("ag-hidden",e===0)},Xv([P],t.prototype,"postConstruct",null),t}(T),Zv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ci=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},eg=function(n){Zv(t,n);function t(e,r){var o=n.call(this,e,r)||this;return o.columnGroup=e,o}return t.prototype.setComp=function(e,r,o){n.prototype.setGui.call(this,r),this.comp=e,this.displayName=this.columnModel.getDisplayNameForColumnGroup(this.columnGroup,"header"),this.addClasses(),this.addAttributes(),this.setupMovingCss(),this.setupExpandable(),this.setupTooltip(),this.setupUserComp();var i=this.getParentRowCtrl().getPinned(),s=this.columnGroup.getProvidedColumnGroup().getLeafColumns();this.createManagedBean(new ls(s,r)),this.createManagedBean(new as(this.columnGroup,r,this.beans)),this.createManagedBean(new Jv(e,this.columnGroup)),this.groupResizeFeature=this.createManagedBean(new qv(e,o,i,this.columnGroup)),this.createManagedBean(new xt(r,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:function(){},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))},t.prototype.resizeLeafColumnsToFit=function(e){this.groupResizeFeature&&this.groupResizeFeature.resizeLeafColumnsToFit(e)},t.prototype.setupUserComp=function(){var e=this,r=this.displayName,o={displayName:this.displayName,columnGroup:this.columnGroup,setExpanded:function(u){e.columnModel.setColumnGroupOpened(e.columnGroup.getProvidedColumnGroup(),u,"gridInitializing")},api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsService.context};if(!r){for(var i=this.columnGroup,s=i.getLeafColumns();i.getParent()&&i.getParent().getLeafColumns().length===s.length;)i=i.getParent();var a=i.getColGroupDef();a&&(r=a.headerName),r||(r=s?this.columnModel.getDisplayNameForColumn(s[0],"header",!0):"")}var l=this.userComponentFactory.getHeaderGroupCompDetails(o);this.comp.setUserCompDetails(l)},t.prototype.setupTooltip=function(){var e=this,r=this.columnGroup.getColGroupDef(),o={getColumn:function(){return e.columnGroup},getGui:function(){return e.eGui},getLocation:function(){return"headerGroup"},getTooltipValue:function(){return r&&r.headerTooltip}};r&&(o.getColDef=function(){return r});var i=this.createManagedBean(new Xn(o,this.beans));i.setComp(this.comp)},t.prototype.setupExpandable=function(){var e=this.columnGroup.getProvidedColumnGroup();this.refreshExpanded(),this.addManagedListener(e,re.EVENT_EXPANDABLE_CHANGED,this.refreshExpanded.bind(this)),this.addManagedListener(e,re.EVENT_EXPANDED_CHANGED,this.refreshExpanded.bind(this))},t.prototype.refreshExpanded=function(){var e=this.columnGroup;this.expandable=e.isExpandable();var r=e.isExpanded();this.expandable?this.comp.setAriaExpanded(r?"true":"false"):this.comp.setAriaExpanded(void 0)},t.prototype.addAttributes=function(){this.comp.setColId(this.columnGroup.getUniqueId())},t.prototype.addClasses=function(){var e=this,r=this.columnGroup.getColGroupDef(),o=Wl.getHeaderClassesFromColDef(r,this.gridOptionsService,null,this.columnGroup);if(this.columnGroup.isPadding()){o.push("ag-header-group-cell-no-group");var i=this.columnGroup.getLeafColumns();i.every(function(s){return s.isSpanHeaderHeight()})&&o.push("ag-header-span-height")}else o.push("ag-header-group-cell-with-group");o.forEach(function(s){return e.comp.addOrRemoveCssClass(s,!0)})},t.prototype.setupMovingCss=function(){var e=this,r=this.columnGroup.getProvidedColumnGroup(),o=r.getLeafColumns(),i=function(){return e.comp.addOrRemoveCssClass("ag-header-cell-moving",e.columnGroup.isMoving())};o.forEach(function(s){e.addManagedListener(s,X.EVENT_MOVING_CHANGED,i)}),i()},t.prototype.onFocusIn=function(e){if(!this.eGui.contains(e.relatedTarget)){var r=this.getRowIndex();this.beans.focusService.setFocusedHeader(r,this.columnGroup)}},t.prototype.handleKeyDown=function(e){n.prototype.handleKeyDown.call(this,e);var r=this.getWrapperHasFocus();if(!(!this.expandable||!r)&&e.key===R.ENTER){var o=this.columnGroup,i=!o.isExpanded();this.columnModel.setColumnGroupOpened(o.getProvidedColumnGroup(),i,"uiColumnExpanded")}},t.prototype.setDragSource=function(e){var r=this;if(!this.isSuppressMoving()){var o=this.columnGroup.getProvidedColumnGroup().getLeafColumns(),i=!this.gridOptionsService.is("suppressDragLeaveHidesColumns"),s={type:Ce.HeaderCell,eElement:e,defaultIconName:i?de.ICON_HIDE:de.ICON_NOT_ALLOWED,dragItemName:this.displayName,getDragItem:this.getDragItemForGroup.bind(this),onDragStarted:function(){return o.forEach(function(a){return a.setMoving(!0,"uiColumnDragged")})},onDragStopped:function(){return o.forEach(function(a){return a.setMoving(!1,"uiColumnDragged")})},onGridEnter:function(a){var l;if(i){var u=((l=a==null?void 0:a.columns)===null||l===void 0?void 0:l.filter(function(c){return!c.getColDef().lockVisible}))||[];r.columnModel.setColumnsVisible(u,!0,"uiColumnMoved")}},onGridExit:function(a){var l;if(i){var u=((l=a==null?void 0:a.columns)===null||l===void 0?void 0:l.filter(function(c){return!c.getColDef().lockVisible}))||[];r.columnModel.setColumnsVisible(u,!1,"uiColumnMoved")}}};this.dragAndDropService.addDragSource(s,!0),this.addDestroyFunc(function(){return r.dragAndDropService.removeDragSource(s)})}},t.prototype.getDragItemForGroup=function(){var e=this.columnGroup.getProvidedColumnGroup().getLeafColumns(),r={};e.forEach(function(i){return r[i.getId()]=i.isVisible()});var o=[];return this.columnModel.getAllDisplayedColumns().forEach(function(i){e.indexOf(i)>=0&&(o.push(i),fe(e,i))}),e.forEach(function(i){return o.push(i)}),{columns:o,visibleState:r}},t.prototype.isSuppressMoving=function(){var e=!1;this.columnGroup.getLeafColumns().forEach(function(o){(o.getColDef().suppressMovable||o.getColDef().lockPosition)&&(e=!0)});var r=e||this.gridOptionsService.is("suppressMovableColumns");return r},ci([h("columnModel")],t.prototype,"columnModel",void 0),ci([h("dragAndDropService")],t.prototype,"dragAndDropService",void 0),ci([h("gridApi")],t.prototype,"gridApi",void 0),ci([h("columnApi")],t.prototype,"columnApi",void 0),t}(ai),tg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),zl=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},rg=0,ps=function(n){tg(t,n);function t(e,r,o){var i=n.call(this)||this;return i.instanceId=rg++,i.headerCellCtrls={},i.rowIndex=e,i.pinned=r,i.type=o,i}return t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.setComp=function(e){this.comp=e,this.onRowHeightChanged(),this.onVirtualColumnsChanged(),this.setWidth(),this.addEventListeners(),He()&&this.comp.setTransform("translateZ(0)"),e.setAriaRowIndex(this.rowIndex+1)},t.prototype.addEventListeners=function(){this.addManagedListener(this.eventService,v.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_GRID_STYLES_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this)),this.addManagedPropertyListener("headerHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("groupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotGroupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("floatingFiltersHeight",this.onRowHeightChanged.bind(this))},t.prototype.getHeaderCellCtrl=function(e){return $t(this.headerCellCtrls).find(function(r){return r.getColumnGroupChild()===e})},t.prototype.onDisplayedColumnsChanged=function(){this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()},t.prototype.getType=function(){return this.type},t.prototype.onColumnResized=function(){this.setWidth()},t.prototype.setWidth=function(){var e=this.getWidthForRow();this.comp.setWidth(e+"px")},t.prototype.getWidthForRow=function(){var e=this.gridOptionsService.isDomLayout("print");if(e){var r=this.pinned!=null;return r?0:this.columnModel.getContainerWidth("right")+this.columnModel.getContainerWidth("left")+this.columnModel.getContainerWidth(null)}return this.columnModel.getContainerWidth(this.pinned)},t.prototype.onRowHeightChanged=function(){var e=this.columnModel.getHeaderRowCount(),r=[],o=0;this.columnModel.hasFloatingFilters()&&(e++,o=1);for(var i=this.columnModel.getColumnGroupHeaderRowHeight(),s=this.columnModel.getColumnHeaderRowHeight(),a=1+o,l=e-a,u=0;u=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},ig=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},ng=function(n,t){for(var e=0,r=t.length,o=n.length;e=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},hs=function(n){ag(t,n);function t(e){var r=n.call(this)||this;return r.headerRowComps={},r.rowCompsList=[],r.pinned=e,r}return t.prototype.init=function(){var e=this;this.selectAndSetTemplate();var r={setDisplayed:function(i){return e.setDisplayed(i)},setCtrls:function(i){return e.setCtrls(i)},setCenterWidth:function(i){return e.eCenterContainer.style.width=i},setViewportScrollLeft:function(i){return e.getGui().scrollLeft=i},setPinnedContainerWidth:function(i){var s=e.getGui();s.style.width=i,s.style.maxWidth=i,s.style.minWidth=i}},o=this.createManagedBean(new sg(this.pinned));o.setComp(r,this.getGui())},t.prototype.selectAndSetTemplate=function(){var e=this.pinned=="left",r=this.pinned=="right",o=e?t.PINNED_LEFT_TEMPLATE:r?t.PINNED_RIGHT_TEMPLATE:t.CENTER_TEMPLATE;this.setTemplate(o),this.eRowContainer=this.eCenterContainer?this.eCenterContainer:this.getGui()},t.prototype.destroyRowComps=function(){this.setCtrls([])},t.prototype.destroyRowComp=function(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())},t.prototype.setCtrls=function(e){var r=this,o=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];var i,s=function(a){var l=a.getGui(),u=l.parentElement!=r.eRowContainer;u&&r.eRowContainer.appendChild(l),i&&wn(r.eRowContainer,l,i),i=l};e.forEach(function(a){var l=a.getInstanceId(),u=o[l];delete o[l];var c=u||r.createBean(new Av(a));r.headerRowComps[l]=c,r.rowCompsList.push(c),s(c)}),tt(o).forEach(function(a){return r.destroyRowComp(a)})},t.PINNED_LEFT_TEMPLATE='',t.PINNED_RIGHT_TEMPLATE='',t.CENTER_TEMPLATE=``,ns([h("userComponentFactory")],t.prototype,"userComponentFactory",void 0),ns([D("eResize")],t.prototype,"eResize",void 0),ns([P],t.prototype,"postConstruct",null),t}(Yn),Dv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),jl=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},he;(function(n){n.COLUMN_GROUP="group",n.COLUMN="column",n.FLOATING_FILTER="filter"})(he||(he={}));var Av=function(n){Dv(t,n);function t(e){var r=n.call(this)||this;r.headerComps={};var o=e.getType()==he.COLUMN_GROUP?"ag-header-row-column-group":e.getType()==he.FLOATING_FILTER?"ag-header-row-column-filter":"ag-header-row-column";return r.setTemplate('
'),r.ctrl=e,r}return t.prototype.init=function(){var e=this,r={setTransform:function(o){return e.getGui().style.transform=o},setHeight:function(o){return e.getGui().style.height=o},setTop:function(o){return e.getGui().style.top=o},setHeaderCtrls:function(o){return e.setHeaderCtrls(o)},setWidth:function(o){return e.getGui().style.width=o},setAriaRowIndex:function(o){return Ji(e.getGui(),o)}};this.ctrl.setComp(r)},t.prototype.destroyHeaderCtrls=function(){this.setHeaderCtrls([])},t.prototype.setHeaderCtrls=function(e){var r=this;if(this.isAlive()){var o=this.headerComps;this.headerComps={},e.forEach(function(u){var c=u.getInstanceId(),p=o[c];delete o[c],p==null&&(p=r.createHeaderComp(u),r.getGui().appendChild(p.getGui())),r.headerComps[c]=p}),J(o,function(u,c){r.getGui().removeChild(c.getGui()),r.destroyBean(c)});var i=this.gridOptionsService.is("ensureDomOrder"),s=this.gridOptionsService.isDomLayout("print");if(i||s){var a=tt(this.headerComps);a.sort(function(u,c){var p=u.getCtrl().getColumnGroupChild().getLeft(),d=c.getCtrl().getColumnGroupChild().getLeft();return p-d});var l=a.map(function(u){return u.getGui()});Sn(this.getGui(),l)}}},t.prototype.createHeaderComp=function(e){var r;switch(this.ctrl.getType()){case he.COLUMN_GROUP:r=new Pv(e);break;case he.FLOATING_FILTER:r=new Hh(e);break;default:r=new Ov(e);break}return this.createBean(r),r.setParentComponent(this),r},jl([P],t.prototype,"init",null),jl([ae],t.prototype,"destroyHeaderCtrls",null),t}(W),bv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ss=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Fv=0,ai=function(n){bv(t,n);function t(e,r){var o=n.call(this)||this;return o.lastFocusEvent=null,o.columnGroupChild=e,o.parentRowCtrl=r,o.instanceId=e.getUniqueId()+"-"+Fv++,o}return t.prototype.shouldStopEventPropagation=function(e){var r=this.focusService.getFocusedHeader(),o=r.headerRowIndex,i=r.column;return za(this.gridOptionsService,e,o,i)},t.prototype.getWrapperHasFocus=function(){var e=this.gridOptionsService.getDocument(),r=e.activeElement;return r===this.eGui},t.prototype.setGui=function(e){this.eGui=e,this.addDomData()},t.prototype.handleKeyDown=function(e){var r=this.getWrapperHasFocus();switch(e.key){case R.PAGE_DOWN:case R.PAGE_UP:case R.PAGE_HOME:case R.PAGE_END:r&&e.preventDefault()}},t.prototype.addDomData=function(){var e=this,r=t.DOM_DATA_KEY_HEADER_CTRL;this.gridOptionsService.setDomData(this.eGui,r,this),this.addDestroyFunc(function(){return e.gridOptionsService.setDomData(e.eGui,r,null)})},t.prototype.getGui=function(){return this.eGui},t.prototype.focus=function(e){return this.eGui?(this.lastFocusEvent=e||null,this.eGui.focus(),!0):!1},t.prototype.getRowIndex=function(){return this.parentRowCtrl.getRowIndex()},t.prototype.getParentRowCtrl=function(){return this.parentRowCtrl},t.prototype.getPinned=function(){return this.parentRowCtrl.getPinned()},t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.getColumnGroupChild=function(){return this.columnGroupChild},t.DOM_DATA_KEY_HEADER_CTRL="headerCtrl",ss([h("focusService")],t.prototype,"focusService",void 0),ss([h("beans")],t.prototype,"beans",void 0),ss([h("userComponentFactory")],t.prototype,"userComponentFactory",void 0),t}(T),xv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Lv=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},as=function(n){xv(t,n);function t(e,r,o,i){var s=n.call(this)||this;return s.columnOrGroup=e,s.eCell=r,s.ariaEl=s.eCell.querySelector("[role=columnheader]")||s.eCell,s.colsSpanning=i,s.beans=o,s}return t.prototype.setColsSpanning=function(e){this.colsSpanning=e,this.onLeftChanged()},t.prototype.getColumnOrGroup=function(){return this.beans.gridOptionsService.is("enableRtl")&&this.colsSpanning?Q(this.colsSpanning):this.columnOrGroup},t.prototype.postConstruct=function(){this.addManagedListener(this.columnOrGroup,X.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.setLeftFirstTime(),this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onLeftChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onLeftChanged.bind(this))},t.prototype.setLeftFirstTime=function(){var e=this.beans.gridOptionsService.is("suppressColumnMoveAnimation"),r=O(this.columnOrGroup.getOldLeft()),o=this.beans.columnAnimationService.isActive()&&r&&!e;o?this.animateInLeft():this.onLeftChanged()},t.prototype.animateInLeft=function(){var e=this,r=this.getColumnOrGroup(),o=r.getLeft(),i=r.getOldLeft(),s=this.modifyLeftForPrintLayout(r,i),a=this.modifyLeftForPrintLayout(r,o);this.setLeft(s),this.actualLeft=a,this.beans.columnAnimationService.executeNextVMTurn(function(){e.actualLeft===a&&e.setLeft(a)})},t.prototype.onLeftChanged=function(){var e=this.getColumnOrGroup(),r=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,r),this.setLeft(this.actualLeft)},t.prototype.modifyLeftForPrintLayout=function(e,r){var o=this.beans.gridOptionsService.isDomLayout("print");if(!o||e.getPinned()==="left")return r;var i=this.beans.columnModel.getDisplayedColumnsLeftWidth();if(e.getPinned()==="right"){var s=this.beans.columnModel.getBodyContainerWidth();return i+s+r}return i+r},t.prototype.setLeft=function(e){O(e)&&(this.eCell.style.left=e+"px");var r;if(this.columnOrGroup instanceof X)r=this.columnOrGroup;else{var o=this.columnOrGroup,i=o.getLeafColumns();if(!i.length)return;i.length>1&&Pa(this.ariaEl,i.length),r=i[0]}var s=this.beans.columnModel.getAriaColumnIndex(r);Zi(this.ariaEl,s)},Lv([P],t.prototype,"postConstruct",null),t}(T),Iv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),kl=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},ls=function(n){Iv(t,n);function t(e,r){var o=n.call(this)||this;return o.columns=e,o.element=r,o}return t.prototype.postConstruct=function(){this.gridOptionsService.is("columnHoverHighlight")&&this.addMouseHoverListeners()},t.prototype.addMouseHoverListeners=function(){this.addManagedListener(this.element,"mouseout",this.onMouseOut.bind(this)),this.addManagedListener(this.element,"mouseover",this.onMouseOver.bind(this))},t.prototype.onMouseOut=function(){this.columnHoverService.clearMouseOver()},t.prototype.onMouseOver=function(){this.columnHoverService.setMouseOver(this.columns)},kl([h("columnHoverService")],t.prototype,"columnHoverService",void 0),kl([P],t.prototype,"postConstruct",null),t}(T),Mv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),us=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Nv=function(n){Mv(t,n);function t(e,r){var o=n.call(this,e,r)||this;return o.iconCreated=!1,o.column=e,o}return t.prototype.setComp=function(e,r,o,i){n.prototype.setGui.call(this,r),this.comp=e,this.eButtonShowMainFilter=o,this.eFloatingFilterBody=i,this.setupActive(),this.setupWidth(),this.setupLeft(),this.setupHover(),this.setupFocus(),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(),this.setupUi(),this.addManagedListener(this.eButtonShowMainFilter,"click",this.showParentFilter.bind(this)),this.setupFilterChangedListener(),this.addManagedListener(this.column,X.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this))},t.prototype.setupActive=function(){var e=this.column.getColDef(),r=!!e.filter,o=!!e.floatingFilter;this.active=r&&o},t.prototype.setupUi=function(){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)){var e=oe("filter",this.gridOptionsService,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}},t.prototype.setupFocus=function(){this.createManagedBean(new xt(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))},t.prototype.setupAria=function(){var e=this.localeService.getLocaleTextFunc();Dt(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))},t.prototype.onTabKeyDown=function(e){var r=this.gridOptionsService.getDocument(),o=r.activeElement,i=o===this.eGui;if(!i){var s=this.focusService.findNextFocusableElement(this.eGui,null,e.shiftKey);if(s){this.beans.headerNavigationService.scrollToColumn(this.column),e.preventDefault(),s.focus();return}var a=this.findNextColumnWithFloatingFilter(e.shiftKey);a&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:this.getParentRowCtrl().getRowIndex(),column:a},event:e})&&e.preventDefault()}},t.prototype.findNextColumnWithFloatingFilter=function(e){var r=this.beans.columnModel,o=this.column;do if(o=e?r.getDisplayedColBefore(o):r.getDisplayedColAfter(o),!o)break;while(!o.getColDef().filter||!o.getColDef().floatingFilter);return o},t.prototype.handleKeyDown=function(e){n.prototype.handleKeyDown.call(this,e);var r=this.getWrapperHasFocus();switch(e.key){case R.UP:case R.DOWN:r||e.preventDefault();case R.LEFT:case R.RIGHT:if(r)return;e.stopPropagation();case R.ENTER:r&&this.focusService.focusInto(this.eGui)&&e.preventDefault();break;case R.ESCAPE:r||this.eGui.focus()}},t.prototype.onFocusIn=function(e){var r=this.eGui.contains(e.relatedTarget);if(!r){var o=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&Xt(e.relatedTarget,"ag-floating-filter");if(o&&i&&e.target===this.eGui){var s=this.lastFocusEvent,a=!!(s&&s.key===R.TAB);if(s&&a){var l=s.shiftKey;this.focusService.focusInto(this.eGui,l)}}var u=this.getRowIndex();this.beans.focusService.setFocusedHeader(u,this.column)}},t.prototype.setupHover=function(){var e=this;this.createManagedBean(new ls([this.column],this.eGui));var r=function(){if(e.gridOptionsService.is("columnHoverHighlight")){var o=e.columnHoverService.isHovered(e.column);e.comp.addOrRemoveCssClass("ag-column-hover",o)}};this.addManagedListener(this.eventService,v.EVENT_COLUMN_HOVER_CHANGED,r),r()},t.prototype.setupLeft=function(){var e=new as(this.column,this.eGui,this.beans);this.createManagedBean(e)},t.prototype.setupFilterButton=function(){var e=this.column.getColDef();this.suppressFilterButton=e.floatingFilterComponentParams?!!e.floatingFilterComponentParams.suppressFilterButton:!1},t.prototype.setupUserComp=function(){var e=this;if(this.active){var r=this.filterManager.getFloatingFilterCompDetails(this.column,function(){return e.showParentFilter()});r&&this.setCompDetails(r)}},t.prototype.setCompDetails=function(e){this.userCompDetails=e,this.comp.setCompDetails(e)},t.prototype.showParentFilter=function(){var e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.menuFactory.showMenuAfterButtonClick(this.column,e,"floatingFilter","filterMenuTab",["filterMenuTab"])},t.prototype.setupSyncWithFilter=function(){var e=this;if(this.active){var r=function(o){var i=e.comp.getFloatingFilterComp();i&&i.then(function(s){if(s){var a=e.filterManager.getCurrentFloatingFilterParentModel(e.column);s.onParentModelChanged(a,o)}})};this.destroySyncListener=this.addManagedListener(this.column,X.EVENT_FILTER_CHANGED,r),this.filterManager.isFilterActive(this.column)&&r(null)}},t.prototype.setupWidth=function(){var e=this,r=function(){var o=e.column.getActualWidth()+"px";e.comp.setWidth(o)};this.addManagedListener(this.column,X.EVENT_WIDTH_CHANGED,r),r()},t.prototype.setupFilterChangedListener=function(){this.active&&(this.destroyFilterChangedListener=this.addManagedListener(this.column,X.EVENT_FILTER_CHANGED,this.updateFilterButton.bind(this)))},t.prototype.updateFilterButton=function(){!this.suppressFilterButton&&this.comp&&this.comp.setButtonWrapperDisplayed(this.filterManager.isFilterAllowed(this.column))},t.prototype.onColDefChanged=function(){var e=this,r,o,i=this.active;this.setupActive();var s=!i&&this.active;i&&!this.active&&((r=this.destroySyncListener)===null||r===void 0||r.call(this),(o=this.destroyFilterChangedListener)===null||o===void 0||o.call(this));var a=this.active?this.filterManager.getFloatingFilterCompDetails(this.column,function(){return e.showParentFilter()}):null,l=this.comp.getFloatingFilterComp();!l||!a?this.updateCompDetails(a,s):l.then(function(u){var c;(!u||((c=e.userCompDetails)===null||c===void 0?void 0:c.componentClass)!==a.componentClass)&&e.updateCompDetails(a,s)})},t.prototype.updateCompDetails=function(e,r){this.setCompDetails(e),this.setupFilterButton(),this.setupUi(),r&&(this.setupSyncWithFilter(),this.setupFilterChangedListener())},us([h("filterManager")],t.prototype,"filterManager",void 0),us([h("columnHoverService")],t.prototype,"columnHoverService",void 0),us([h("menuFactory")],t.prototype,"menuFactory",void 0),t}(ai),Gv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),cs=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Hv=function(n){Gv(t,n);function t(e,r,o,i,s){var a=n.call(this)||this;return a.pinned=e,a.column=r,a.eResize=o,a.comp=i,a.ctrl=s,a}return t.prototype.postConstruct=function(){var e=this,r=this.column.getColDef(),o=[],i,s,a=function(){if(U(e.eResize,i),!!i){var c=e.horizontalResizeService.addResizeBar({eResizeBar:e.eResize,onResizeStart:e.onResizeStart.bind(e),onResizing:e.onResizing.bind(e,!1),onResizeEnd:e.onResizing.bind(e,!0)});if(o.push(c),s){var p=e.gridOptionsService.is("skipHeaderOnAutoSize"),d=function(){e.columnModel.autoSizeColumn(e.column,p,"uiColumnResized")};e.eResize.addEventListener("dblclick",d);var f=new be(e.eResize);f.addEventListener(be.EVENT_DOUBLE_TAP,d),e.addDestroyFunc(function(){e.eResize.removeEventListener("dblclick",d),f.removeEventListener(be.EVENT_DOUBLE_TAP,d),f.destroy()})}}},l=function(){o.forEach(function(c){return c()}),o.length=0},u=function(){var c=e.column.isResizable(),p=!e.gridOptionsService.is("suppressAutoSize")&&!r.suppressAutoSize,d=c!==i||p!==s;d&&(i=c,s=p,l(),a())};u(),this.addDestroyFunc(l),this.ctrl.addRefreshFunction(u)},t.prototype.onResizing=function(e,r){var o=this.normaliseResizeAmount(r),i=[{key:this.column,newWidth:this.resizeStartWidth+o}];this.columnModel.setColumnWidths(i,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.comp.addOrRemoveCssClass("ag-column-resizing",!1)},t.prototype.onResizeStart=function(e){this.resizeStartWidth=this.column.getActualWidth(),this.resizeWithShiftKey=e,this.comp.addOrRemoveCssClass("ag-column-resizing",!0)},t.prototype.normaliseResizeAmount=function(e){var r=e,o=this.pinned!=="left",i=this.pinned==="right";return this.gridOptionsService.is("enableRtl")?o&&(r*=-1):i&&(r*=-1),r},cs([h("horizontalResizeService")],t.prototype,"horizontalResizeService",void 0),cs([h("columnModel")],t.prototype,"columnModel",void 0),cs([P],t.prototype,"postConstruct",null),t}(T),Vv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),li=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Bv=function(n){Vv(t,n);function t(e){var r=n.call(this)||this;r.cbSelectAllVisible=!1,r.processingEventFromCheckbox=!1,r.column=e;var o=e.getColDef();return r.filteredOnly=!!(o!=null&&o.headerCheckboxSelectionFilteredOnly),r.currentPageOnly=!!(o!=null&&o.headerCheckboxSelectionCurrentPageOnly),r}return t.prototype.onSpaceKeyDown=function(e){var r=this.cbSelectAll,o=this.gridOptionsService.getDocument();r.isDisplayed()&&!r.getGui().contains(o.activeElement)&&(e.preventDefault(),r.setValue(!r.getValue()))},t.prototype.getCheckboxGui=function(){return this.cbSelectAll.getGui()},t.prototype.setComp=function(e){this.headerCellCtrl=e,this.cbSelectAll=this.createManagedBean(new mr),this.cbSelectAll.addCssClass("ag-header-select-all"),le(this.cbSelectAll.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedListener(this.eventService,v.EVENT_NEW_COLUMNS_LOADED,this.showOrHideSelectAll.bind(this)),this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_CHANGED,this.showOrHideSelectAll.bind(this)),this.addManagedListener(this.eventService,v.EVENT_SELECTION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_PAGINATION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_MODEL_UPDATED,this.onModelChanged.bind(this)),this.addManagedListener(this.cbSelectAll,mr.EVENT_CHANGED,this.onCbSelectAll.bind(this)),Fo(this.cbSelectAll.getGui(),!0),this.cbSelectAll.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()},t.prototype.showOrHideSelectAll=function(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setDisplayed(this.cbSelectAllVisible,{skipAriaHidden:!0}),this.cbSelectAllVisible&&(this.checkRightRowModelType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel()},t.prototype.onModelChanged=function(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()},t.prototype.onSelectionChanged=function(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()},t.prototype.updateStateOfCheckbox=function(){if(!this.processingEventFromCheckbox){this.processingEventFromCheckbox=!0;var e=this.selectionService.getSelectAllState(this.filteredOnly,this.currentPageOnly);this.cbSelectAll.setValue(e),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}},t.prototype.refreshSelectAllLabel=function(){var e=this.localeService.getLocaleTextFunc(),r=this.cbSelectAll.getValue(),o=r?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),i=e("ariaRowSelectAll","Press Space to toggle all rows selection");this.cbSelectAllVisible?this.headerCellCtrl.setAriaDescriptionProperty("selectAll",i+" ("+o+")"):this.headerCellCtrl.setAriaDescriptionProperty("selectAll",null),this.cbSelectAll.setInputAriaLabel(i+" ("+o+")"),this.headerCellCtrl.refreshAriaDescription()},t.prototype.checkRightRowModelType=function(e){var r=this.rowModel.getType(),o=r==="clientSide"||r==="serverSide";return o?!0:(console.warn("AG Grid: "+e+" is only available if using 'clientSide' or 'serverSide' rowModelType, you are using "+r+"."),!1)},t.prototype.onCbSelectAll=function(){if(!this.processingEventFromCheckbox&&this.cbSelectAllVisible){var e=this.cbSelectAll.getValue(),r="uiSelectAll";this.currentPageOnly?r="uiSelectAllCurrentPage":this.filteredOnly&&(r="uiSelectAllFiltered");var o={source:r,justFiltered:this.filteredOnly,justCurrentPage:this.currentPageOnly};e?this.selectionService.selectAllRowNodes(o):this.selectionService.deselectAllRowNodes(o)}},t.prototype.isCheckboxSelection=function(){var e=this.column.getColDef().headerCheckboxSelection;if(typeof e=="function"){var r=e,o={column:this.column,colDef:this.column.getColDef(),columnApi:this.columnApi,api:this.gridApi,context:this.gridOptionsService.context};e=r(o)}return e?this.checkRightRowModelType("headerCheckboxSelection"):!1},li([h("gridApi")],t.prototype,"gridApi",void 0),li([h("columnApi")],t.prototype,"columnApi",void 0),li([h("rowModel")],t.prototype,"rowModel",void 0),li([h("selectionService")],t.prototype,"selectionService",void 0),t}(T),Wv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ul=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Pr;(function(n){n.TAB_GUARD="ag-tab-guard",n.TAB_GUARD_TOP="ag-tab-guard-top",n.TAB_GUARD_BOTTOM="ag-tab-guard-bottom"})(Pr||(Pr={}));var jv=function(n){Wv(t,n);function t(e){var r=n.call(this)||this;r.skipTabGuardFocus=!1;var o=e.comp,i=e.eTopGuard,s=e.eBottomGuard,a=e.focusInnerElement,l=e.onFocusIn,u=e.onFocusOut,c=e.shouldStopEventPropagation,p=e.onTabKeyDown,d=e.handleKeyDown,f=e.eFocusableElement;return r.comp=o,r.eTopGuard=i,r.eBottomGuard=s,r.providedFocusInnerElement=a,r.eFocusableElement=f,r.providedFocusIn=l,r.providedFocusOut=u,r.providedShouldStopEventPropagation=c,r.providedOnTabKeyDown=p,r.providedHandleKeyDown=d,r}return t.prototype.postConstruct=function(){var e=this;this.createManagedBean(new xt(this.eFocusableElement,{shouldStopEventPropagation:function(){return e.shouldStopEventPropagation()},onTabKeyDown:function(r){return e.onTabKeyDown(r)},handleKeyDown:function(r){return e.handleKeyDown(r)},onFocusIn:function(r){return e.onFocusIn(r)},onFocusOut:function(r){return e.onFocusOut(r)}})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach(function(r){return e.addManagedListener(r,"focus",e.onFocus.bind(e))})},t.prototype.handleKeyDown=function(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)},t.prototype.tabGuardsAreActive=function(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")},t.prototype.shouldStopEventPropagation=function(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1},t.prototype.activateTabGuards=function(){var e=this.gridOptionsService.getNum("tabIndex")||0;this.comp.setTabIndex(e.toString())},t.prototype.deactivateTabGuards=function(){this.comp.setTabIndex()},t.prototype.onFocus=function(e){if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}var r=e.target===this.eBottomGuard;this.providedFocusInnerElement?this.providedFocusInnerElement(r):this.focusInnerElement(r)},t.prototype.onFocusIn=function(e){this.providedFocusIn&&this.providedFocusIn(e)||this.deactivateTabGuards()},t.prototype.onFocusOut=function(e){this.providedFocusOut&&this.providedFocusOut(e)||this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards()},t.prototype.onTabKeyDown=function(e){var r=this;if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(!e.defaultPrevented){var o=this.tabGuardsAreActive();o&&this.deactivateTabGuards();var i=this.getNextFocusableElement(e.shiftKey);o&&setTimeout(function(){return r.activateTabGuards()},0),i&&(i.focus(),e.preventDefault())}},t.prototype.focusInnerElement=function(e){e===void 0&&(e=!1);var r=this.focusService.findFocusableElements(this.eFocusableElement);this.tabGuardsAreActive()&&(r.splice(0,1),r.splice(r.length-1,1)),r.length&&r[e?r.length-1:0].focus({preventScroll:!0})},t.prototype.getNextFocusableElement=function(e){return this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e)},t.prototype.forceFocusOutOfContainer=function(e){e===void 0&&(e=!1);var r=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,r.focus()},Ul([h("focusService")],t.prototype,"focusService",void 0),Ul([P],t.prototype,"postConstruct",null),t}(T),kv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Zr=function(){return Zr=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Uv=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},zv=function(n,t){for(var e=0,r=t.length,o=n.length;e0?i.indexOf(o)===-1&&i.push(o):(e.instancesMonitored.set(r,[o]),r.addEventListener("keydown",e.toggleKeyboardMode),r.addEventListener("mousedown",e.toggleKeyboardMode))},t.removeKeyboardModeEvents=function(r,o){var i=e.instancesMonitored.get(r),s=[];i&&i.length&&(s=zv([],Uv(i)).filter(function(a){return a!==o}),e.instancesMonitored.set(r,s)),s.length===0&&(r.removeEventListener("keydown",e.toggleKeyboardMode),r.removeEventListener("mousedown",e.toggleKeyboardMode))},t.toggleKeyboardMode=function(r){var o=e.keyboardModeActive,i=r.type==="keydown";if(!(i&&(r.ctrlKey||r.metaKey||r.altKey))&&!(o&&i||!o&&!i)){e.keyboardModeActive=i;var s=r.target.ownerDocument;if(s){var a=e.instancesMonitored.get(s);a&&a.forEach(function(l){l.dispatchEvent({type:i?v.EVENT_KEYBOARD_FOCUS:v.EVENT_MOUSE_FOCUS})})}}},t.prototype.init=function(){var r=this,o=this.clearFocusedCell.bind(this);this.addManagedListener(this.eventService,v.EVENT_COLUMN_PIVOT_MODE_CHANGED,o),this.addManagedListener(this.eventService,v.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverythingChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_COLUMN_GROUP_OPENED,o),this.addManagedListener(this.eventService,v.EVENT_COLUMN_ROW_GROUP_CHANGED,o),this.ctrlsService.whenReady(function(i){r.gridCtrl=i.gridCtrl;var s=r.gridOptionsService.getDocument();e.addKeyboardModeEvents(s,r.gridCtrl),r.addDestroyFunc(function(){return r.unregisterGridCompController(r.gridCtrl)})})},t.prototype.unregisterGridCompController=function(r){var o=this.gridOptionsService.getDocument();e.removeKeyboardModeEvents(o,r)},t.prototype.onColumnEverythingChanged=function(){if(this.focusedCellPosition){var r=this.focusedCellPosition.column,o=this.columnModel.getGridColumn(r.getId());r!==o&&this.clearFocusedCell()}},t.prototype.isKeyboardMode=function(){return e.keyboardModeActive},t.prototype.getFocusCellToUseAfterRefresh=function(){var r=this.gridOptionsService.getDocument();return this.gridOptionsService.is("suppressFocusAfterRefresh")||!this.focusedCellPosition||this.isDomDataMissingInHierarchy(r.activeElement,nr.DOM_DATA_KEY_ROW_CTRL)?null:this.focusedCellPosition},t.prototype.getFocusHeaderToUseAfterRefresh=function(){var r=this.gridOptionsService.getDocument();return this.gridOptionsService.is("suppressFocusAfterRefresh")||!this.focusedHeaderPosition||this.isDomDataMissingInHierarchy(r.activeElement,ai.DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeaderPosition},t.prototype.isDomDataMissingInHierarchy=function(r,o){for(var i=r;i;){var s=this.gridOptionsService.getDomData(i,o);if(s)return!1;i=i.parentNode}return!0},t.prototype.getFocusedCell=function(){return this.focusedCellPosition},t.prototype.shouldRestoreFocus=function(r){var o=this;return this.isCellRestoreFocused(r)?(setTimeout(function(){o.restoredFocusedCellPosition=null},0),!0):!1},t.prototype.isCellRestoreFocused=function(r){return this.restoredFocusedCellPosition==null?!1:this.cellPositionUtils.equals(r,this.restoredFocusedCellPosition)},t.prototype.setRestoreFocusedCell=function(r){this.getFrameworkOverrides().renderingEngine==="react"&&(this.restoredFocusedCellPosition=r)},t.prototype.getFocusEventParams=function(){var r=this.focusedCellPosition,o=r.rowIndex,i=r.rowPinned,s=r.column,a={rowIndex:o,rowPinned:i,column:s,isFullWidthCell:!1},l=this.rowRenderer.getRowByPosition({rowIndex:o,rowPinned:i});return l&&(a.isFullWidthCell=l.isFullWidth()),a},t.prototype.clearFocusedCell=function(){if(this.restoredFocusedCellPosition=null,this.focusedCellPosition!=null){var r=Zr({type:v.EVENT_CELL_FOCUS_CLEARED},this.getFocusEventParams());this.focusedCellPosition=null,this.eventService.dispatchEvent(r)}},t.prototype.setFocusedCell=function(r){var o=r.column,i=r.rowIndex,s=r.rowPinned,a=r.forceBrowserFocus,l=a===void 0?!1:a,u=r.preventScrollOnBrowserFocus,c=u===void 0?!1:u,p=this.columnModel.getGridColumn(o);if(!p){this.focusedCellPosition=null;return}this.focusedCellPosition=p?{rowIndex:i,rowPinned:St(s),column:p}:null;var d=Zr(Zr({type:v.EVENT_CELL_FOCUSED},this.getFocusEventParams()),{forceBrowserFocus:l,preventScrollOnBrowserFocus:c,floating:null});this.eventService.dispatchEvent(d)},t.prototype.isCellFocused=function(r){return this.focusedCellPosition==null?!1:this.cellPositionUtils.equals(r,this.focusedCellPosition)},t.prototype.isRowNodeFocused=function(r){return this.isRowFocused(r.rowIndex,r.rowPinned)},t.prototype.isHeaderWrapperFocused=function(r){if(this.focusedHeaderPosition==null)return!1;var o=r.getColumnGroupChild(),i=r.getRowIndex(),s=r.getPinned(),a=this.focusedHeaderPosition,l=a.column,u=a.headerRowIndex;return o===l&&i===u&&s==l.getPinned()},t.prototype.clearFocusedHeader=function(){this.focusedHeaderPosition=null},t.prototype.getFocusedHeader=function(){return this.focusedHeaderPosition},t.prototype.setFocusedHeader=function(r,o){this.focusedHeaderPosition={headerRowIndex:r,column:o}},t.prototype.focusHeaderPosition=function(r){var o=r.direction,i=r.fromTab,s=r.allowUserOverride,a=r.event,l=r.headerPosition;if(s){var u=this.getFocusedHeader(),c=this.headerNavigationService.getHeaderRowCount();if(i){var p=this.gridOptionsService.getCallback("tabToNextHeader");if(p){var d={backwards:o==="Before",previousHeaderPosition:u,nextHeaderPosition:l,headerRowCount:c};l=p(d)}}else{var p=this.gridOptionsService.getCallback("navigateToNextHeader");if(p&&a){var f={key:a.key,previousHeaderPosition:u,nextHeaderPosition:l,headerRowCount:c,event:a};l=p(f)}}}if(!l)return!1;if(l.headerRowIndex===-1)return this.focusGridView(l.column);this.headerNavigationService.scrollToColumn(l.column,o);var g=this.ctrlsService.getHeaderRowContainerCtrl(l.column.getPinned()),y=g.focusHeader(l.headerRowIndex,l.column,a);return y},t.prototype.focusFirstHeader=function(){var r=this.columnModel.getAllDisplayedColumns()[0];return r?(r.getParent()&&(r=this.columnModel.getColumnGroupAtLevel(r,0)),this.focusHeaderPosition({headerPosition:{headerRowIndex:0,column:r}})):!1},t.prototype.focusLastHeader=function(r){var o=this.headerNavigationService.getHeaderRowCount()-1,i=Q(this.columnModel.getAllDisplayedColumns());return this.focusHeaderPosition({headerPosition:{headerRowIndex:o,column:i},event:r})},t.prototype.isAnyCellFocused=function(){return!!this.focusedCellPosition},t.prototype.isRowFocused=function(r,o){return this.focusedCellPosition==null?!1:this.focusedCellPosition.rowIndex===r&&this.focusedCellPosition.rowPinned===St(o)},t.prototype.findFocusableElements=function(r,o,i){i===void 0&&(i=!1);var s=Ga,a=fn;o&&(a+=", "+o),i&&(a+=', [tabindex="-1"]');var l=Array.prototype.slice.apply(r.querySelectorAll(s)),u=Array.prototype.slice.apply(r.querySelectorAll(a));if(!u.length)return l;var c=function(p,d){return p.filter(function(f){return d.indexOf(f)===-1})};return c(l,u)},t.prototype.focusInto=function(r,o,i){o===void 0&&(o=!1),i===void 0&&(i=!1);var s=this.findFocusableElements(r,null,i),a=o?Q(s):s[0];return a?(a.focus({preventScroll:!0}),!0):!1},t.prototype.findFocusableElementBeforeTabGuard=function(r,o){if(!o)return null;var i=this.findFocusableElements(r),s=i.indexOf(o);if(s===-1)return null;for(var a=-1,l=s-1;l>=0;l--)if(i[l].classList.contains(Pr.TAB_GUARD_TOP)){a=l;break}return a<=0?null:i[a-1]},t.prototype.findNextFocusableElement=function(r,o,i){r===void 0&&(r=this.eGridDiv);var s=this.findFocusableElements(r,o?':not([tabindex="-1"])':null),a=this.gridOptionsService.getDocument(),l=a.activeElement,u;o?u=s.findIndex(function(p){return p.contains(l)}):u=s.indexOf(l);var c=u+(i?-1:1);return c<0||c>=s.length?null:s[c]},t.prototype.isTargetUnderManagedComponent=function(r,o){if(!o)return!1;var i=r.querySelectorAll("."+xt.FOCUS_MANAGED_CLASS);if(!i.length)return!1;for(var s=0;s=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Kv=function(n){$v(t,n);function t(e,r){var o=n.call(this,e,r)||this;return o.refreshFunctions=[],o.userHeaderClasses=new Set,o.ariaDescriptionProperties=new Map,o.column=e,o}return t.prototype.setComp=function(e,r,o,i){var s=this;n.prototype.setGui.call(this,r),this.comp=e,this.updateState(),this.setupWidth(),this.setupMovingCss(),this.setupMenuClass(),this.setupSortableClass(),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight(i),this.addColumnHoverListener(),this.setupFilterCss(),this.setupColId(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(),this.setupSelectAll(),this.setupUserComp(),this.refreshAria(),this.createManagedBean(new Hv(this.getPinned(),this.column,o,e,this)),this.createManagedBean(new ls([this.column],r)),this.createManagedBean(new as(this.column,r,this.beans)),this.createManagedBean(new xt(r,{shouldStopEventPropagation:function(a){return s.shouldStopEventPropagation(a)},onTabKeyDown:function(){return null},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addMouseDownListenerIfNeeded(r),this.addManagedListener(this.column,X.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_COLUMN_VALUE_CHANGED,this.onColumnValueChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onColumnRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_COLUMN_PIVOT_CHANGED,this.onColumnPivotChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))},t.prototype.addMouseDownListenerIfNeeded=function(e){var r=this;if(He()){var o=["mousedown","touchstart"],i=this.gridOptionsService.getDocument();o.forEach(function(s){r.addManagedListener(e,s,function(a){var l=i.activeElement;l!==e&&!e.contains(l)&&(e.focus(),Nt.toggleKeyboardMode(a))})})}},t.prototype.setupUserComp=function(){var e=this.lookupUserCompDetails();this.setCompDetails(e)},t.prototype.setCompDetails=function(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)},t.prototype.lookupUserCompDetails=function(){var e=this.createParams(),r=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(r,e)},t.prototype.createParams=function(){var e=this,r=this.column.getColDef(),o={column:this.column,displayName:this.displayName,enableSorting:r.sortable,enableMenu:this.menuEnabled,showColumnMenu:function(i){e.gridApi.showColumnMenuAfterButtonClick(e.column,i)},progressSort:function(i){e.sortController.progressSort(e.column,!!i,"uiColumnSorted")},setSort:function(i,s){e.sortController.setSortForColumn(e.column,i,!!s,"uiColumnSorted")},api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsService.context,eGridHeader:this.getGui()};return o},t.prototype.setupSelectAll=function(){this.selectAllFeature=this.createManagedBean(new Bv(this.column)),this.selectAllFeature.setComp(this)},t.prototype.getSelectAllGui=function(){return this.selectAllFeature.getCheckboxGui()},t.prototype.handleKeyDown=function(e){n.prototype.handleKeyDown.call(this,e),e.key===R.SPACE&&this.selectAllFeature.onSpaceKeyDown(e),e.key===R.ENTER&&this.onEnterKeyDown(e)},t.prototype.onEnterKeyDown=function(e){var r=this.comp.getUserCompInstance();if(r){if(e.ctrlKey||e.metaKey)this.menuEnabled&&r.showMenu&&(e.preventDefault(),r.showMenu());else if(this.sortable){var o=e.shiftKey;this.sortController.progressSort(this.column,o,"uiColumnSorted")}}},t.prototype.isMenuEnabled=function(){return this.menuEnabled},t.prototype.onFocusIn=function(e){if(!this.getGui().contains(e.relatedTarget)){var r=this.getRowIndex();this.focusService.setFocusedHeader(r,this.column)}this.setActiveHeader(!0)},t.prototype.onFocusOut=function(e){this.getGui().contains(e.relatedTarget)||this.setActiveHeader(!1)},t.prototype.setupTooltip=function(){var e=this,r={getColumn:function(){return e.column},getColDef:function(){return e.column.getColDef()},getGui:function(){return e.eGui},getLocation:function(){return"header"},getTooltipValue:function(){var i=e.column.getColDef().headerTooltip;return i}},o=this.createManagedBean(new Xn(r,this.beans));o.setComp(this.comp),this.refreshFunctions.push(function(){return o.refreshToolTip()})},t.prototype.setupClassesFromColDef=function(){var e=this,r=function(){var o=e.column.getColDef(),i=Wl.getHeaderClassesFromColDef(o,e.gridOptionsService,e.column,null),s=e.userHeaderClasses;e.userHeaderClasses=new Set(i),i.forEach(function(a){s.has(a)?s.delete(a):e.comp.addOrRemoveCssClass(a,!0)}),s.forEach(function(a){return e.comp.addOrRemoveCssClass(a,!1)})};this.refreshFunctions.push(r),r()},t.prototype.setDragSource=function(e){var r=this;if(this.dragSourceElement=e,this.removeDragSource(),!!e&&this.draggable){var o=!this.gridOptionsService.is("suppressDragLeaveHidesColumns");this.moveDragSource={type:Ce.HeaderCell,eElement:e,defaultIconName:o?de.ICON_HIDE:de.ICON_NOT_ALLOWED,getDragItem:function(){return r.createDragItem()},dragItemName:this.displayName,onDragStarted:function(){return r.column.setMoving(!0,"uiColumnMoved")},onDragStopped:function(){return r.column.setMoving(!1,"uiColumnMoved")},onGridEnter:function(i){var s;if(o){var a=((s=i==null?void 0:i.columns)===null||s===void 0?void 0:s.filter(function(l){return!l.getColDef().lockVisible}))||[];r.columnModel.setColumnsVisible(a,!0,"uiColumnMoved")}},onGridExit:function(i){var s;if(o){var a=((s=i==null?void 0:i.columns)===null||s===void 0?void 0:s.filter(function(l){return!l.getColDef().lockVisible}))||[];r.columnModel.setColumnsVisible(a,!1,"uiColumnMoved")}}},this.dragAndDropService.addDragSource(this.moveDragSource,!0)}},t.prototype.createDragItem=function(){var e={};return e[this.column.getId()]=this.column.isVisible(),{columns:[this.column],visibleState:e}},t.prototype.removeDragSource=function(){this.moveDragSource&&(this.dragAndDropService.removeDragSource(this.moveDragSource),this.moveDragSource=void 0)},t.prototype.onColDefChanged=function(){this.refresh()},t.prototype.updateState=function(){var e=this.column.getColDef();this.menuEnabled=this.menuFactory.isMenuEnabled(this.column)&&!e.suppressMenu,this.sortable=e.sortable,this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()},t.prototype.addRefreshFunction=function(e){this.refreshFunctions.push(e)},t.prototype.refresh=function(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),this.refreshFunctions.forEach(function(e){return e()})},t.prototype.refreshHeaderComp=function(){var e=this.lookupUserCompDetails(),r=this.comp.getUserCompInstance(),o=r!=null&&this.userCompDetails.componentClass==e.componentClass,i=o?this.attemptHeaderCompRefresh(e.params):!1;i?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)},t.prototype.attemptHeaderCompRefresh=function(e){var r=this.comp.getUserCompInstance();if(!r||!r.refresh)return!1;var o=r.refresh(e);return o},t.prototype.calculateDisplayName=function(){return this.columnModel.getDisplayNameForColumn(this.column,"header",!0)},t.prototype.checkDisplayName=function(){this.displayName!==this.calculateDisplayName()&&this.refresh()},t.prototype.workOutDraggable=function(){var e=this.column.getColDef(),r=this.gridOptionsService.is("suppressMovableColumns"),o=!r&&!e.suppressMovable&&!e.lockPosition;return!!o||!!e.enableRowGroup||!!e.enablePivot},t.prototype.onColumnRowGroupChanged=function(){this.checkDisplayName()},t.prototype.onColumnPivotChanged=function(){this.checkDisplayName()},t.prototype.onColumnValueChanged=function(){this.checkDisplayName()},t.prototype.setupWidth=function(){var e=this,r=function(){var o=e.column.getActualWidth();e.comp.setWidth(o+"px")};this.addManagedListener(this.column,X.EVENT_WIDTH_CHANGED,r),r()},t.prototype.setupMovingCss=function(){var e=this,r=function(){e.comp.addOrRemoveCssClass("ag-header-cell-moving",e.column.isMoving())};this.addManagedListener(this.column,X.EVENT_MOVING_CHANGED,r),r()},t.prototype.setupMenuClass=function(){var e=this,r=function(){e.comp.addOrRemoveCssClass("ag-column-menu-visible",e.column.isMenuVisible())};this.addManagedListener(this.column,X.EVENT_MENU_VISIBLE_CHANGED,r),r()},t.prototype.setupSortableClass=function(){var e=this,r=function(){e.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!e.sortable)};r(),this.addRefreshFunction(r),this.addManagedListener(this.eventService,X.EVENT_SORT_CHANGED,this.refreshAriaSort.bind(this))},t.prototype.setupWrapTextClass=function(){var e=this,r=function(){var o=!!e.column.getColDef().wrapHeaderText;e.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",o)};r(),this.addRefreshFunction(r)},t.prototype.onHeaderHeightChanged=function(){this.refreshSpanHeaderHeight()},t.prototype.refreshSpanHeaderHeight=function(){var e=this,r=e.eGui,o=e.column,i=e.comp,s=e.columnModel,a=e.gridOptionsService;if(o.isSpanHeaderHeight()){var l=this.getColumnGroupPaddingInfo(),u=l.numberOfParents,c=l.isSpanningTotal;if(i.addOrRemoveCssClass("ag-header-span-height",u>0),u!==0){i.addOrRemoveCssClass("ag-header-span-total",c);var p=a.is("pivotMode"),d=p?s.getPivotGroupHeaderHeight():s.getGroupHeaderHeight(),f=s.getColumnHeaderRowHeight(),g=u*d;r.style.setProperty("top",-g+"px"),r.style.setProperty("height",f+g+"px")}}},t.prototype.getColumnGroupPaddingInfo=function(){var e=this.column.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};for(var r=e.getPaddingLevel()+1,o=!0;e;){if(!e.isPadding()){o=!1;break}e=e.getParent()}return{numberOfParents:r,isSpanningTotal:o}},t.prototype.setupAutoHeight=function(e){var r=this,o=function(c){if(r.isAlive()){var p=bt(r.getGui()),d=p.paddingTop,f=p.paddingBottom,g=p.borderBottomWidth,y=p.borderTopWidth,m=d+f+g+y,C=e.offsetHeight,w=C+m;if(c<5){var S=r.beans.gridOptionsService.getDocument(),E=!S||!S.contains(e),A=w==0;if(E||A){r.beans.frameworkOverrides.setTimeout(function(){return o(c+1)},0);return}}r.columnModel.setColumnHeaderHeight(r.column,w)}},i=!1,s,a=function(){var c=r.column.isAutoHeaderHeight();c&&!i&&l(),!c&&i&&u()},l=function(){i=!0,o(0),r.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),s=r.resizeObserverService.observeResize(e,function(){return o(0)})},u=function(){i=!1,s&&s(),r.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),s=void 0};a(),this.addDestroyFunc(function(){return u()}),this.addManagedListener(this.column,X.EVENT_WIDTH_CHANGED,function(){return i&&o(0)}),this.addManagedListener(this.eventService,X.EVENT_SORT_CHANGED,function(){i&&r.beans.frameworkOverrides.setTimeout(function(){return o(0)})}),this.addRefreshFunction(a)},t.prototype.refreshAriaSort=function(){if(this.sortable){var e=this.localeService.getLocaleTextFunc(),r=this.sortController.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(ga(r)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort."))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)},t.prototype.refreshAriaMenu=function(){if(this.menuEnabled){var e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press CTRL ENTER to open column menu."))}else this.setAriaDescriptionProperty("menu",null)},t.prototype.setAriaDescriptionProperty=function(e,r){r!=null?this.ariaDescriptionProperties.set(e,r):this.ariaDescriptionProperties.delete(e)},t.prototype.refreshAriaDescription=function(){var e=Array.from(this.ariaDescriptionProperties.values());this.comp.setAriaDescription(e.length?e.join(" "):void 0)},t.prototype.refreshAria=function(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaDescription()},t.prototype.addColumnHoverListener=function(){var e=this,r=function(){if(e.gridOptionsService.is("columnHoverHighlight")){var o=e.columnHoverService.isHovered(e.column);e.comp.addOrRemoveCssClass("ag-column-hover",o)}};this.addManagedListener(this.eventService,v.EVENT_COLUMN_HOVER_CHANGED,r),r()},t.prototype.setupFilterCss=function(){var e=this,r=function(){e.comp.addOrRemoveCssClass("ag-header-cell-filtered",e.column.isFilterActive())};this.addManagedListener(this.column,X.EVENT_FILTER_ACTIVE_CHANGED,r),r()},t.prototype.setupColId=function(){this.comp.setColId(this.column.getColId())},t.prototype.addActiveHeaderMouseListeners=function(){var e=this,r=function(o){return e.setActiveHeader(o.type==="mouseenter")};this.addManagedListener(this.getGui(),"mouseenter",r),this.addManagedListener(this.getGui(),"mouseleave",r)},t.prototype.setActiveHeader=function(e){this.comp.addOrRemoveCssClass("ag-header-active",e)},mt([h("columnModel")],t.prototype,"columnModel",void 0),mt([h("columnHoverService")],t.prototype,"columnHoverService",void 0),mt([h("sortController")],t.prototype,"sortController",void 0),mt([h("menuFactory")],t.prototype,"menuFactory",void 0),mt([h("dragAndDropService")],t.prototype,"dragAndDropService",void 0),mt([h("resizeObserverService")],t.prototype,"resizeObserverService",void 0),mt([h("gridApi")],t.prototype,"gridApi",void 0),mt([h("columnApi")],t.prototype,"columnApi",void 0),mt([ae],t.prototype,"removeDragSource",null),t}(ai),Yv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ui=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},qv=function(n){Yv(t,n);function t(e,r,o,i){var s=n.call(this)||this;return s.eResize=r,s.comp=e,s.pinned=o,s.columnGroup=i,s}return t.prototype.postConstruct=function(){var e=this;if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}var r=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(this.addDestroyFunc(r),!this.gridOptionsService.is("suppressAutoSize")){var o=this.gridOptionsService.is("skipHeaderOnAutoSize");this.eResize.addEventListener("dblclick",function(){var i=[],s=e.columnGroup.getDisplayedLeafColumns();s.forEach(function(a){a.getColDef().suppressAutoSize||i.push(a.getColId())}),i.length>0&&e.columnModel.autoSizeColumns({columns:i,skipHeader:o,stopAtGroup:e.columnGroup,source:"uiColumnResized"}),e.resizeLeafColumnsToFit("uiColumnResized")})}},t.prototype.onResizeStart=function(e){var r=this;this.calculateInitialValues();var o=null;if(e&&(o=this.columnModel.getDisplayedGroupAfter(this.columnGroup)),o){var i=o.getDisplayedLeafColumns();this.resizeTakeFromCols=i.filter(function(s){return s.isResizable()}),this.resizeTakeFromStartWidth=0,this.resizeTakeFromCols.forEach(function(s){return r.resizeTakeFromStartWidth+=s.getActualWidth()}),this.resizeTakeFromRatios=[],this.resizeTakeFromCols.forEach(function(s){return r.resizeTakeFromRatios.push(s.getActualWidth()/r.resizeTakeFromStartWidth)})}else this.resizeTakeFromCols=null,this.resizeTakeFromStartWidth=null,this.resizeTakeFromRatios=null;this.comp.addOrRemoveCssClass("ag-column-resizing",!0)},t.prototype.onResizing=function(e,r,o){o===void 0&&(o="uiColumnResized");var i=this.normaliseDragChange(r),s=this.resizeStartWidth+i;this.resizeColumns(s,o,e)},t.prototype.resizeLeafColumnsToFit=function(e){var r=this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup);this.calculateInitialValues(),r>this.resizeStartWidth&&this.resizeColumns(r,e,!0)},t.prototype.resizeColumns=function(e,r,o){o===void 0&&(o=!0);var i=[];if(i.push({columns:this.resizeCols,ratios:this.resizeRatios,width:e}),this.resizeTakeFromCols){var s=e-this.resizeStartWidth;i.push({columns:this.resizeTakeFromCols,ratios:this.resizeTakeFromRatios,width:this.resizeTakeFromStartWidth-s})}this.columnModel.resizeColumnSets({resizeSets:i,finished:o,source:r}),o&&this.comp.addOrRemoveCssClass("ag-column-resizing",!1)},t.prototype.calculateInitialValues=function(){var e=this,r=this.columnGroup.getDisplayedLeafColumns();this.resizeCols=r.filter(function(o){return o.isResizable()}),this.resizeStartWidth=0,this.resizeCols.forEach(function(o){return e.resizeStartWidth+=o.getActualWidth()}),this.resizeRatios=[],this.resizeCols.forEach(function(o){return e.resizeRatios.push(o.getActualWidth()/e.resizeStartWidth)})},t.prototype.normaliseDragChange=function(e){var r=e;return this.gridOptionsService.is("enableRtl")?this.pinned!=="left"&&(r*=-1):this.pinned==="right"&&(r*=-1),r},ui([h("horizontalResizeService")],t.prototype,"horizontalResizeService",void 0),ui([h("autoWidthCalculator")],t.prototype,"autoWidthCalculator",void 0),ui([h("columnModel")],t.prototype,"columnModel",void 0),ui([P],t.prototype,"postConstruct",null),t}(T),Qv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Xv=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Jv=function(n){Qv(t,n);function t(e,r){var o=n.call(this)||this;return o.removeChildListenersFuncs=[],o.columnGroup=r,o.comp=e,o}return t.prototype.postConstruct=function(){this.addListenersToChildrenColumns(),this.addManagedListener(this.columnGroup,we.EVENT_DISPLAYED_CHILDREN_CHANGED,this.onDisplayedChildrenChanged.bind(this)),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))},t.prototype.addListenersToChildrenColumns=function(){var e=this;this.removeListenersOnChildrenColumns();var r=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach(function(o){o.addEventListener("widthChanged",r),o.addEventListener("visibleChanged",r),e.removeChildListenersFuncs.push(function(){o.removeEventListener("widthChanged",r),o.removeEventListener("visibleChanged",r)})})},t.prototype.removeListenersOnChildrenColumns=function(){this.removeChildListenersFuncs.forEach(function(e){return e()}),this.removeChildListenersFuncs=[]},t.prototype.onDisplayedChildrenChanged=function(){this.addListenersToChildrenColumns(),this.onWidthChanged()},t.prototype.onWidthChanged=function(){var e=this.columnGroup.getActualWidth();this.comp.setWidth(e+"px"),this.comp.addOrRemoveCssClass("ag-hidden",e===0)},Xv([P],t.prototype,"postConstruct",null),t}(T),Zv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ci=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},eg=function(n){Zv(t,n);function t(e,r){var o=n.call(this,e,r)||this;return o.columnGroup=e,o}return t.prototype.setComp=function(e,r,o){n.prototype.setGui.call(this,r),this.comp=e,this.displayName=this.columnModel.getDisplayNameForColumnGroup(this.columnGroup,"header"),this.addClasses(),this.addAttributes(),this.setupMovingCss(),this.setupExpandable(),this.setupTooltip(),this.setupUserComp();var i=this.getParentRowCtrl().getPinned(),s=this.columnGroup.getProvidedColumnGroup().getLeafColumns();this.createManagedBean(new ls(s,r)),this.createManagedBean(new as(this.columnGroup,r,this.beans)),this.createManagedBean(new Jv(e,this.columnGroup)),this.groupResizeFeature=this.createManagedBean(new qv(e,o,i,this.columnGroup)),this.createManagedBean(new xt(r,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:function(){},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))},t.prototype.resizeLeafColumnsToFit=function(e){this.groupResizeFeature&&this.groupResizeFeature.resizeLeafColumnsToFit(e)},t.prototype.setupUserComp=function(){var e=this,r=this.displayName,o={displayName:this.displayName,columnGroup:this.columnGroup,setExpanded:function(u){e.columnModel.setColumnGroupOpened(e.columnGroup.getProvidedColumnGroup(),u,"gridInitializing")},api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsService.context};if(!r){for(var i=this.columnGroup,s=i.getLeafColumns();i.getParent()&&i.getParent().getLeafColumns().length===s.length;)i=i.getParent();var a=i.getColGroupDef();a&&(r=a.headerName),r||(r=s?this.columnModel.getDisplayNameForColumn(s[0],"header",!0):"")}var l=this.userComponentFactory.getHeaderGroupCompDetails(o);this.comp.setUserCompDetails(l)},t.prototype.setupTooltip=function(){var e=this,r=this.columnGroup.getColGroupDef(),o={getColumn:function(){return e.columnGroup},getGui:function(){return e.eGui},getLocation:function(){return"headerGroup"},getTooltipValue:function(){return r&&r.headerTooltip}};r&&(o.getColDef=function(){return r});var i=this.createManagedBean(new Xn(o,this.beans));i.setComp(this.comp)},t.prototype.setupExpandable=function(){var e=this.columnGroup.getProvidedColumnGroup();this.refreshExpanded(),this.addManagedListener(e,re.EVENT_EXPANDABLE_CHANGED,this.refreshExpanded.bind(this)),this.addManagedListener(e,re.EVENT_EXPANDED_CHANGED,this.refreshExpanded.bind(this))},t.prototype.refreshExpanded=function(){var e=this.columnGroup;this.expandable=e.isExpandable();var r=e.isExpanded();this.expandable?this.comp.setAriaExpanded(r?"true":"false"):this.comp.setAriaExpanded(void 0)},t.prototype.addAttributes=function(){this.comp.setColId(this.columnGroup.getUniqueId())},t.prototype.addClasses=function(){var e=this,r=this.columnGroup.getColGroupDef(),o=Wl.getHeaderClassesFromColDef(r,this.gridOptionsService,null,this.columnGroup);if(this.columnGroup.isPadding()){o.push("ag-header-group-cell-no-group");var i=this.columnGroup.getLeafColumns();i.every(function(s){return s.isSpanHeaderHeight()})&&o.push("ag-header-span-height")}else o.push("ag-header-group-cell-with-group");o.forEach(function(s){return e.comp.addOrRemoveCssClass(s,!0)})},t.prototype.setupMovingCss=function(){var e=this,r=this.columnGroup.getProvidedColumnGroup(),o=r.getLeafColumns(),i=function(){return e.comp.addOrRemoveCssClass("ag-header-cell-moving",e.columnGroup.isMoving())};o.forEach(function(s){e.addManagedListener(s,X.EVENT_MOVING_CHANGED,i)}),i()},t.prototype.onFocusIn=function(e){if(!this.eGui.contains(e.relatedTarget)){var r=this.getRowIndex();this.beans.focusService.setFocusedHeader(r,this.columnGroup)}},t.prototype.handleKeyDown=function(e){n.prototype.handleKeyDown.call(this,e);var r=this.getWrapperHasFocus();if(!(!this.expandable||!r)&&e.key===R.ENTER){var o=this.columnGroup,i=!o.isExpanded();this.columnModel.setColumnGroupOpened(o.getProvidedColumnGroup(),i,"uiColumnExpanded")}},t.prototype.setDragSource=function(e){var r=this;if(!this.isSuppressMoving()){var o=this.columnGroup.getProvidedColumnGroup().getLeafColumns(),i=!this.gridOptionsService.is("suppressDragLeaveHidesColumns"),s={type:Ce.HeaderCell,eElement:e,defaultIconName:i?de.ICON_HIDE:de.ICON_NOT_ALLOWED,dragItemName:this.displayName,getDragItem:this.getDragItemForGroup.bind(this),onDragStarted:function(){return o.forEach(function(a){return a.setMoving(!0,"uiColumnDragged")})},onDragStopped:function(){return o.forEach(function(a){return a.setMoving(!1,"uiColumnDragged")})},onGridEnter:function(a){var l;if(i){var u=((l=a==null?void 0:a.columns)===null||l===void 0?void 0:l.filter(function(c){return!c.getColDef().lockVisible}))||[];r.columnModel.setColumnsVisible(u,!0,"uiColumnMoved")}},onGridExit:function(a){var l;if(i){var u=((l=a==null?void 0:a.columns)===null||l===void 0?void 0:l.filter(function(c){return!c.getColDef().lockVisible}))||[];r.columnModel.setColumnsVisible(u,!1,"uiColumnMoved")}}};this.dragAndDropService.addDragSource(s,!0),this.addDestroyFunc(function(){return r.dragAndDropService.removeDragSource(s)})}},t.prototype.getDragItemForGroup=function(){var e=this.columnGroup.getProvidedColumnGroup().getLeafColumns(),r={};e.forEach(function(i){return r[i.getId()]=i.isVisible()});var o=[];return this.columnModel.getAllDisplayedColumns().forEach(function(i){e.indexOf(i)>=0&&(o.push(i),fe(e,i))}),e.forEach(function(i){return o.push(i)}),{columns:o,visibleState:r}},t.prototype.isSuppressMoving=function(){var e=!1;this.columnGroup.getLeafColumns().forEach(function(o){(o.getColDef().suppressMovable||o.getColDef().lockPosition)&&(e=!0)});var r=e||this.gridOptionsService.is("suppressMovableColumns");return r},ci([h("columnModel")],t.prototype,"columnModel",void 0),ci([h("dragAndDropService")],t.prototype,"dragAndDropService",void 0),ci([h("gridApi")],t.prototype,"gridApi",void 0),ci([h("columnApi")],t.prototype,"columnApi",void 0),t}(ai),tg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),zl=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},rg=0,ps=function(n){tg(t,n);function t(e,r,o){var i=n.call(this)||this;return i.instanceId=rg++,i.headerCellCtrls={},i.rowIndex=e,i.pinned=r,i.type=o,i}return t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.setComp=function(e){this.comp=e,this.onRowHeightChanged(),this.onVirtualColumnsChanged(),this.setWidth(),this.addEventListeners(),He()&&this.comp.setTransform("translateZ(0)"),e.setAriaRowIndex(this.rowIndex+1)},t.prototype.addEventListeners=function(){this.addManagedListener(this.eventService,v.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_GRID_STYLES_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this)),this.addManagedPropertyListener("headerHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("groupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotGroupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("floatingFiltersHeight",this.onRowHeightChanged.bind(this))},t.prototype.getHeaderCellCtrl=function(e){return $t(this.headerCellCtrls).find(function(r){return r.getColumnGroupChild()===e})},t.prototype.onDisplayedColumnsChanged=function(){this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()},t.prototype.getType=function(){return this.type},t.prototype.onColumnResized=function(){this.setWidth()},t.prototype.setWidth=function(){var e=this.getWidthForRow();this.comp.setWidth(e+"px")},t.prototype.getWidthForRow=function(){var e=this.gridOptionsService.isDomLayout("print");if(e){var r=this.pinned!=null;return r?0:this.columnModel.getContainerWidth("right")+this.columnModel.getContainerWidth("left")+this.columnModel.getContainerWidth(null)}return this.columnModel.getContainerWidth(this.pinned)},t.prototype.onRowHeightChanged=function(){var e=this.columnModel.getHeaderRowCount(),r=[],o=0;this.columnModel.hasFloatingFilters()&&(e++,o=1);for(var i=this.columnModel.getColumnGroupHeaderRowHeight(),s=this.columnModel.getColumnHeaderRowHeight(),a=1+o,l=e-a,u=0;u=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},ig=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return i},ng=function(n,t){for(var e=0,r=t.length,o=n.length;e=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},hs=function(n){ag(t,n);function t(e){var r=n.call(this)||this;return r.headerRowComps={},r.rowCompsList=[],r.pinned=e,r}return t.prototype.init=function(){var e=this;this.selectAndSetTemplate();var r={setDisplayed:function(i){return e.setDisplayed(i)},setCtrls:function(i){return e.setCtrls(i)},setCenterWidth:function(i){return e.eCenterContainer.style.width=i},setViewportScrollLeft:function(i){return e.getGui().scrollLeft=i},setPinnedContainerWidth:function(i){var s=e.getGui();s.style.width=i,s.style.maxWidth=i,s.style.minWidth=i}},o=this.createManagedBean(new sg(this.pinned));o.setComp(r,this.getGui())},t.prototype.selectAndSetTemplate=function(){var e=this.pinned=="left",r=this.pinned=="right",o=e?t.PINNED_LEFT_TEMPLATE:r?t.PINNED_RIGHT_TEMPLATE:t.CENTER_TEMPLATE;this.setTemplate(o),this.eRowContainer=this.eCenterContainer?this.eCenterContainer:this.getGui()},t.prototype.destroyRowComps=function(){this.setCtrls([])},t.prototype.destroyRowComp=function(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())},t.prototype.setCtrls=function(e){var r=this,o=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];var i,s=function(a){var l=a.getGui(),u=l.parentElement!=r.eRowContainer;u&&r.eRowContainer.appendChild(l),i&&wn(r.eRowContainer,l,i),i=l};e.forEach(function(a){var l=a.getInstanceId(),u=o[l];delete o[l];var c=u||r.createBean(new Av(a));r.headerRowComps[l]=c,r.rowCompsList.push(c),s(c)}),tt(o).forEach(function(a){return r.destroyRowComp(a)})},t.PINNED_LEFT_TEMPLATE='',t.PINNED_RIGHT_TEMPLATE='',t.CENTER_TEMPLATE=``,ds([D("eCenterContainer")],t.prototype,"eCenterContainer",void 0),ds([P],t.prototype,"init",null),ds([ae],t.prototype,"destroyRowComps",null),t}(W),lg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),to=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},lt;(function(n){n[n.UP=0]="UP",n[n.DOWN=1]="DOWN",n[n.LEFT=2]="LEFT",n[n.RIGHT=3]="RIGHT"})(lt||(lt={}));var ug=function(n){lg(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady(function(r){e.gridBodyCon=r.gridBodyCtrl})},t.prototype.getHeaderRowCount=function(){var e=this.ctrlsService.getHeaderRowContainerCtrl();return e?e.getRowCount():0},t.prototype.navigateVertically=function(e,r,o){if(r||(r=this.focusService.getFocusedHeader()),!r)return!1;var i=r.headerRowIndex,s=r.column,a=this.getHeaderRowCount(),l=e===lt.UP,u=l?this.headerPositionUtils.getColumnVisibleParent(s,i):this.headerPositionUtils.getColumnVisibleChild(s,i),c=u.nextRow,p=u.nextFocusColumn,d=!1;return c<0&&(c=0,p=s,d=!0),c>=a&&(c=-1),!d&&!p?!1:this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:c,column:p},allowUserOverride:!0,event:o})},t.prototype.navigateHorizontally=function(e,r,o){r===void 0&&(r=!1);var i=this.focusService.getFocusedHeader(),s=e===lt.LEFT,a=this.gridOptionsService.is("enableRtl"),l,u;return s!==a?(u="Before",l=this.headerPositionUtils.findHeader(i,u)):(u="After",l=this.headerPositionUtils.findHeader(i,u)),l||!r?this.focusService.focusHeaderPosition({headerPosition:l,direction:u,fromTab:r,allowUserOverride:!0,event:o}):this.focusNextHeaderRow(i,u,o)},t.prototype.focusNextHeaderRow=function(e,r,o){var i=e.headerRowIndex,s=null,a;return r==="Before"?i>0&&(a=i-1,s=this.headerPositionUtils.findColAtEdgeForHeaderRow(a,"end")):(a=i+1,s=this.headerPositionUtils.findColAtEdgeForHeaderRow(a,"start")),this.focusService.focusHeaderPosition({headerPosition:s,direction:r,fromTab:!0,allowUserOverride:!0,event:o})},t.prototype.scrollToColumn=function(e,r){if(r===void 0&&(r="After"),!e.getPinned()){var o;if(e instanceof we){var i=e.getDisplayedLeafColumns();o=r==="Before"?Q(i):i[0]}else o=e;this.gridBodyCon.getScrollFeature().ensureColumnVisible(o)}},to([h("focusService")],t.prototype,"focusService",void 0),to([h("headerPositionUtils")],t.prototype,"headerPositionUtils",void 0),to([h("ctrlsService")],t.prototype,"ctrlsService",void 0),to([P],t.prototype,"postConstruct",null),t=to([x("headerNavigationService")],t),t}(T),cg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),pi=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},pg=function(n){cg(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.setComp=function(e,r,o){this.comp=e,this.eGui=r,this.createManagedBean(new xt(o,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedListener(this.eventService,v.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this)),this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onPivotModeChanged(),this.setupHeaderHeight(),this.ctrlsService.registerGridHeaderCtrl(this)},t.prototype.setupHeaderHeight=function(){var e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListener("headerHeight",e),this.addManagedPropertyListener("pivotHeaderHeight",e),this.addManagedPropertyListener("groupHeaderHeight",e),this.addManagedPropertyListener("pivotGroupHeaderHeight",e),this.addManagedPropertyListener("floatingFiltersHeight",e),this.addManagedListener(this.eventService,v.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,v.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,e),this.addManagedListener(this.eventService,v.EVENT_GRID_STYLES_CHANGED,e)},t.prototype.getHeaderHeight=function(){return this.headerHeight},t.prototype.setHeaderHeight=function(){var e=this.columnModel,r=0,o=e.getHeaderRowCount(),i,s=e.hasFloatingFilters();s&&(o++,r=1);var a=this.columnModel.getColumnGroupHeaderRowHeight(),l=this.columnModel.getColumnHeaderRowHeight(),u=1+r,c=o-u;if(i=r*e.getFloatingFiltersHeight(),i+=c*a,i+=l,this.headerHeight!==i){this.headerHeight=i;var p=i+1+"px";this.comp.setHeightAndMinHeight(p),this.eventService.dispatchEvent({type:v.EVENT_HEADER_HEIGHT_CHANGED})}},t.prototype.onPivotModeChanged=function(){var e=this.columnModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",e),this.comp.addOrRemoveCssClass("ag-pivot-off",!e)},t.prototype.onDisplayedColumnsChanged=function(){var e=this.columnModel.getAllDisplayedColumns(),r=e.some(function(o){return o.isSpanHeaderHeight()});this.comp.addOrRemoveCssClass("ag-header-allow-overflow",r)},t.prototype.onTabKeyDown=function(e){var r=this.gridOptionsService.is("enableRtl"),o=e.shiftKey!==r?lt.LEFT:lt.RIGHT;(this.headerNavigationService.navigateHorizontally(o,!0,e)||this.focusService.focusNextGridCoreContainer(e.shiftKey))&&e.preventDefault()},t.prototype.handleKeyDown=function(e){var r=null;switch(e.key){case R.LEFT:r=lt.LEFT;case R.RIGHT:O(r)||(r=lt.RIGHT),this.headerNavigationService.navigateHorizontally(r,!1,e);break;case R.UP:r=lt.UP;case R.DOWN:O(r)||(r=lt.DOWN),this.headerNavigationService.navigateVertically(r,null,e)&&e.preventDefault();break;default:return}},t.prototype.onFocusOut=function(e){var r=this.gridOptionsService.getDocument(),o=e.relatedTarget;!o&&this.eGui.contains(r.activeElement)||this.eGui.contains(o)||this.focusService.clearFocusedHeader()},pi([h("headerNavigationService")],t.prototype,"headerNavigationService",void 0),pi([h("focusService")],t.prototype,"focusService",void 0),pi([h("columnModel")],t.prototype,"columnModel",void 0),pi([h("ctrlsService")],t.prototype,"ctrlsService",void 0),t}(T),dg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),hg=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},fg=function(n){dg(t,n);function t(){return n.call(this,t.TEMPLATE)||this}return t.prototype.postConstruct=function(){var e=this,r={addOrRemoveCssClass:function(s,a){return e.addOrRemoveCssClass(s,a)},setHeightAndMinHeight:function(s){e.getGui().style.height=s,e.getGui().style.minHeight=s}},o=this.createManagedBean(new pg);o.setComp(r,this.getGui(),this.getFocusableElement());var i=function(s){e.createManagedBean(s),e.appendChild(s)};i(new hs("left")),i(new hs(null)),i(new hs("right"))},t.TEMPLATE='