357 lines
1.2 MiB
357 lines
1.2 MiB
(function(){"use strict";/**
|
||
* @ag-grid-community/all-modules - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v31.0.1
|
||
* @link https://www.ag-grid.com/
|
||
* @license MIT
|
||
*/function ct(n){return n==null||n===""?null:n}function P(n,t){return t===void 0&&(t=!1),n!=null&&(n!==""||t)}function V(n){return!P(n)}function _e(n){return n==null||n.length===0}function kr(n){return n!=null&&typeof n.toString=="function"?n.toString():null}function bt(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 Ii(n){if(n!==void 0)return n===null||n===""?!1:typeof n=="boolean"?n:/true/i.test(n)}function Sc(n){if(!(n==null||n===""))return n}function Yo(n,t){var e=n?JSON.stringify(n):null,r=t?JSON.stringify(t):null;return e===r}function wc(n,t,e){e===void 0&&(e=!1);var r=n==null,i=t==null;if(n&&n.toNumber&&(n=n.toNumber()),t&&t.toNumber&&(t=t.toNumber()),r&&i)return 0;if(r)return-1;if(i)return 1;function o(s,a){return s>a?1:s<a?-1:0}if(typeof n!="string"||!e)return o(n,t);try{return n.localeCompare(t)}catch{return o(n,t)}}function Jt(n){if(n instanceof Set||n instanceof Map){var t=[];return n.forEach(function(e){return t.push(e)}),t}return Object.values(n)}var Ec=Object.freeze({__proto__:null,makeNull:ct,exists:P,missing:V,missingOrEmpty:_e,toStringOrNull:kr,attrToNumber:bt,attrToBoolean:Ii,attrToString:Sc,jsonEquals:Yo,defaultComparator:wc,values:Jt}),_c=function(){function n(){this.existingKeys={}}return n.prototype.addExistingKeys=function(t){for(var e=0;e<t.length;e++)this.existingKeys[t[e]]=!0},n.prototype.getUniqueKey=function(t,e){t=kr(t);for(var r=0;;){var i=void 0;if(t?(i=t,r!==0&&(i+="_"+r)):e?(i=e,r!==0&&(i+="_"+r)):i=r,!this.existingKeys[i])return this.existingKeys[i]=!0,String(i);r++}},n}(),Rc=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.")},Oc=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o};function Ce(n,t){var e,r;if(n!=null){if(Array.isArray(n)){for(var i=0;i<n.length;i++)t(i.toString(),n[i]);return}try{for(var o=Rc(Object.entries(n)),s=o.next();!s.done;s=o.next()){var a=Oc(s.value,2),l=a[0],u=a[1];t(l,u)}}catch(c){e={error:c}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}}}function qo(n){for(var t={},e=Object.keys(n),r=0;r<e.length;r++){var i=e[r],o=n[i];t[i]=o}return t}function Tc(n){return JSON.parse(JSON.stringify(n))}function xi(n,t){if(n){var e=n,r={};return Object.keys(e).forEach(function(i){if(!(t&&t.indexOf(i)>=0)){var o=e[i],s=Mi(o)&&o.constructor===Object;s?r[i]=xi(o):r[i]=o}}),r}}function la(n,t){return n[t]}function ua(n,t,e){n[t]=e}function Pc(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];e.forEach(function(i){return ca(n,t,i)})}function ca(n,t,e,r){var i=la(n,e);i!==void 0&&ua(t,e,r?r(i):i)}function pa(n){var t={};return n.filter(function(e){return e!=null}).forEach(function(e){Object.keys(e).forEach(function(r){return t[r]=null})}),Object.keys(t)}function Ft(n){if(!n)return[];var t=Object;if(typeof t.values=="function")return t.values(n);var e=[];for(var r in n)n.hasOwnProperty(r)&&n.propertyIsEnumerable(r)&&e.push(n[r]);return e}function Ge(n,t,e,r){e===void 0&&(e=!0),r===void 0&&(r=!1),P(t)&&Ce(t,function(i,o){var s=n[i];if(s!==o){if(r){var a=s==null&&o!=null;if(a){var l=typeof o=="object"&&o.constructor===Object,u=l;u&&(s={},n[i]=s)}}Mi(o)&&Mi(s)&&!Array.isArray(s)?Ge(s,o,e,r):(e||o!==void 0)&&(n[i]=o)}})}function Dc(n){return V(n)||Object.keys(n).length===0}function Ac(n,t,e){if(n==null)return e;for(var r=t.split("."),i=n;r.length>1;)if(i=i[r.shift()],i==null)return e;var o=i[r[0]];return o??e}function bc(n,t,e){if(n!=null){var r=t.split("."),i=n;r.forEach(function(o,s){i[o]||(i[o]={}),s<r.length-1&&(i=i[o])}),i[r[r.length-1]]=e}}function Sr(n,t,e){if(!(!t||!n)){if(!e)return n[t];for(var r=t.split("."),i=n,o=0;o<r.length;o++){if(i==null)return;i=i[r[o]]}return i}}function da(n,t,e){t===void 0&&(t=[]),Object.keys(n).forEach(function(s){var a=n[s];typeof a=="object"&&!t.includes(s)&&(n[s]=void 0)});var r=Object.getPrototypeOf(n),i={},o=function(s){return"AG Grid: Grid API function ".concat(s,`() cannot be called as the grid has been destroyed.
|
||
It is recommended to remove local references to the grid api. Alternatively, check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
|
||
To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: `).concat(e)};Object.getOwnPropertyNames(r).forEach(function(s){var a=r[s];if(typeof a=="function"&&!t.includes(s)){var l=function(){console.warn(o(s))};i[s]={value:l,writable:!0}}}),Object.defineProperties(n,i)}function Mi(n){return typeof n=="object"&&n!==null}var Fc=Object.freeze({__proto__:null,iterateObject:Ce,cloneObject:qo,deepCloneObject:Tc,deepCloneDefinition:xi,getProperty:la,setProperty:ua,copyPropertiesIfPresent:Pc,copyPropertyIfPresent:ca,getAllKeysInObjects:pa,getAllValuesInObject:Ft,mergeDeep:Ge,missingOrEmptyObject:Dc,get:Ac,set:bc,getValueUsingField:Sr,removeAllReferences:da,isNonNullObject:Mi}),ha={};function wr(n,t){ha[t]||(n(),ha[t]=!0)}function B(n){wr(function(){return console.warn("AG Grid: "+n)},n)}function pt(n){wr(function(){return console.error("AG Grid: "+n)},n)}function Ni(n){if(n.name)return n.name;var t=/function\s+([^\(]+)/.exec(n.toString());return t&&t.length===2?t[1].trim():null}function Gi(n){return!!(n&&n.constructor&&n.call&&n.apply)}function fa(n){va(n,400)}var Qo=[],Xo=!1;function Jo(n){Qo.push(n),!Xo&&(Xo=!0,window.setTimeout(function(){var t=Qo.slice();Qo.length=0,Xo=!1,t.forEach(function(e){return e()})},0))}function va(n,t){t===void 0&&(t=0),n.length>0&&window.setTimeout(function(){return n.forEach(function(e){return e()})},t)}function ze(n,t){var e;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=this;window.clearTimeout(e),e=window.setTimeout(function(){n.apply(o,r)},t)}}function Zo(n,t){var e=0;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=this,s=new Date().getTime();s-e<t||(e=s,n.apply(o,r))}}function en(n,t,e,r){e===void 0&&(e=100);var i=new Date().getTime(),o=null,s=!1,a=function(){var l=new Date().getTime()-i>e;(n()||l)&&(t(),s=!0,o!=null&&(window.clearInterval(o),o=null),l&&r&&console.warn(r))};a(),s||(o=window.setInterval(a,10))}function Lc(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return function(e){return n.reduce(function(r,i){return i(r)},e)}}function ga(n){n&&n()}var Ic=function(){},xc=Object.freeze({__proto__:null,doOnce:wr,warnOnce:B,errorOnce:pt,getFunctionName:Ni,isFunction:Gi,executeInAWhile:fa,executeNextVMTurn:Jo,executeAfter:va,debounce:ze,throttle:Zo,waitUntil:en,compose:Lc,callIfPresent:ga,noop:Ic}),M;(function(n){n.CommunityCoreModule="@ag-grid-community/core",n.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",n.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",n.CsvExportModule="@ag-grid-community/csv-export",n.EnterpriseCoreModule="@ag-grid-enterprise/core",n.RowGroupingModule="@ag-grid-enterprise/row-grouping",n.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",n.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",n.MenuModule="@ag-grid-enterprise/menu",n.SetFilterModule="@ag-grid-enterprise/set-filter",n.MultiFilterModule="@ag-grid-enterprise/multi-filter",n.StatusBarModule="@ag-grid-enterprise/status-bar",n.SideBarModule="@ag-grid-enterprise/side-bar",n.RangeSelectionModule="@ag-grid-enterprise/range-selection",n.MasterDetailModule="@ag-grid-enterprise/master-detail",n.RichSelectModule="@ag-grid-enterprise/rich-select",n.GridChartsModule="@ag-grid-enterprise/charts",n.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",n.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",n.ExcelExportModule="@ag-grid-enterprise/excel-export",n.ClipboardModule="@ag-grid-enterprise/clipboard",n.SparklinesModule="@ag-grid-enterprise/sparklines",n.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",n.AngularModule="@ag-grid-community/angular",n.ReactModule="@ag-grid-community/react",n.VueModule="@ag-grid-community/vue"})(M||(M={}));var Wr=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},ya=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},k=function(){function n(){}return n.register=function(t){n.__register(t,!0,void 0)},n.registerModules=function(t){n.__registerModules(t,!0,void 0)},n.__register=function(t,e,r){n.runVersionChecks(t),r!==void 0?(n.areGridScopedModules=!0,n.gridModulesMap[r]===void 0&&(n.gridModulesMap[r]={}),n.gridModulesMap[r][t.moduleName]=t):n.globalModulesMap[t.moduleName]=t,n.setModuleBased(e)},n.__unRegisterGridModules=function(t){delete n.gridModulesMap[t]},n.__registerModules=function(t,e,r){n.setModuleBased(e),t&&t.forEach(function(i){return n.__register(i,e,r)})},n.isValidModuleVersion=function(t){var e=Wr(t.version.split(".")||[],2),r=e[0],i=e[1],o=Wr(n.currentModuleVersion.split(".")||[],2),s=o[0],a=o[1];return r===s&&i===a},n.runVersionChecks=function(t){if(n.currentModuleVersion||(n.currentModuleVersion=t.version),t.version?n.isValidModuleVersion(t)||console.error("AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '".concat(t.moduleName,"' is version ").concat(t.version," but the other modules are version ").concat(this.currentModuleVersion,". Please update all modules to the same version.")):console.error("AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '".concat(t.moduleName,"' is incompatible. Please update all modules to the same version.")),t.validate){var e=t.validate();if(!e.isValid){var r=e;console.error("AG Grid: ".concat(r.message))}}},n.setModuleBased=function(t){n.moduleBased===void 0?n.moduleBased=t:n.moduleBased!==t&&wr(function(){console.warn("AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) - you can only use one or the other of these mechanisms."),console.warn("Please see https://www.ag-grid.com/javascript-grid/packages-modules/ for more information.")},"ModulePackageCheck")},n.__setIsBundled=function(){n.isBundled=!0},n.__assertRegistered=function(t,e,r){var i;if(this.__isRegistered(t,r))return!0;var o=e+t,s;if(n.isBundled)s="AG Grid: unable to use ".concat(e,` as 'ag-grid-enterprise' has not been loaded. Check you are using the Enterprise bundle:
|
||
|
||
<script src="https://cdn.jsdelivr.net/npm/ag-grid-enterprise@AG_GRID_VERSION/dist/ag-grid-enterprise.min.js"><\/script>
|
||
|
||
For more info see: https://ag-grid.com/javascript-data-grid/getting-started/#getting-started-with-ag-grid-enterprise`);else if(n.moduleBased||n.moduleBased===void 0){var a=(i=Object.entries(M).find(function(l){var u=Wr(l,2);u[0];var c=u[1];return c===t}))===null||i===void 0?void 0:i[0];s="AG Grid: unable to use ".concat(e," as the ").concat(a," is not registered").concat(n.areGridScopedModules?" for gridId: ".concat(r):"",`. Check if you have registered the module:
|
||
|
||
import { ModuleRegistry } from '@ag-grid-community/core';
|
||
import { `).concat(a," } from '").concat(t,`';
|
||
|
||
ModuleRegistry.registerModules([ `).concat(a,` ]);
|
||
|
||
For more info see: https://www.ag-grid.com/javascript-grid/modules/`)}else s="AG Grid: unable to use ".concat(e,` as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package:
|
||
|
||
import 'ag-grid-enterprise';
|
||
|
||
For more info see: https://www.ag-grid.com/javascript-grid/packages/`);return wr(function(){console.warn(s)},o),!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 ya(ya([],Wr(Jt(n.globalModulesMap)),!1),Wr(Jt(n.gridModulesMap[t]||{})),!1)},n.__getGridRegisteredModules=function(t){var e;return Jt((e=n.gridModulesMap[t])!==null&&e!==void 0?e:{})||[]},n.__isPackageBased=function(){return!n.moduleBased},n.globalModulesMap={},n.gridModulesMap={},n.areGridScopedModules=!1,n}(),Mc=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},Nc=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},Gc=function(){function n(t,e){if(this.beanWrappers={},this.destroyed=!1,!(!t||!t.beanClasses)){this.contextParams=t,this.logger=e,this.logger.log(">> 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 Jt(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"),P(e)&&t.forEach(e),this.callLifeCycleMethods(t,"postConstructMethods")},n.prototype.createBeans=function(){var t=this;this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),Ce(this.beanWrappers,function(r,i){var o;i.bean.__agBeanMetaData&&i.bean.__agBeanMetaData.autowireMethods&&i.bean.__agBeanMetaData.autowireMethods.agConstructor&&(o=i.bean.__agBeanMetaData.autowireMethods.agConstructor);var s=t.getBeansForParameters(o,i.bean.name),a=new(i.bean.bind.apply(i.bean,Nc([null],Mc(s),!1)));i.beanInstance=a});var e=Object.keys(this.beanWrappers).join(", ");this.logger.log("created beans: ".concat(e))},n.prototype.createBeanWrapper=function(t){var e=t.__agBeanMetaData;if(!e){var r=void 0;t.prototype.constructor?r=Ni(t.prototype.constructor):r=""+t,console.error("Context item ".concat(r," is not a bean"));return}var i={bean:t,beanInstance:null,beanName:e.beanName};this.beanWrappers[e.beanName]=i},n.prototype.autoWireBeans=function(t){var e=this;t.forEach(function(r){e.forEachMetaDataInHierarchy(r,function(i,o){var s=i.agClassAttributes;s&&s.forEach(function(a){var l=e.lookupBeanInstance(o,a.beanName,a.optional);r[a.attributeName]=l})})})},n.prototype.methodWireBeans=function(t){var e=this;t.forEach(function(r){e.forEachMetaDataInHierarchy(r,function(i,o){Ce(i.autowireMethods,function(s,a){if(s!=="agConstructor"){var l=e.getBeansForParameters(a,o);r[s].apply(r,l)}})})})},n.prototype.forEachMetaDataInHierarchy=function(t,e){for(var r=Object.getPrototypeOf(t);r!=null;){var i=r.constructor;if(i.hasOwnProperty("__agBeanMetaData")){var o=i.__agBeanMetaData,s=this.getBeanName(i);e(o,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,i=[];return t&&Ce(t,function(o,s){var a=r.lookupBeanInstance(e,s);i[Number(o)]=a}),i},n.prototype.lookupBeanInstance=function(t,e,r){if(r===void 0&&(r=!1),this.destroyed)return this.logger.log("AG Grid: bean reference ".concat(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 i=this.beanWrappers[e];return i?i.beanInstance:(r||console.error("AG Grid: unable to find bean reference ".concat(e," while initialising ").concat(t)),null)},n.prototype.callLifeCycleMethods=function(t,e){var r=this;t.forEach(function(i){return r.callLifeCycleMethodsOnBean(i,e)})},n.prototype.callLifeCycleMethodsOnBean=function(t,e,r){var i={};this.forEachMetaDataInHierarchy(t,function(s){var a=s[e];a&&a.forEach(function(l){l!=r&&(i[l]=!0)})});var o=Object.keys(i);o.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.destroyed=!0,this.logger.log(">> Shutting down ag-Application Context");var t=this.getBeanInstances();this.destroyBeans(t),this.contextParams.providedBeanInstances=null,k.__unRegisterGridModules(this.contextParams.gridId),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 i=r;typeof i.destroy=="function"&&i.destroy()}),[]):[]},n.prototype.isDestroyed=function(){return this.destroyed},n.prototype.getGridId=function(){return this.contextParams.gridId},n}();function Ca(n,t,e){var r=Zt(n.constructor);r.preConstructMethods||(r.preConstructMethods=[]),r.preConstructMethods.push(t)}function b(n,t,e){var r=Zt(n.constructor);r.postConstructMethods||(r.postConstructMethods=[]),r.postConstructMethods.push(t)}function Se(n,t,e){var r=Zt(n.constructor);r.preDestroyMethods||(r.preDestroyMethods=[]),r.preDestroyMethods.push(t)}function I(n){return function(t){var e=Zt(t);e.beanName=n}}function f(n){return function(t,e,r){ma(t,n,!1,t,e,null)}}function Y(n){return function(t,e,r){ma(t,n,!0,t,e,null)}}function ma(n,t,e,r,i,o){if(t===null){console.error("AG Grid: Autowired name should not be null");return}if(typeof o=="number"){console.error("AG Grid: Autowired should be on an attribute");return}var s=Zt(n.constructor);s.agClassAttributes||(s.agClassAttributes=[]),s.agClassAttributes.push({attributeName:i,beanName:t,optional:e})}function Re(n){return function(t,e,r){var i=typeof t=="function"?t:t.constructor,o;if(typeof r=="number"){var s=void 0;e?(o=Zt(i),s=e):(o=Zt(i),s="agConstructor"),o.autowireMethods||(o.autowireMethods={}),o.autowireMethods[s]||(o.autowireMethods[s]={}),o.autowireMethods[s][r]=n}}}function Zt(n){return n.hasOwnProperty("__agBeanMetaData")||(n.__agBeanMetaData={}),n.__agBeanMetaData}var Sa=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},jr=function(n,t){return function(e,r){t(e,r,n)}},Lt=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,i,o){if(i===void 0&&(i=null),o===void 0&&(o=null),this.frameworkOverrides=r,this.gridOptionsService=e,i){var s=e.useAsyncEvents();this.addGlobalListener(i,s)}o&&this.addGlobalListener(o,!1)},n.prototype.getListeners=function(t,e,r){var i=e?this.allAsyncListeners:this.allSyncListeners,o=i.get(t);return!o&&r&&(o=new Set,i.set(t,o)),o},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 i=this.getListeners(t,r,!1);if(i&&(i.delete(e),i.size===0)){var o=r?this.allAsyncListeners:this.allSyncListeners;o.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,i=r.api,o=r.columnApi,s=r.context;e.api=i,e.columnApi=o,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,i,o=t.type;if(e&&"event"in t){var s=t.event;s instanceof Event&&(t.eventPath=s.composedPath())}var a=function(p,d){return p.forEach(function(h){d.has(h)&&(e?r.dispatchAsync(function(){return h(t)}):h(t))})},l=(i=this.getListeners(o,e,!1))!==null&&i!==void 0?i:new Set,u=new Set(l);u.size>0&&a(u,l);var c=new Set(e?this.globalAsyncListeners:this.globalSyncListeners);c.forEach(function(p){e?r.dispatchAsync(function(){return r.frameworkOverrides.dispatchEvent(o,function(){return p(o,t)},!0)}):r.frameworkOverrides.dispatchEvent(o,function(){return p(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()})},Sa([jr(0,Re("loggerFactory")),jr(1,Re("gridOptionsService")),jr(2,Re("frameworkOverrides")),jr(3,Re("globalEventListener")),jr(4,Re("globalSyncEventListener"))],n.prototype,"setBeans",null),n=Sa([I("eventService")],n),n}(),Vi=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Vc={resizable:!0,sortable:!0},Hc=0;function wa(){return Hc++}var Z=function(){function n(t,e,r,i){this.instanceId=wa(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.eventService=new Lt,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=t,this.userProvidedColDef=e,this.colId=r,this.primary=i,this.setState(t)}return n.prototype.getInstanceId=function(){return this.instanceId},n.prototype.setState=function(t){t.sort!==void 0?(t.sort==="asc"||t.sort==="desc")&&(this.sort=t.sort):(t.initialSort==="asc"||t.initialSort==="desc")&&(this.sort=t.initialSort);var e=t.sortIndex,r=t.initialSortIndex;e!==void 0?e!==null&&(this.sortIndex=e):r!==null&&(this.sortIndex=r);var i=t.hide,o=t.initialHide;i!==void 0?this.visible=!i:this.visible=!o,t.pinned!==void 0?this.setPinned(t.pinned):this.setPinned(t.initialPinned);var s=t.flex,a=t.initialFlex;s!==void 0?this.flex=s:a!==void 0&&(this.flex=a)},n.prototype.setColDef=function(t,e,r){r===void 0&&(r="api"),this.colDef=t,this.userProvidedColDef=e,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.eventService.dispatchEvent(this.createColumnEvent("colDefChanged",r))},n.prototype.getUserProvidedColDef=function(){return this.userProvidedColDef},n.prototype.setParent=function(t){this.parent=t},n.prototype.getParent=function(){return this.parent},n.prototype.setOriginalParent=function(t){this.originalParent=t},n.prototype.getOriginalParent=function(){return this.originalParent},n.prototype.initialise=function(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()},n.prototype.initDotNotation=function(){var t=this.gridOptionsService.get("suppressFieldDotNotation");this.fieldContainsDots=P(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!t,this.tooltipFieldContainsDots=P(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=P(this.colDef.tooltipField)||P(this.colDef.tooltipValueGetter)||P(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(V(this.colDef)||V(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.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.get("enableGroupEdit")?!1:this.isColumnFunc(t,this.colDef.editable)},n.prototype.isSuppressFillHandle=function(){return!!this.colDef.suppressFillHandle},n.prototype.isAutoHeight=function(){return!!this.colDef.autoHeight},n.prototype.isAutoHeaderHeight=function(){return!!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!!this.getColDefValue("resizable")},n.prototype.getColDefValue=function(t){var e;return(e=this.colDef[t])!==null&&e!==void 0?e:Vc[t]},n.prototype.isColumnFunc=function(t,e){if(typeof e=="boolean")return e;if(typeof e=="function"){var r=this.createColumnFunctionCallbackParams(t),i=e;return i(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.isSortable=function(){return!!this.getColDefValue("sortable")},n.prototype.isSortAscending=function(){return this.sort==="asc"},n.prototype.isSortDescending=function(){return this.sort==="desc"},n.prototype.isSortNone=function(){return V(this.sort)},n.prototype.isSorting=function(){return P(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 i=this.createColumnEvent("filterChanged",e);r&&Ge(i,r),this.eventService.dispatchEvent(i)},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(V(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(V(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"),P(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",Vi([f("gridOptionsService")],n.prototype,"gridOptionsService",void 0),Vi([f("columnUtils")],n.prototype,"columnUtils",void 0),Vi([f("columnHoverService")],n.prototype,"columnHoverService",void 0),Vi([b],n.prototype,"initialise",null),n}(),Bc=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},oe=function(){function n(t,e,r,i){this.localEventService=new Lt,this.expandable=!1,this.instanceId=wa(),this.expandableListenerRemoveCallback=null,this.colGroupDef=t,this.groupId=e,this.expanded=!!t&&!!t.openByDefault,this.padding=r,this.level=i}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 Z?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,i=this.findChildrenRemovingPadding(),o=0,s=i.length;o<s;o++){var a=i[o];if(a.isVisible()){var l=a.getColumnGroupShow();l==="open"?(t=!0,r=!0):l==="closed"?(e=!0,r=!0):(t=!0,e=!0)}}var u=t&&e&&r;if(this.expandable!==u){this.expandable=u;var c={type:n.EVENT_EXPANDABLE_CHANGED};this.localEventService.dispatchEvent(c)}}},n.prototype.findChildrenRemovingPadding=function(){var t=[],e=function(r){r.forEach(function(i){var o=i instanceof n&&i.isPadding();o?e(i.children):t.push(i)})};return e(this.children),t},n.prototype.onColumnVisibilityChanged=function(){this.setExpandable()},n.prototype.addEventListener=function(t,e){this.localEventService.addEventListener(t,e)},n.prototype.removeEventListener=function(t,e){this.localEventService.removeEventListener(t,e)},n.EVENT_EXPANDED_CHANGED="expandedChanged",n.EVENT_EXPANDABLE_CHANGED="expandableChanged",Bc([Se],n.prototype,"destroy",null),n}(),kc={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function Ea(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];for(var e=0;e<n.length;e++){var r=n[e];if(P(r))return r}return null}function Wc(n){return n!=null&&n.length>0}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,i){return e?e(r,t[i]):t[i]===r})}function jc(n,t){return _t(n,t)}function _a(n){return n.sort(function(t,e){return t-e})}function Uc(n,t){if(n)for(var e=n.length-2;e>=0;e--){var r=n[e]===t,i=n[e+1]===t;r&&i&&n.splice(e+1,1)}}function tn(n,t){var e=n.indexOf(t);e>=0&&(n[e]=n[n.length-1],n.pop())}function Ve(n,t){var e=n.indexOf(t);e>=0&&n.splice(e,1)}function Ra(n,t){for(var e=0;e<t.length;e++)tn(n,t[e])}function Oa(n,t){for(var e=0;e<t.length;e++)Ve(n,t[e])}function Ur(n,t,e){n.splice(e,0,t)}function zc(n,t,e){if(!(n==null||t==null))for(var r=t.length-1;r>=0;r--){var i=t[r];Ur(n,i,e)}}function rn(n,t,e){Oa(n,t),t.slice().reverse().forEach(function(r){return Ur(n,r,e)})}function $e(n,t){return n.indexOf(t)>-1}function Ta(n){return[].concat.apply([],n)}function on(n,t){t==null||n==null||t.forEach(function(e){return n.push(e)})}function $c(n){return n.map(kr)}function Kc(n,t){if(n!=null)for(var e=n.length-1;e>=0;e--)t(n[e],e)}var Yc=Object.freeze({__proto__:null,firstExistingValue:Ea,existsAndNotEmpty:Wc,last:Q,areEqual:_t,shallowCompare:jc,sortNumerically:_a,removeRepeatsFromArray:Uc,removeFromUnorderedArray:tn,removeFromArray:Ve,removeAllFromUnorderedArray:Ra,removeAllFromArray:Oa,insertIntoArray:Ur,insertArrayIntoArray:zc,moveInArray:rn,includes:$e,flatten:Ta,pushAll:on,toStrings:$c,forEachReverse:Kc}),Pa="__ag_Grid_Stop_Propagation",qc=["touchstart","touchend","touchmove","touchcancel","scroll"],nn={};function dt(n){n[Pa]=!0}function tt(n){return n[Pa]===!0}var sn=function(){var n={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},t=function(e){if(typeof nn[e]=="boolean")return nn[e];var r=document.createElement(n[e]||"div");return e="on"+e,nn[e]=e in r};return t}();function Hi(n,t,e){for(var r=t;r;){var i=n.getDomData(r,e);if(i)return i;r=r.parentElement}return null}function Bi(n,t){return!t||!n?!1:Aa(t).indexOf(n)>=0}function Da(n){for(var t=[],e=n.target;e;)t.push(e),e=e.parentElement;return t}function Aa(n){var t=n;return t.path?t.path:t.composedPath?t.composedPath():Da(t)}function ba(n,t,e,r){var i=$e(qc,e),o=i?{passive:!0}:void 0;n&&n.addEventListener&&n.addEventListener(t,e,r,o)}var Qc=Object.freeze({__proto__:null,stopPropagationForAgGrid:dt,isStopPropagationForAgGrid:tt,isEventSupported:sn,getCtrlForEventTarget:Hi,isElementInEventPath:Bi,createEventPath:Da,getEventPath:Aa,addSafePassiveEventListener:ba}),er=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},D=function(){function n(){var t=this;this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.lastChangeSetIdLookup={},this.propertyListenerId=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 Lt),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 i=this;if(!this.destroyed){t instanceof HTMLElement?ba(this.getFrameworkOverrides(),t,e,r):t.addEventListener(e,r);var o=function(){return t.removeEventListener(e,r),i.destroyFunctions=i.destroyFunctions.filter(function(s){return s!==o}),null};return this.destroyFunctions.push(o),o}},n.prototype.setupGridOptionListener=function(t,e){var r=this;this.gridOptionsService.addEventListener(t,e);var i=function(){return r.gridOptionsService.removeEventListener(t,e),r.destroyFunctions=r.destroyFunctions.filter(function(o){return o!==i}),null};this.destroyFunctions.push(i)},n.prototype.addManagedPropertyListener=function(t,e){this.destroyed||this.setupGridOptionListener(t,e)},n.prototype.addManagedPropertyListeners=function(t,e){var r=this;if(!this.destroyed){var i=t.join("-")+this.propertyListenerId++,o=function(s){if(s.changeSet){if(s.changeSet&&s.changeSet.id===r.lastChangeSetIdLookup[i])return;r.lastChangeSetIdLookup[i]=s.changeSet.id}var a={type:"gridPropertyChanged",changeSet:s.changeSet};e(a)};t.forEach(function(s){return r.setupGridOptionListener(s,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(i){return r.destroyBean(i,e)}),[]},n.EVENT_DESTROYED="destroyed",er([f("frameworkOverrides")],n.prototype,"frameworkOverrides",void 0),er([f("context")],n.prototype,"context",void 0),er([f("eventService")],n.prototype,"eventService",void 0),er([f("gridOptionsService")],n.prototype,"gridOptionsService",void 0),er([f("localeService")],n.prototype,"localeService",void 0),er([f("environment")],n.prototype,"environment",void 0),er([Se],n.prototype,"destroy",null),n}(),Xc=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),ki=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Jc=function(n,t){return function(e,r){t(e,r,n)}},Zc=function(n){Xc(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,i){var o=new _c,s=this.extractExistingTreeData(i),a=s.existingCols,l=s.existingGroups,u=s.existingColKeys;o.addExistingKeys(u);var c=this.recursivelyCreateColumns(e,0,r,a,o,l),p=this.findMaxDept(c,0);this.logger.log("Number of levels for grouped columns is "+p);var d=this.balanceColumnTree(c,0,p,o),h=function(v,y){v instanceof oe&&v.setupExpandable(),v.setOriginalParent(y)};return this.columnUtils.depthFirstOriginalTreeSearch(null,d,h),{columnTree:d,treeDept:p}},t.prototype.extractExistingTreeData=function(e){var r=[],i=[],o=[];return e&&this.columnUtils.depthFirstOriginalTreeSearch(null,e,function(s){if(s instanceof oe){var a=s;i.push(a)}else{var l=s;o.push(l.getId()),r.push(l)}}),{existingCols:r,existingGroups:i,existingColKeys:o}},t.prototype.createForAutoGroups=function(e,r){var i=this;return e.map(function(o){return i.createAutoGroupTreeItem(r,o)})},t.prototype.createAutoGroupTreeItem=function(e,r){for(var i=this.findDepth(e),o=r,s=i-1;s>=0;s--){var a=new oe(null,"FAKE_PATH_".concat(r.getId(),"}_").concat(s),!0,s);this.createBean(a),a.setChildren([o]),o.setOriginalParent(a),o=a}return i===0&&r.setOriginalParent(null),o},t.prototype.findDepth=function(e){for(var r=0,i=e;i&&i[0]&&i[0]instanceof oe;)r++,i=i[0].getChildren();return r},t.prototype.balanceColumnTree=function(e,r,i,o){for(var s=[],a=0;a<e.length;a++){var l=e[a];if(l instanceof oe){var u=l,c=this.balanceColumnTree(u.getChildren(),r+1,i,o);u.setChildren(c),s.push(u)}else{for(var p=void 0,d=void 0,h=i-1;h>=r;h--){var v=o.getUniqueKey(null,null),y=this.createMergedColGroupDef(null),C=new oe(y,v,!0,r);this.createBean(C),d&&d.setChildren([C]),d=C,p||(p=d)}if(p&&d){s.push(p);var m=e.some(function(w){return w instanceof oe});if(m){d.setChildren([l]);continue}else{d.setChildren(e);break}}s.push(l)}}return s},t.prototype.findMaxDept=function(e,r){for(var i=r,o=0;o<e.length;o++){var s=e[o];if(s instanceof oe){var a=s,l=this.findMaxDept(a.getChildren(),r+1);i<l&&(i=l)}}return i},t.prototype.recursivelyCreateColumns=function(e,r,i,o,s,a){if(!e)return[];for(var l=new Array(e.length),u=0;u<l.length;u++){var c=e[u];this.isColumnGroup(c)?l[u]=this.createColumnGroup(i,c,r,o,s,a):l[u]=this.createColumn(i,c,o,s)}return l},t.prototype.createColumnGroup=function(e,r,i,o,s,a){var l=this.createMergedColGroupDef(r),u=s.getUniqueKey(l.groupId||null,null),c=new oe(l,u,!1,i);this.createBean(c);var p=this.findExistingGroup(r,a);p&&a.splice(p.idx,1);var d=p==null?void 0:p.group;d&&c.setExpanded(d.isExpanded());var h=this.recursivelyCreateColumns(l.children,i+1,e,o,s,a);return c.setChildren(h),c},t.prototype.createMergedColGroupDef=function(e){var r={};return Object.assign(r,this.gridOptionsService.get("defaultColGroupDef")),Object.assign(r,e),r},t.prototype.createColumn=function(e,r,i,o){var s=this.findExistingColumn(r,i);s&&(i==null||i.splice(s.idx,1));var a=s==null?void 0:s.column;if(a){var u=this.addColumnDefaultAndTypes(r,a.getColId());a.setColDef(u,r),this.applyColumnState(a,u)}else{var l=o.getUniqueKey(r.colId,r.field),u=this.addColumnDefaultAndTypes(r,l);a=new Z(u,r,l,e),this.context.createBean(a)}return this.dataTypeService.addColumnListeners(a),a},t.prototype.applyColumnState=function(e,r){var i=bt(r.flex);i!==void 0&&e.setFlex(i);var o=e.getFlex()<=0;if(o){var s=bt(r.width);if(s!=null)e.setActualWidth(s);else{var a=e.getActualWidth();e.setActualWidth(a)}}r.sort!==void 0&&(r.sort=="asc"||r.sort=="desc"?e.setSort(r.sort):e.setSort(void 0));var l=bt(r.sortIndex);l!==void 0&&e.setSortIndex(l);var u=Ii(r.hide);u!==void 0&&e.setVisible(!u),r.pinned!==void 0&&e.setPinned(r.pinned)},t.prototype.findExistingColumn=function(e,r){if(r)for(var i=0;i<r.length;i++){var o=r[i].getUserProvidedColDef();if(o){var s=e.colId!=null;if(s){if(r[i].getId()===e.colId)return{idx:i,column:r[i]};continue}var a=e.field!=null;if(a){if(o.field===e.field)return{idx:i,column:r[i]};continue}if(o===e)return{idx:i,column:r[i]}}}},t.prototype.findExistingGroup=function(e,r){var i=e.groupId!=null;if(i)for(var o=0;o<r.length;o++){var s=r[o],a=s.getColGroupDef();if(a&&s.getId()===e.groupId)return{idx:o,group:s}}},t.prototype.addColumnDefaultAndTypes=function(e,r){var i={},o=this.gridOptionsService.get("defaultColDef");Ge(i,o,!1,!0);var s=this.dataTypeService.updateColDefAndGetColumnType(i,e,r);s&&this.assignColumnTypes(s,i),Ge(i,e,!1,!0);var a=this.gridOptionsService.get("autoGroupColumnDef"),l=this.gridOptionsService.isColumnsSortingCoupledToGroup();return e.rowGroup&&a&&l&&Ge(i,{sort:a.sort,initialSort:a.initialSort},!1,!0),this.dataTypeService.validateColDef(i),i},t.prototype.assignColumnTypes=function(e,r){if(e.length){var i=Object.assign({},kc),o=this.gridOptionsService.get("columnTypes")||{};Ce(o,function(s,a){if(s in i)console.warn("AG Grid: the column type '".concat(s,"' is a default column type and cannot be overridden."));else{var l=a;l.type&&B("Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type."),i[s]=a}}),e.forEach(function(s){var a=i[s.trim()];a?Ge(r,a,!1,!0):console.warn("AG Grid: colDef.type '"+s+"' does not correspond to defined gridOptions.columnTypes")})}},t.prototype.isColumnGroup=function(e){return e.children!==void 0},ki([f("columnUtils")],t.prototype,"columnUtils",void 0),ki([f("dataTypeService")],t.prototype,"dataTypeService",void 0),ki([Jc(0,Re("loggerFactory"))],t.prototype,"setBeans",null),t=ki([I("columnFactory")],t),t}(D),ep=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},ce=function(){function n(t,e,r,i){this.displayedChildren=[],this.localEventService=new Lt,this.groupId=e,this.partId=r,this.providedColumnGroup=t,this.pinned=i}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(i){i instanceof n&&i.checkLeft()}),this.displayedChildren.length>0)if(this.gridOptionsService.get("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 Z?t.push(e):e instanceof n&&e.addDisplayedLeafColumns(t)})},n.prototype.addLeafColumns=function(t){this.children.forEach(function(e){e instanceof Z?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(i){var o=i instanceof n&&(!i.displayedChildren||!i.displayedChildren.length);if(!o){var s=i.getColumnGroupShow();switch(s){case"open":e.providedColumnGroup.isExpanded()&&t.displayedChildren.push(i);break;case"closed":e.providedColumnGroup.isExpanded()||t.displayedChildren.push(i);break;default:t.displayedChildren.push(i);break}}}),this.localEventService.dispatchEvent(this.createAgEvent(n.EVENT_DISPLAYED_CHILDREN_CHANGED))},n.EVENT_LEFT_CHANGED="leftChanged",n.EVENT_DISPLAYED_CHILDREN_CHANGED="displayedChildrenChanged",ep([f("gridOptionsService")],n.prototype,"gridOptionsService",void 0),n}(),g=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_SUPPRESS_COLUMN_MOVE_CHANGED="suppressMovableColumns",n.EVENT_SUPPRESS_MENU_HIDE_CHANGED="suppressMenuHide",n.EVENT_SUPPRESS_FIELD_DOT_NOTATION="suppressFieldDotNotation",n.EVENT_VIRTUAL_COLUMNS_CHANGED="virtualColumnsChanged",n.EVENT_ASYNC_TRANSACTIONS_FLUSHED="asyncTransactionsFlushed",n.EVENT_ROW_GROUP_OPENED="rowGroupOpened",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_TOOLTIP_SHOW="tooltipShow",n.EVENT_TOOLTIP_HIDE="tooltipHide",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_ADVANCED_FILTER_BUILDER_VISIBLE_CHANGED="advancedFilterBuilderVisibleChanged",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_PRE_DESTROYED="gridPreDestroyed",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_STATE_UPDATED="stateUpdated",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_STORE_UPDATED="storeUpdated",n.EVENT_FILTER_DESTROYED="filterDestroyed",n.EVENT_ROW_DATA_UPDATE_STARTED="rowDataUpdateStarted",n.EVENT_ROW_COUNT_READY="rowCountReady",n.EVENT_ADVANCED_FILTER_ENABLED_CHANGED="advancedFilterEnabledChanged",n.EVENT_DATA_TYPES_INFERRED="dataTypesInferred",n.EVENT_FIELD_VALUE_CHANGED="fieldValueChanged",n.EVENT_FIELD_PICKER_VALUE_SELECTED="fieldPickerValueSelected",n.EVENT_SIDE_BAR_UPDATED="sideBarUpdated",n}(),Fa=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}(),tp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),an=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},tr="ag-Grid-AutoColumn",rp=function(n){tp(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.createAutoGroupColumns=function(e){var r=this,i=[],o=this.gridOptionsService.get("treeData"),s=this.gridOptionsService.isGroupMultiAutoColumn();return o&&s&&(console.warn('AG Grid: you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),s=!1),s?e.forEach(function(a,l){i.push(r.createOneAutoGroupColumn(a,l))}):i.push(this.createOneAutoGroupColumn()),i},t.prototype.updateAutoGroupColumns=function(e){var r=this;e.forEach(function(i,o){return r.updateOneAutoGroupColumn(i,o)})},t.prototype.createOneAutoGroupColumn=function(e,r){var i;e?i="".concat(tr,"-").concat(e.getId()):i=tr;var o=this.createAutoGroupColDef(i,e,r);o.colId=i;var s=new Z(o,null,i,!0);return this.context.createBean(s),s},t.prototype.updateOneAutoGroupColumn=function(e,r){var i=e.getColDef(),o=typeof i.showRowGroup=="string"?i.showRowGroup:void 0,s=o!=null?this.columnModel.getPrimaryColumn(o):void 0,a=this.createAutoGroupColDef(e.getId(),s??void 0,r);e.setColDef(a,null),this.columnFactory.applyColumnState(e,a)},t.prototype.createAutoGroupColDef=function(e,r,i){var o=this.createBaseColDef(r),s=this.gridOptionsService.get("autoGroupColumnDef");if(Ge(o,s),o=this.columnFactory.addColumnDefaultAndTypes(o,e),!this.gridOptionsService.get("treeData")){var a=V(o.field)&&V(o.valueGetter)&&V(o.filterValueGetter)&&o.filter!=="agGroupColumnFilter";a&&(o.filter=!1)}i&&i>0&&(o.headerCheckboxSelection=!1);var l=this.gridOptionsService.isColumnsSortingCoupledToGroup(),u=o.valueGetter||o.field!=null;return l&&!u&&(o.sortIndex=void 0,o.initialSort=void 0),o},t.prototype.createBaseColDef=function(e){var r=this.gridOptionsService.get("autoGroupColumnDef"),i=this.localeService.getLocaleTextFunc(),o={headerName:i("group","Group")},s=r&&(r.cellRenderer||r.cellRendererSelector);if(s||(o.cellRenderer="agGroupCellRenderer"),e){var a=e.getColDef();Object.assign(o,{headerName:this.columnModel.getDisplayNameForColumn(e,"header"),headerValueGetter:a.headerValueGetter}),a.cellRenderer&&Object.assign(o,{cellRendererParams:{innerRenderer:a.cellRenderer,innerRendererParams:a.cellRendererParams}}),o.showRowGroup=e.getColId()}else o.showRowGroup=!0;return o},an([f("columnModel")],t.prototype,"columnModel",void 0),an([f("columnFactory")],t.prototype,"columnFactory",void 0),t=an([I("autoGroupColService")],t),t}(D),ip=/[&<>"']/g,op={"&":"&","<":"<",">":">",'"':""","'":"'"};function np(n){var t=String.fromCharCode;function e(p){var d=[];if(!p)return[];for(var h=p.length,v=0,y,C;v<h;)y=p.charCodeAt(v++),y>=55296&&y<=56319&&v<h?(C=p.charCodeAt(v++),(C&64512)==56320?d.push(((y&1023)<<10)+(C&1023)+65536):(d.push(y),v--)):d.push(y);return d}function r(p){if(p>=55296&&p<=57343)throw Error("Lone surrogate U+"+p.toString(16).toUpperCase()+" is not a scalar value")}function i(p,d){return t(p>>d&63|128)}function o(p){if(p>=0&&p<=31&&p!==10){var d=p.toString(16).toUpperCase(),h=d.padStart(4,"0");return"_x".concat(h,"_")}if(!(p&4294967168))return t(p);var v="";return p&4294965248?p&4294901760?p&4292870144||(v=t(p>>18&7|240),v+=i(p,12),v+=i(p,6)):(r(p),v=t(p>>12&15|224),v+=i(p,6)):v=t(p>>6&31|192),v+=t(p&63|128),v}for(var s=e(n),a=s.length,l=-1,u,c="";++l<a;)u=s[l],c+=o(u);return c}function sp(n){return n[0].toUpperCase()+n.substring(1).toLowerCase()}function se(n,t){if(n==null)return null;var e=n.toString().toString();return t?e:e.replace(ip,function(r){return op[r]})}function La(n){if(!n||n==null)return null;var t=/([a-z])([A-Z])/g,e=/([A-Z]+)([A-Z])([a-z])/g,r=n.replace(t,"$1 $2").replace(e,"$1 $2$3").replace(/\./g," ").split(" ");return r.map(function(i){return i.substring(0,1).toUpperCase()+(i.length>1?i.substring(1,i.length):"")}).join(" ")}function Ia(n){return n.replace(/[A-Z]/g,function(t){return"-".concat(t.toLocaleLowerCase())})}var ap=Object.freeze({__proto__:null,utf8_encode:np,capitalise:sp,escapeString:se,camelCaseToHumanText:La,camelCaseToHyphenated:Ia});function It(n){var t=new Map;return n.forEach(function(e){return t.set(e[0],e[1])}),t}function lp(n,t){var e=new Map;return n.forEach(function(r){return e.set(t(r),r)}),e}function up(n){var t=[];return n.forEach(function(e,r){return t.push(r)}),t}var cp=Object.freeze({__proto__:null,convertToMap:It,mapById:lp,keys:up}),pp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),ve=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},dp=function(n,t){return function(e,r){t(e,r,n)}},hp=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 i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(e[r[i]]=n[r[i]]);return e},rt=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},it=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},xa=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.")},fp=function(n){pp(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.primaryHeaderRowCount=0,e.secondaryHeaderRowCount=0,e.gridHeaderRowCount=0,e.displayedColumnsLeft=[],e.displayedColumnsRight=[],e.displayedColumnsCenter=[],e.displayedColumns=[],e.displayedColumnsAndGroupsMap={},e.viewportColumns=[],e.viewportColumnsHash="",e.headerViewportColumns=[],e.viewportColumnsCenter=[],e.headerViewportColumnsCenter=[],e.autoHeightActiveAtLeastOnce=!1,e.rowGroupColumns=[],e.valueColumns=[],e.pivotColumns=[],e.ready=!1,e.autoGroupsNeedBuilding=!1,e.forceRecreateAutoGroups=!1,e.pivotMode=!1,e.bodyWidth=0,e.leftWidth=0,e.rightWidth=0,e.bodyWidthDirty=!0,e.shouldQueueResizeOperations=!1,e.resizeOperationQueue=[],e}return t.prototype.init=function(){var e=this;this.suppressColumnVirtualisation=this.gridOptionsService.get("suppressColumnVirtualisation");var r=this.gridOptionsService.get("pivotMode");this.isPivotSettingAllowed(r)&&(this.pivotMode=r),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],function(){return e.buildAutoGroupColumns()}),this.addManagedPropertyListener("autoGroupColumnDef",function(){return e.onAutoGroupColumnDefChanged()}),this.addManagedPropertyListeners(["defaultColDef","columnTypes","suppressFieldDotNotation"],function(i){return e.onSharedColDefChanged(i.source)}),this.addManagedPropertyListener("pivotMode",function(i){return e.setPivotMode(e.gridOptionsService.get("pivotMode"),i.source)}),this.addManagedListener(this.eventService,g.EVENT_FIRST_DATA_RENDERED,function(){return e.onFirstDataRendered()})},t.prototype.buildAutoGroupColumns=function(){this.columnDefs&&(this.autoGroupsNeedBuilding=!0,this.forceRecreateAutoGroups=!0,this.updateGridColumns(),this.updateDisplayedColumns("gridOptionsChanged"))},t.prototype.onAutoGroupColumnDefChanged=function(){this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns)},t.prototype.onSharedColDefChanged=function(e){e===void 0&&(e="api"),this.gridColumns&&(this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns),this.createColumnsFromColumnDefs(!0,e))},t.prototype.setColumnDefs=function(e,r){r===void 0&&(r="api");var i=!!this.columnDefs;this.columnDefs=e,this.createColumnsFromColumnDefs(i,r)},t.prototype.recreateColumnDefs=function(e){e===void 0&&(e="api"),this.onSharedColDefChanged(e)},t.prototype.destroyOldColumns=function(e,r){var i={};if(e){this.columnUtils.depthFirstOriginalTreeSearch(null,e,function(s){i[s.getInstanceId()]=s}),r&&this.columnUtils.depthFirstOriginalTreeSearch(null,r,function(s){i[s.getInstanceId()]=null});var o=Object.values(i).filter(function(s){return s!=null});this.destroyBeans(o)}},t.prototype.destroyColumns=function(){this.destroyOldColumns(this.primaryColumnTree),this.destroyOldColumns(this.secondaryBalancedTree),this.destroyOldColumns(this.groupAutoColsBalancedTree)},t.prototype.createColumnsFromColumnDefs=function(e,r){var i=this;r===void 0&&(r="api");var o=e?this.compareColumnStatesAndDispatchEvents(r):void 0;this.valueCache.expire(),this.autoGroupsNeedBuilding=!0;var s=this.primaryColumns,a=this.primaryColumnTree,l=this.columnFactory.createColumnTree(this.columnDefs,!0,a);this.destroyOldColumns(this.primaryColumnTree,l.columnTree),this.primaryColumnTree=l.columnTree,this.primaryHeaderRowCount=l.treeDept+1,this.primaryColumns=this.getColumnsFromTree(this.primaryColumnTree),this.primaryColumnsMap={},this.primaryColumns.forEach(function(p){return i.primaryColumnsMap[p.getId()]=p}),this.extractRowGroupColumns(r,s),this.extractPivotColumns(r,s),this.extractValueColumns(r,s),this.ready=!0;var u=this.gridColsArePrimary===void 0,c=this.gridColsArePrimary||u||this.autoGroupsNeedBuilding;c&&(this.updateGridColumns(),e&&this.gridColsArePrimary&&!this.gridOptionsService.get("maintainColumnOrder")&&this.orderGridColumnsLikePrimary(),this.updateDisplayedColumns(r),this.checkViewportColumns()),this.dispatchEverythingChanged(r),o&&o(),this.dispatchNewColumnsLoaded(r)},t.prototype.dispatchNewColumnsLoaded=function(e){var r={type:g.EVENT_NEW_COLUMNS_LOADED,source:e};this.eventService.dispatchEvent(r),e==="gridInitializing"&&this.onColumnsReady()},t.prototype.dispatchEverythingChanged=function(e){e===void 0&&(e="api");var r={type:g.EVENT_COLUMN_EVERYTHING_CHANGED,source:e};this.eventService.dispatchEvent(r)},t.prototype.orderGridColumnsLikePrimary=function(){var e=this,r=this.primaryColumns;if(r){var i=r.filter(function(s){return e.gridColumns.indexOf(s)>=0}),o=this.gridColumns.filter(function(s){return i.indexOf(s)<0});this.gridColumns=it(it([],rt(o),!1),rt(i),!1),this.gridColumns=this.placeLockedColumns(this.gridColumns)}},t.prototype.getAllDisplayedAutoHeightCols=function(){return this.displayedAutoHeightCols},t.prototype.setViewport=function(){this.gridOptionsService.get("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,i=[];r!=null;)i.push(r),r=this.getDisplayedColAfter(r);return i},t.prototype.checkViewportColumns=function(e){if(e===void 0&&(e=!1),this.displayedColumnsCenter!=null){var r=this.extractViewport();if(r){var i={type:g.EVENT_VIRTUAL_COLUMNS_CHANGED,afterScroll:e};this.eventService.dispatchEvent(i)}}},t.prototype.setViewportPosition=function(e,r,i){i===void 0&&(i=!1),(e!==this.scrollWidth||r!==this.scrollPosition||this.bodyWidthDirty)&&(this.scrollWidth=e,this.scrollPosition=r,this.bodyWidthDirty=!0,this.setViewport(),this.ready&&this.checkViewportColumns(i))},t.prototype.isPivotMode=function(){return this.pivotMode},t.prototype.isPivotSettingAllowed=function(e){return e&&this.gridOptionsService.get("treeData")?(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.gridColumns)){this.autoGroupsNeedBuilding=!0,this.updateGridColumns(),this.updateDisplayedColumns(r);var i={type:g.EVENT_COLUMN_PIVOT_MODE_CHANGED};this.eventService.dispatchEvent(i)}},t.prototype.getSecondaryPivotColumn=function(e,r){if(V(this.secondaryColumns))return null;var i=this.getPrimaryColumn(r),o=null;return this.secondaryColumns.forEach(function(s){var a=s.getColDef().pivotKeys,l=s.getColDef().pivotValueColumn,u=_t(a,e),c=l===i;u&&c&&(o=s)}),o},t.prototype.setBeans=function(e){this.logger=e.create("columnModel")},t.prototype.setFirstRightAndLastLeftPinned=function(e){var r,i;this.gridOptionsService.get("enableRtl")?(r=this.displayedColumnsLeft?this.displayedColumnsLeft[0]:null,i=this.displayedColumnsRight?Q(this.displayedColumnsRight):null):(r=this.displayedColumnsLeft?Q(this.displayedColumnsLeft):null,i=this.displayedColumnsRight?this.displayedColumnsRight[0]:null),this.gridColumns.forEach(function(o){o.setLastLeftPinned(o===r,e),o.setFirstRightPinned(o===i,e)})},t.prototype.autoSizeColumns=function(e){var r=this;if(this.shouldQueueResizeOperations){this.resizeOperationQueue.push(function(){return r.autoSizeColumns(e)});return}var i=e.columns,o=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=o??this.gridOptionsService.get("skipHeaderOnAutoSize"),h=s??d;p!==0;)p=0,this.actionOnGridColumns(i,function(v){if(c.indexOf(v)>=0)return!1;var y=r.autoWidthCalculator.getPreferredWidthForColumn(v,d);if(y>0){var C=r.normaliseColumnWidth(v,y);v.setActualWidth(C,u),c.push(v),p++}return!0},u);h||this.autoSizeColumnGroupsByColumns(i,u,a),this.dispatchColumnResizedEvent(c,!0,"autosizeColumns")},t.prototype.dispatchColumnResizedEvent=function(e,r,i,o){if(o===void 0&&(o=null),e&&e.length){var s={type:g.EVENT_COLUMN_RESIZED,columns:e,column:e.length===1?e[0]:null,flexColumns:o,finished:r,source:i};this.eventService.dispatchEvent(s)}},t.prototype.dispatchColumnChangedEvent=function(e,r,i){var o={type:e,columns:r,column:r&&r.length==1?r[0]:null,source:i};this.eventService.dispatchEvent(o)},t.prototype.dispatchColumnMovedEvent=function(e){var r=e.movedColumns,i=e.source,o=e.toIndex,s=e.finished,a={type:g.EVENT_COLUMN_MOVED,columns:r,column:r&&r.length===1?r[0]:null,toIndex:o,finished:s,source:i};this.eventService.dispatchEvent(a)},t.prototype.dispatchColumnPinnedEvent=function(e,r){if(e.length){var i=e.length===1?e[0]:null,o=this.getCommonValue(e,function(a){return a.getPinned()}),s={type:g.EVENT_COLUMN_PINNED,pinned:o??null,columns:e,column:i,source:r};this.eventService.dispatchEvent(s)}},t.prototype.dispatchColumnVisibleEvent=function(e,r){if(e.length){var i=e.length===1?e[0]:null,o=this.getCommonValue(e,function(a){return a.isVisible()}),s={type:g.EVENT_COLUMN_VISIBLE,visible:o,columns:e,column:i,source:r};this.eventService.dispatchEvent(s)}},t.prototype.autoSizeColumn=function(e,r,i){i===void 0&&(i="api"),e&&this.autoSizeColumns({columns:[e],skipHeader:r,skipHeaderGroups:!0,source:i})},t.prototype.autoSizeColumnGroupsByColumns=function(e,r,i){var o,s,a,l,u=new Set,c=this.getGridColumns(e);c.forEach(function(E){for(var S=E.getParent();S&&S!=i;)S.isPadding()||u.add(S),S=S.getParent()});var p,d=[];try{for(var h=xa(u),v=h.next();!v.done;v=h.next()){var y=v.value;try{for(var C=(a=void 0,xa(this.ctrlsService.getHeaderRowContainerCtrls())),m=C.next();!m.done;m=C.next()){var w=m.value;if(p=w.getHeaderCtrlForColumn(y),p)break}}catch(E){a={error:E}}finally{try{m&&!m.done&&(l=C.return)&&l.call(C)}finally{if(a)throw a.error}}p&&p.resizeLeafColumnsToFit(r)}}catch(E){o={error:E}}finally{try{v&&!v.done&&(s=h.return)&&s.call(h)}finally{if(o)throw o.error}}return d},t.prototype.autoSizeAllColumns=function(e,r){var i=this;if(r===void 0&&(r="api"),this.shouldQueueResizeOperations){this.resizeOperationQueue.push(function(){return i.autoSizeAllColumns(e,r)});return}var o=this.getAllDisplayedColumns();this.autoSizeColumns({columns:o,skipHeader:e,source:r})},t.prototype.getColumnsFromTree=function(e){var r=[],i=function(o){for(var s=0;s<o.length;s++){var a=o[s];a instanceof Z?r.push(a):a instanceof oe&&i(a.getChildren())}};return i(e),r},t.prototype.getAllDisplayedTrees=function(){return this.displayedTreeLeft&&this.displayedTreeRight&&this.displayedTreeCentre?this.displayedTreeLeft.concat(this.displayedTreeCentre).concat(this.displayedTreeRight):null},t.prototype.getPrimaryColumnTree=function(){return this.primaryColumnTree},t.prototype.getHeaderRowCount=function(){return this.gridHeaderRowCount},t.prototype.getDisplayedTreeLeft=function(){return this.displayedTreeLeft},t.prototype.getDisplayedTreeRight=function(){return this.displayedTreeRight},t.prototype.getDisplayedTreeCentre=function(){return this.displayedTreeCentre},t.prototype.isColumnDisplayed=function(e){return this.getAllDisplayedColumns().indexOf(e)>=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,i,o){for(var s=[],a=null,l=function(p){var d=r[p],h=r.length-p,v=Math.min(d.getColSpan(e),h),y=[d];if(v>1){for(var C=v-1,m=1;m<=C;m++)y.push(r[p+m]);p+=C}var w;if(i?(w=!1,y.forEach(function(S){i(S)&&(w=!0)})):w=!0,w){if(s.length===0&&a){var E=o?o(d):!1;E&&s.push(a)}s.push(d)}a=d,u=p},u,c=0;c<r.length;c++)l(c),c=u;return s},t.prototype.getViewportCenterColumnsForRow=function(e){var r=this;if(!this.colSpanActive)return this.viewportColumnsCenter;var i=function(s){var a=s.getLeft();return P(a)&&a>r.viewportLeft},o=this.suppressColumnVirtualisation?null:this.isColumnInRowViewport.bind(this);return this.getDisplayedColumnsForRow(e,this.displayedColumnsCenter,o,i)},t.prototype.isColumnAtEdge=function(e,r){var i=this.getAllDisplayedColumns();if(!i.length)return!1;var o=r==="first",s;if(e instanceof ce){var a=e.getDisplayedLeafColumns();if(!a.length)return!1;s=o?a[0]:Q(a)}else s=e;return(o?i[0]:Q(i))===s},t.prototype.getAriaColumnIndex=function(e){var r;return e instanceof ce?r=e.getLeafColumns()[0]:r=e,this.getAllGridColumns().indexOf(r)+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,i=r+e.getActualWidth(),o=this.viewportLeft-200,s=this.viewportRight+200,a=r<o&&i<o,l=r>s&&i>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,i,o,s,a){var l=this;if(a===void 0&&(a="api"),!(!e||_e(e))){var u=!1;if(e.forEach(function(p){var d=l.getPrimaryColumn(p);if(d){if(i){if(r.indexOf(d)>=0)return;r.push(d)}else{if(r.indexOf(d)<0)return;Ve(r,d)}o(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,g.EVENT_COLUMN_ROW_GROUP_CHANGED,!0,this.setRowGroupActive.bind(this),r)},t.prototype.setRowGroupActive=function(e,r,i){e!==r.isRowGroupActive()&&(r.setRowGroupActive(e,i),e&&!this.gridOptionsService.get("suppressRowGroupHidesColumns")&&this.setColumnVisible(r,!1,i),!e&&!this.gridOptionsService.get("suppressMakeColumnVisibleAfterUnGroup")&&this.setColumnVisible(r,!0,i))},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),g.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),g.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(i){return i.setPivotActive(!0,r)},g.EVENT_COLUMN_PIVOT_CHANGED,r)},t.prototype.setPivotColumns=function(e,r){r===void 0&&(r="api"),this.setPrimaryColumnList(e,this.pivotColumns,g.EVENT_COLUMN_PIVOT_CHANGED,!0,function(i,o){o.setPivotActive(i,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(i){return i.setPivotActive(!1,r)},g.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,i,o,s,a){var l=this;if(this.gridColumns){var u=new Map;r.forEach(function(c,p){return u.set(c,p)}),r.length=0,P(e)&&e.forEach(function(c){var p=l.getPrimaryColumn(c);p&&r.push(p)}),r.forEach(function(c,p){var d=u.get(c);if(d===void 0){u.set(c,0);return}o&&d!==p||u.delete(c)}),(this.primaryColumns||[]).forEach(function(c){var p=r.indexOf(c)>=0;s(p,c)}),this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(a),this.dispatchColumnChangedEvent(i,it([],rt(u.keys()),!1),a)}},t.prototype.setValueColumns=function(e,r){r===void 0&&(r="api"),this.setPrimaryColumnList(e,this.valueColumns,g.EVENT_COLUMN_VALUE_CHANGED,!1,this.setValueActive.bind(this),r)},t.prototype.setValueActive=function(e,r,i){if(e!==r.isValueActive()&&(r.setValueActive(e,i),e&&!r.getAggFunc())){var o=this.aggFuncService.getDefaultAggFunc(r);r.setAggFunc(o)}},t.prototype.addValueColumns=function(e,r){r===void 0&&(r="api"),this.updatePrimaryColumnList(e,this.valueColumns,!0,this.setValueActive.bind(this,!0),g.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),g.EVENT_COLUMN_VALUE_CHANGED,r)},t.prototype.normaliseColumnWidth=function(e,r){var i=e.getMinWidth();P(i)&&r<i&&(r=i);var o=e.getMaxWidth();return P(o)&&e.isGreaterThanMax(r)&&(r=o),r},t.prototype.getPrimaryOrGridColumn=function(e){var r=this.getPrimaryColumn(e);return r||this.getGridColumn(e)},t.prototype.setColumnWidths=function(e,r,i,o){var s=this;o===void 0&&(o="api");var a=[];e.forEach(function(l){var u=s.getPrimaryOrGridColumn(l.key);if(u){a.push({width:l.newWidth,ratios:[1],columns:[u]});var c=s.gridOptionsService.get("colResizeDefault")==="shift";if(c&&(r=!r),r){var p=s.getDisplayedColAfter(u);if(!p)return;var d=u.getActualWidth()-l.newWidth,h=p.getActualWidth()+d;a.push({width:h,ratios:[1],columns:[p]})}}}),a.length!==0&&this.resizeColumnSets({resizeSets:a,finished:i,source:o})},t.prototype.checkMinAndMaxWidthsForSet=function(e){var r=e.columns,i=e.width,o=0,s=0,a=!0;r.forEach(function(c){var p=c.getMinWidth();o+=p||0;var d=c.getMaxWidth();P(d)&&d>0?s+=d:a=!1});var l=i>=o,u=!a||i<=s;return l&&u},t.prototype.resizeColumnSets=function(e){var r=this,i=e.resizeSets,o=e.finished,s=e.source,a=!i||i.every(function(v){return r.checkMinAndMaxWidthsForSet(v)});if(!a){if(o){var l=i&&i.length>0?i[0].columns:null;this.dispatchColumnResizedEvent(l,o,s)}return}var u=[],c=[];i.forEach(function(v){var y=v.width,C=v.columns,m=v.ratios,w={},E={};C.forEach(function(A){return c.push(A)});for(var S=!0,R=0,T=function(){if(R++,R>1e3)return console.error("AG Grid: infinite loop in resizeColumnSets"),"break";S=!1;var A=[],x=0,G=y;C.forEach(function(j,ee){var ie=E[j.getId()];if(ie)G-=w[j.getId()];else{A.push(j);var J=m[ee];x+=J}});var N=1/x;A.forEach(function(j,ee){var ie=ee===A.length-1,J;ie?J=G:(J=Math.round(m[ee]*y*N),G-=J);var te=j.getMinWidth(),X=j.getMaxWidth();P(te)&&J<te?(J=te,E[j.getId()]=!0,S=!0):P(X)&&X>0&&J>X&&(J=X,E[j.getId()]=!0,S=!0),w[j.getId()]=J})};S;){var F=T();if(F==="break")break}C.forEach(function(A){var x=w[A.getId()],G=A.getActualWidth();G!==x&&(A.setActualWidth(x,s),u.push(A))})});var p=u.length>0,d=[];p&&(d=this.refreshFlexedColumns({resizingCols:c,skipSetLeft:!0}),this.setLeftValues(s),this.updateBodyWidths(),this.checkViewportColumns());var h=c.concat(d);(p||o)&&this.dispatchColumnResizedEvent(h,o,s,d)},t.prototype.setColumnAggFunc=function(e,r,i){if(i===void 0&&(i="api"),!!e){var o=this.getPrimaryColumn(e);o&&(o.setAggFunc(r),this.dispatchColumnChangedEvent(g.EVENT_COLUMN_VALUE_CHANGED,[o],i))}},t.prototype.moveRowGroupColumn=function(e,r,i){if(i===void 0&&(i="api"),!this.isRowGroupEmpty()){var o=this.rowGroupColumns[e],s=this.rowGroupColumns.slice(e,r);this.rowGroupColumns.splice(e,1),this.rowGroupColumns.splice(r,0,o);var a={type:g.EVENT_COLUMN_ROW_GROUP_CHANGED,columns:s,column:s.length===1?s[0]:null,source:i};this.eventService.dispatchEvent(a)}},t.prototype.moveColumns=function(e,r,i,o){if(i===void 0&&(i="api"),o===void 0&&(o=!0),!!this.gridColumns){if(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||(rn(this.gridColumns,s,r),this.updateDisplayedColumns(i),this.dispatchColumnMovedEvent({movedColumns:s,source:i,toIndex:r,finished:o}),this.columnAnimationService.finish())}},t.prototype.doesMovePassRules=function(e,r){var i=this.getProposedColumnOrder(e,r);return this.doesOrderPassRules(i)},t.prototype.doesOrderPassRules=function(e){return!(!this.doesMovePassMarryChildren(e)||!this.doesMovePassLockedPositions(e))},t.prototype.getProposedColumnOrder=function(e,r){var i=this.gridColumns.slice();return rn(i,e,r),i},t.prototype.sortColumnsLikeGridColumns=function(e){var r=this;if(!(!e||e.length<=1)){var i=e.filter(function(o){return r.gridColumns.indexOf(o)<0}).length>0;i||e.sort(function(o,s){var a=r.gridColumns.indexOf(o),l=r.gridColumns.indexOf(s);return a-l})}},t.prototype.doesMovePassLockedPositions=function(e){var r=0,i=!0,o=function(s){return s?s===!0||s==="left"?0:2:1};return e.forEach(function(s){var a=o(s.getColDef().lockPosition);a<r&&(i=!1),r=a}),i},t.prototype.doesMovePassMarryChildren=function(e){var r=!0;return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,function(i){if(i instanceof oe){var o=i,s=o.getColGroupDef(),a=s&&s.marryChildren;if(a){var l=[];o.getLeafColumns().forEach(function(h){var v=e.indexOf(h);l.push(v)});var u=Math.max.apply(Math,l),c=Math.min.apply(Math,l),p=u-c,d=o.getLeafColumns().length-1;p>d&&(r=!1)}}}),r},t.prototype.moveColumn=function(e,r,i){i===void 0&&(i="api"),this.moveColumns([e],r,i)},t.prototype.moveColumnByIndex=function(e,r,i){if(i===void 0&&(i="api"),!!this.gridColumns){var o=this.gridColumns[e];this.moveColumn(o,r,i)}},t.prototype.getColumnDefs=function(){var e=this;if(this.primaryColumns){var r=this.primaryColumns.slice();return this.gridColsArePrimary?r.sort(function(i,o){return e.gridColumns.indexOf(i)-e.gridColumns.indexOf(o)}):this.lastPrimaryOrder&&r.sort(function(i,o){return e.lastPrimaryOrder.indexOf(i)-e.lastPrimaryOrder.indexOf(o)}),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),i=this.getWidthOfColsInList(this.displayedColumnsRight);this.bodyWidthDirty=this.bodyWidth!==e;var o=this.bodyWidth!==e||this.leftWidth!==r||this.rightWidth!==i;if(o){this.bodyWidth=e,this.leftWidth=r,this.rightWidth=i;var s={type:g.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(){var e;return(e=this.gridColumns)!==null&&e!==void 0?e:[]},t.prototype.isEmpty=function(){return _e(this.gridColumns)},t.prototype.isRowGroupEmpty=function(){return _e(this.rowGroupColumns)},t.prototype.setColumnVisible=function(e,r,i){i===void 0&&(i="api"),this.setColumnsVisible([e],r,i)},t.prototype.setColumnsVisible=function(e,r,i){r===void 0&&(r=!1),i===void 0&&(i="api"),this.applyColumnState({state:e.map(function(o){return{colId:typeof o=="string"?o:o.getColId(),hide:!r}})},i)},t.prototype.setColumnPinned=function(e,r,i){i===void 0&&(i="api"),e&&this.setColumnsPinned([e],r,i)},t.prototype.setColumnsPinned=function(e,r,i){if(i===void 0&&(i="api"),!!this.gridColumns){if(this.gridOptionsService.isDomLayout("print")){console.warn("AG Grid: Changing the column pinning status is not allowed with domLayout='print'");return}this.columnAnimationService.start();var o;r===!0||r==="left"?o="left":r==="right"?o="right":o=null,this.actionOnGridColumns(e,function(s){return s.getPinned()!==o?(s.setPinned(o),!0):!1},i,function(){var s={type:g.EVENT_COLUMN_PINNED,pinned:o,column:null,columns:null,source:i};return s}),this.columnAnimationService.finish()}},t.prototype.actionOnGridColumns=function(e,r,i,o){var s=this;if(!_e(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(i),P(o)&&o)){var l=o();l.columns=a,l.column=a.length===1?a[0]:null,this.eventService.dispatchEvent(l)}}},t.prototype.getDisplayedColBefore=function(e){var r=this.getAllDisplayedColumns(),i=r.indexOf(e);return i>0?r[i-1]:null},t.prototype.getDisplayedColAfter=function(e){var r=this.getAllDisplayedColumns(),i=r.indexOf(e);return i<r.length-1?r[i+1]:null},t.prototype.getDisplayedGroupAfter=function(e){return this.getDisplayedGroupAtDirection(e,"After")},t.prototype.getDisplayedGroupBefore=function(e){return this.getDisplayedGroupAtDirection(e,"Before")},t.prototype.getDisplayedGroupAtDirection=function(e,r){for(var i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),o=e.getDisplayedLeafColumns(),s=r==="After"?Q(o):o[0],a="getDisplayedCol".concat(r);;){var l=this[a](s);if(!l)return null;var u=this.getColumnGroupAtLevel(l,i);if(u!==e)return u}},t.prototype.getColumnGroupAtLevel=function(e,r){for(var i=e.getParent(),o,s;;){var a=i.getProvidedColumnGroup();if(o=a.getLevel(),s=i.getPaddingLevel(),o+s<=r)break;i=i.getParent()}return i},t.prototype.isPinningLeft=function(){return this.displayedColumnsLeft.length>0},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,i=e.isPivotActive()?this.pivotColumns.indexOf(e):null,o=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:o,rowGroup:e.isRowGroupActive(),rowGroupIndex:r,pivot:e.isPivotActive(),pivotIndex:i,flex:l};return u},t.prototype.getColumnState=function(){if(V(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=It(this.gridColumns.map(function(i,o){return[i.getColId(),o]}));e.sort(function(i,o){var s=r.has(i.colId)?r.get(i.colId):-1,a=r.has(o.colId)?r.get(o.colId):-1;return s-a})},t.prototype.resetColumnState=function(e){var r=this;if(e===void 0&&(e="api"),!_e(this.primaryColumns)){var i=this.getColumnsFromTree(this.primaryColumnTree),o=[],s=1e3,a=1e3,l=[];this.groupAutoColumns&&(l=l.concat(this.groupAutoColumns)),i&&(l=l.concat(i)),l.forEach(function(u){var c=r.getColumnStateFromColDef(u);V(c.rowGroupIndex)&&c.rowGroup&&(c.rowGroupIndex=s++),V(c.pivotIndex)&&c.pivot&&(c.pivotIndex=a++),o.push(c)}),this.applyColumnState({state:o,applyOrder:!0},e)}},t.prototype.getColumnStateFromColDef=function(e){var r=function(C,m){return C??m??null},i=e.getColDef(),o=r(i.sort,i.initialSort),s=r(i.sortIndex,i.initialSortIndex),a=r(i.hide,i.initialHide),l=r(i.pinned,i.initialPinned),u=r(i.width,i.initialWidth),c=r(i.flex,i.initialFlex),p=r(i.rowGroupIndex,i.initialRowGroupIndex),d=r(i.rowGroup,i.initialRowGroup);p==null&&(d==null||d==!1)&&(p=null,d=null);var h=r(i.pivotIndex,i.initialPivotIndex),v=r(i.pivot,i.initialPivot);h==null&&(v==null||v==!1)&&(h=null,v=null);var y=r(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:o,sortIndex:s,hide:a,pinned:l,width:u,flex:c,rowGroup:d,rowGroupIndex:p,pivot:v,pivotIndex:h,aggFunc:y}},t.prototype.applyColumnState=function(e,r){var i=this;if(_e(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 o=function(u,c,p){var d=i.compareColumnStatesAndDispatchEvents(r);i.autoGroupsNeedBuilding=!0;var h=c.slice(),v={},y={},C=[],m=[],w=0,E=i.rowGroupColumns.slice(),S=i.pivotColumns.slice();u.forEach(function(A){var x=A.colId||"",G=x.startsWith(tr);if(G){C.push(A),m.push(A);return}var N=p(x);N?(i.syncColumnWithStateItem(N,A,e.defaultState,v,y,!1,r),Ve(h,N)):(m.push(A),w+=1)});var R=function(A){return i.syncColumnWithStateItem(A,null,e.defaultState,v,y,!1,r)};h.forEach(R);var T=function(A,x,G,N){var j=A[G.getId()],ee=A[N.getId()],ie=j!=null,J=ee!=null;if(ie&&J)return j-ee;if(ie)return-1;if(J)return 1;var te=x.indexOf(G),X=x.indexOf(N),Ne=te>=0,ut=X>=0;return Ne&&ut?te-X:Ne?-1:1};i.rowGroupColumns.sort(T.bind(i,v,E)),i.pivotColumns.sort(T.bind(i,y,S)),i.updateGridColumns();var F=i.groupAutoColumns?i.groupAutoColumns.slice():[];return C.forEach(function(A){var x=i.getAutoColumn(A.colId);Ve(F,x),i.syncColumnWithStateItem(x,A,e.defaultState,null,null,!0,r)}),F.forEach(R),i.applyOrderAfterApplyState(e),i.updateDisplayedColumns(r),i.dispatchEverythingChanged(r),d(),{unmatchedAndAutoStates:m,unmatchedCount:w}};this.columnAnimationService.start();var s=o(e.state||[],this.primaryColumns||[],function(u){return i.getPrimaryColumn(u)}),a=s.unmatchedAndAutoStates,l=s.unmatchedCount;return(a.length>0||P(e.defaultState))&&(l=o(a,this.secondaryColumns||[],function(u){return i.getSecondaryColumn(u)}).unmatchedCount),this.columnAnimationService.finish(),l===0},t.prototype.applyOrderAfterApplyState=function(e){var r=this;if(!(!e.applyOrder||!e.state)){var i=[],o={};e.state.forEach(function(a){if(!(!a.colId||o[a.colId])){var l=r.gridColumnsMap[a.colId];l&&(i.push(l),o[a.colId]=!0)}});var s=0;if(this.gridColumns.forEach(function(a){var l=a.getColId(),u=o[l]!=null;if(!u){var c=l.startsWith(tr);c?Ur(i,a,s++):i.push(a)}}),i=this.placeLockedColumns(i),!this.doesMovePassMarryChildren(i)){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=i}},t.prototype.compareColumnStatesAndDispatchEvents=function(e){var r=this,i={rowGroupColumns:this.rowGroupColumns.slice(),pivotColumns:this.pivotColumns.slice(),valueColumns:this.valueColumns.slice()},o=this.getColumnState(),s={};return o.forEach(function(a){s[a.colId]=a}),function(){var a=r.getPrimaryAndSecondaryAndAutoColumns(),l=function(m,w,E,S){var R=w.map(S),T=E.map(S),F=_t(R,T);if(!F){var A=new Set(w);E.forEach(function(N){A.delete(N)||A.add(N)});var x=it([],rt(A),!1),G={type:m,columns:x,column:x.length===1?x[0]:null,source:e};r.eventService.dispatchEvent(G)}},u=function(m){var w=[];return a.forEach(function(E){var S=s[E.getColId()];S&&m(S,E)&&w.push(E)}),w},c=function(m){return m.getColId()};l(g.EVENT_COLUMN_ROW_GROUP_CHANGED,i.rowGroupColumns,r.rowGroupColumns,c),l(g.EVENT_COLUMN_PIVOT_CHANGED,i.pivotColumns,r.pivotColumns,c);var p=function(m,w){var E=m.aggFunc!=null,S=E!=w.isValueActive(),R=E&&m.aggFunc!=w.getAggFunc();return S||R},d=u(p);d.length>0&&r.dispatchColumnChangedEvent(g.EVENT_COLUMN_VALUE_CHANGED,d,e);var h=function(m,w){return m.width!=w.getActualWidth()};r.dispatchColumnResizedEvent(u(h),!0,e);var v=function(m,w){return m.pinned!=w.getPinned()};r.dispatchColumnPinnedEvent(u(v),e);var y=function(m,w){return m.hide==w.isVisible()};r.dispatchColumnVisibleEvent(u(y),e);var C=function(m,w){return m.sort!=w.getSort()||m.sortIndex!=w.getSortIndex()};u(C).length>0&&r.sortController.dispatchSortChangedEvents(e),r.normaliseColumnMovedEventForColumnState(o,e)}},t.prototype.getCommonValue=function(e,r){if(!(!e||e.length==0)){for(var i=r(e[0]),o=1;o<e.length;o++)if(i!==r(e[o]))return;return i}},t.prototype.normaliseColumnMovedEventForColumnState=function(e,r){var i=this,o=this.getColumnState(),s={};o.forEach(function(p){return s[p.colId]=p});var a={};e.forEach(function(p){s[p.colId]&&(a[p.colId]=!0)});var l=e.filter(function(p){return a[p.colId]}),u=o.filter(function(p){return a[p.colId]}),c=[];u.forEach(function(p,d){var h=l&&l[d];if(h&&h.colId!==p.colId){var v=i.getGridColumn(h.colId);v&&c.push(v)}}),c.length&&this.dispatchColumnMovedEvent({movedColumns:c,source:r,finished:!0})},t.prototype.syncColumnWithStateItem=function(e,r,i,o,s,a,l){if(e){var u=function(x,G){var N={value1:void 0,value2:void 0},j=!1;return r&&(r[x]!==void 0&&(N.value1=r[x],j=!0),P(G)&&r[G]!==void 0&&(N.value2=r[G],j=!0)),!j&&i&&(i[x]!==void 0&&(N.value1=i[x]),P(G)&&i[G]!==void 0&&(N.value2=i[G])),N},c=u("hide").value1;c!==void 0&&e.setVisible(!c,l);var p=u("pinned").value1;p!==void 0&&e.setPinned(p);var d=this.columnUtils.calculateColMinWidth(e.getColDef()),h=u("flex").value1;h!==void 0&&e.setFlex(h);var v=e.getFlex()<=0;if(v){var y=u("width").value1;y!=null&&d!=null&&y>=d&&e.setActualWidth(y,l)}var C=u("sort").value1;C!==void 0&&(C==="desc"||C==="asc"?e.setSort(C,l):e.setSort(void 0,l));var m=u("sortIndex").value1;if(m!==void 0&&e.setSortIndex(m),!(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))):(P(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),Ve(this.valueColumns,e))));var E=u("rowGroup","rowGroupIndex"),S=E.value1,R=E.value2;(S!==void 0||R!==void 0)&&(typeof R=="number"||S?(e.isRowGroupActive()||(e.setRowGroupActive(!0,l),this.rowGroupColumns.push(e)),o&&typeof R=="number"&&(o[e.getId()]=R)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,l),Ve(this.rowGroupColumns,e)));var T=u("pivot","pivotIndex"),F=T.value1,A=T.value2;(F!==void 0||A!==void 0)&&(typeof A=="number"||F?(e.isPivotActive()||(e.setPivotActive(!0,l),this.pivotColumns.push(e)),s&&typeof A=="number"&&(s[e.getId()]=A)):e.isPivotActive()&&(e.setPivotActive(!1,l),Ve(this.pivotColumns,e)))}}},t.prototype.getGridColumns=function(e){return this.getColumns(e,this.getGridColumn.bind(this))},t.prototype.getColumns=function(e,r){var i=[];return e&&e.forEach(function(o){var s=r(o);s&&i.push(s)}),i},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.lookupGridColumn=function(e){return this.gridColumnsMap[e]},t.prototype.getSecondaryColumn=function(e){return this.secondaryColumns?this.getColumn(e,this.secondaryColumns,this.secondaryColumnsMap):null},t.prototype.getColumn=function(e,r,i){if(!e||!i)return null;if(typeof e=="string"&&i[e])return i[e];for(var o=0;o<r.length;o++)if(this.columnsMatch(r[o],e))return r[o];return this.getAutoColumn(e)},t.prototype.getSourceColumnsForGroupColumn=function(e){var r=e.getColDef().showRowGroup;if(!r)return null;if(r===!0)return this.rowGroupColumns.slice(0);var i=this.getPrimaryColumn(r);return i?[i]:null},t.prototype.getAutoColumn=function(e){var r=this;return!this.groupAutoColumns||!P(this.groupAutoColumns)||V(this.groupAutoColumns)?null:this.groupAutoColumns.find(function(i){return r.columnsMatch(i,e)})||null},t.prototype.columnsMatch=function(e,r){var i=e===r,o=e.getColDef()===r,s=e.getColId()==r;return i||o||s},t.prototype.getDisplayNameForColumn=function(e,r,i){if(i===void 0&&(i=!1),!e)return null;var o=this.getHeaderName(e.getColDef(),e,null,null,r);return i?this.wrapHeaderNameWithAggFunc(e,o):o},t.prototype.getDisplayNameForProvidedColumnGroup=function(e,r,i){var o=r?r.getColGroupDef():null;return o?this.getHeaderName(o,null,e,r,i):null},t.prototype.getDisplayNameForColumnGroup=function(e,r){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),r)},t.prototype.getHeaderName=function(e,r,i,o,s){var a=e.headerValueGetter;if(a){var l={colDef:e,column:r,columnGroup:i,providedColumnGroup:o,location:s,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};return typeof a=="function"?a(l):typeof a=="string"?this.expressionService.evaluate(a,l):(console.warn("AG Grid: headerValueGetter must be a function or a string"),"")}else{if(e.headerName!=null)return e.headerName;if(e.field)return La(e.field)}return""},t.prototype.wrapHeaderNameWithAggFunc=function(e,r){if(this.gridOptionsService.get("suppressAggFuncInHeader"))return r;var i=e.getColDef().pivotValueColumn,o=P(i),s=null,a;if(o){var l=this.gridOptionsService.get("removePivotHeaderRowWhenSingleValueColumn")&&this.valueColumns.length===1,u=e.getColDef().pivotTotalColumnIds!==void 0;if(l&&!u)return r;s=i?i.getAggFunc():null,a=!0}else{var c=e.isValueActive(),p=this.pivotMode||!this.isRowGroupEmpty();c&&p?(s=e.getAggFunc(),a=!0):a=!1}if(a){var d=typeof s=="string"?s:"func",h=this.localeService.getLocaleTextFunc(),v=h(d,d);return"".concat(v,"(").concat(r,")")}return r},t.prototype.getColumnGroup=function(e,r){if(!e)return null;if(e instanceof ce)return e;var i=this.getAllDisplayedTrees(),o=typeof r=="number",s=null;return this.columnUtils.depthFirstAllColumnTreeSearch(i,function(a){if(a instanceof ce){var l=a,u=void 0;o?u=e===l.getGroupId()&&r===l.getPartId():u=e===l.getGroupId(),u&&(s=l)}}),s},t.prototype.isReady=function(){return this.ready},t.prototype.extractValueColumns=function(e,r){this.valueColumns=this.extractColumns(r,this.valueColumns,function(i,o){return i.setValueActive(o,e)},function(){},function(){},function(i){var o=i.aggFunc;if(o===null||o==="")return null;if(o!==void 0)return!!o},function(i){return i.initialAggFunc!=null&&i.initialAggFunc!=""}),this.valueColumns.forEach(function(i){var o=i.getColDef();o.aggFunc!=null&&o.aggFunc!=""?i.setAggFunc(o.aggFunc):i.getAggFunc()||i.setAggFunc(o.initialAggFunc)})},t.prototype.extractRowGroupColumns=function(e,r){this.rowGroupColumns=this.extractColumns(r,this.rowGroupColumns,function(i,o){return i.setRowGroupActive(o,e)},function(i){return i.rowGroupIndex},function(i){return i.initialRowGroupIndex},function(i){return i.rowGroup},function(i){return i.initialRowGroup})},t.prototype.extractColumns=function(e,r,i,o,s,a,l){e===void 0&&(e=[]),r===void 0&&(r=[]);var u=[],c=[];(this.primaryColumns||[]).forEach(function(h){var v=e.indexOf(h)<0,y=h.getColDef(),C=Ii(a(y)),m=Ii(l(y)),w=bt(o(y)),E=bt(s(y)),S,R=C!==void 0,T=w!==void 0,F=m!==void 0,A=E!==void 0;if(R?S=C:T?w===null?S=!1:S=w>=0:v?F?S=m:A?S=E!=null&&E>=0:S=!1:S=r.indexOf(h)>=0,S){var x=v?w!=null||E!=null:w!=null;x?u.push(h):c.push(h)}});var p=function(h){var v=o(h.getColDef()),y=s(h.getColDef());return v??y};u.sort(function(h,v){var y=p(h),C=p(v);return y===C?0:y<C?-1:1});var d=[].concat(u);return r.forEach(function(h){c.indexOf(h)>=0&&d.push(h)}),c.forEach(function(h){d.indexOf(h)<0&&d.push(h)}),r.forEach(function(h){d.indexOf(h)<0&&i(h,!1)}),d.forEach(function(h){r.indexOf(h)<0&&i(h,!0)}),d},t.prototype.extractPivotColumns=function(e,r){this.pivotColumns=this.extractColumns(r,this.pivotColumns,function(i,o){return i.setPivotActive(o,e)},function(i){return i.pivotIndex},function(i){return i.initialPivotIndex},function(i){return i.pivot},function(i){return i.initialPivot})},t.prototype.resetColumnGroupState=function(e){if(e===void 0&&(e="api"),!!this.primaryColumnTree){var r=[];this.columnUtils.depthFirstOriginalTreeSearch(null,this.primaryColumnTree,function(i){if(i instanceof oe){var o=i.getColGroupDef(),s={groupId:i.getGroupId(),open:o?o.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 oe&&e.push({groupId:r.getGroupId(),open:r.isExpanded()})}),e},t.prototype.setColumnGroupState=function(e,r){var i=this;if(r===void 0&&(r="api"),!!this.gridBalancedTree){this.columnAnimationService.start();var o=[];if(e.forEach(function(a){var l=a.groupId,u=a.open,c=i.getProvidedColumnGroup(l);c&&c.isExpanded()!==u&&(i.logger.log("columnGroupOpened("+c.getGroupId()+","+u+")"),c.setExpanded(u),o.push(c))}),this.updateGroupsAndDisplayedColumns(r),this.setFirstRightAndLastLeftPinned(r),o.length){var s={type:g.EVENT_COLUMN_GROUP_OPENED,columnGroup:oe.length===1?o[0]:void 0,columnGroups:o};this.eventService.dispatchEvent(s)}this.columnAnimationService.finish()}},t.prototype.setColumnGroupOpened=function(e,r,i){i===void 0&&(i="api");var o;e instanceof oe?o=e.getId():o=e||"",this.setColumnGroupState([{groupId:o,open:r}],i)},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(i){i instanceof oe&&i.getId()===e&&(r=i)}),r},t.prototype.calculateColumnsForDisplay=function(){var e=this,r;return this.pivotMode&&V(this.secondaryColumns)?r=this.gridColumns.filter(function(i){var o=e.groupAutoColumns&&$e(e.groupAutoColumns,i),s=e.valueColumns&&$e(e.valueColumns,i);return o||s}):r=this.gridColumns.filter(function(i){var o=e.groupAutoColumns&&$e(e.groupAutoColumns,i);return o||i.isVisible()}),r},t.prototype.checkColSpanActiveInCols=function(e){var r=!1;return e.forEach(function(i){P(i.getColDef().colSpan)&&(r=!0)}),r},t.prototype.calculateColumnsForGroupDisplay=function(){var e=this;this.groupDisplayColumns=[],this.groupDisplayColumnsMap={};var r=function(i){var o=i.getColDef(),s=o.showRowGroup;o&&P(s)&&(e.groupDisplayColumns.push(i),typeof s=="string"?e.groupDisplayColumnsMap[s]=i:s===!0&&e.getRowGroupColumns().forEach(function(a){e.groupDisplayColumnsMap[a.getId()]=i}))};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 P(this.secondaryColumns)},t.prototype.setSecondaryColumns=function(e,r){var i=this;if(r===void 0&&(r="api"),!!this.gridColumns){var o=e&&e.length>0;if(!(!o&&V(this.secondaryColumns))){if(o){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 i.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"),i=this.gridOptionsService.get("processPivotResultColGroupDef");if(!(!r&&!i)){var o=function(s){s.forEach(function(a){var l=P(a.children);if(l){var u=a;i&&i(u),o(u.children)}else{var c=a;r&&r(c)}})};e&&o(e)}},t.prototype.updateGridColumns=function(){var e=this,r=this.gridBalancedTree;this.gridColsArePrimary?this.lastPrimaryOrder=this.gridColumns:this.lastSecondaryOrder=this.gridColumns;var i;if(this.secondaryColumns&&this.secondaryBalancedTree){var o=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,o&&(i=this.lastSecondaryOrder)}else this.primaryColumns&&(this.gridBalancedTree=this.primaryColumnTree.slice(),this.gridHeaderRowCount=this.primaryHeaderRowCount,this.gridColumns=this.primaryColumns.slice(),this.gridColsArePrimary=!0,i=this.lastPrimaryOrder);var s=this.createGroupAutoColumnsIfNeeded();if(s&&i){var a=It(this.groupAutoColumns.map(function(u){return[u,!0]}));i=i.filter(function(u){return!a.has(u)}),i=it(it([],rt(this.groupAutoColumns),!1),rt(i),!1)}if(this.addAutoGroupToGridColumns(),this.orderGridColsLike(i),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:g.EVENT_GRID_COLUMNS_CHANGED};this.eventService.dispatchEvent(l)}},t.prototype.setAutoHeightActive=function(){if(this.autoHeightActive=this.gridColumns.filter(function(r){return r.isAutoHeight()}).length>0,this.autoHeightActive){this.autoHeightActiveAtLeastOnce=!0;var e=this.gridOptionsService.isRowModelType("clientSide")||this.gridOptionsService.isRowModelType("serverSide");e||B("autoHeight columns only work with Client Side Row Model and Server Side Row Model.")}},t.prototype.orderGridColsLike=function(e){if(!V(e)){var r=It(e.map(function(c,p){return[c,p]})),i=!0;if(this.gridColumns.forEach(function(c){r.has(c)&&(i=!1)}),!i){var o=It(this.gridColumns.map(function(c){return[c,!0]})),s=e.filter(function(c){return o.has(c)}),a=It(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 h=p.getLeafColumns();h.forEach(function(C){var m=u.indexOf(C)>=0,w=d.indexOf(C)<0;m&&w&&d.push(C)}),p=p.getOriginalParent()}if(!d.length){u.push(c);return}var v=d.map(function(C){return u.indexOf(C)}),y=Math.max.apply(Math,it([],rt(v),!1));Ur(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.get("includeHiddenColumnsInQuickFilter")?r:r.filter(function(i){return i.isVisible()||i.isRowGroupActive()})},t.prototype.placeLockedColumns=function(e){var r=[],i=[],o=[];return e.forEach(function(s){var a=s.getColDef().lockPosition;a==="right"?o.push(s):a==="left"||a===!0?r.push(s):i.push(s)}),it(it(it([],rt(r),!1),rt(i),!1),rt(o),!1)},t.prototype.addAutoGroupToGridColumns=function(){if(V(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:g.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.get("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 i=this.primaryColumns.slice(0),o=this.gridOptionsService.get("enableRtl");[this.displayedColumnsLeft,this.displayedColumnsRight,this.displayedColumnsCenter].forEach(function(s){if(o){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()})}Ra(i,s)}),i.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 ce){var i=r;i.checkLeft()}})})},t.prototype.derivedDisplayedColumnsFromDisplayedTree=function(e,r){r.length=0,this.columnUtils.depthFirstDisplayedColumnTreeSearch(e,function(i){i instanceof Z&&r.push(i)})},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 i;switch(e){case"left":i=this.viewportRowLeft[r];break;case"right":i=this.viewportRowRight[r];break;default:i=this.viewportRowCenter[r];break}return V(i)&&(i=[]),i},t.prototype.calculateHeaderRows=function(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={};var e={};this.headerViewportColumns.forEach(function(i){return e[i.getId()]=!0});var r=function(i,o,s){for(var a=!1,l=0;l<i.length;l++){var u=i[l],c=!1;if(u instanceof Z)c=e[u.getId()]===!0;else{var p=u,d=p.getDisplayedChildren();d&&(c=r(d,o,s+1))}c&&(a=!0,o[s]||(o[s]=[]),o[s].push(u))}return a};r(this.displayedTreeLeft,this.viewportRowLeft,0),r(this.displayedTreeRight,this.viewportRowRight,0),r(this.displayedTreeCentre,this.viewportRowCenter,0)},t.prototype.extractViewport=function(){var e=function(o){return"".concat(o.getId(),"-").concat(o.getPinned()||"normal")};this.extractViewportColumns();var r=this.viewportColumns.map(e).join("#"),i=this.viewportColumnsHash!==r;return i&&(this.viewportColumnsHash=r,this.calculateHeaderRows()),i},t.prototype.refreshFlexedColumns=function(e){var r;e===void 0&&(e={});var i=e.source?e.source:"flex";if(e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];var o=-1;if(e.resizingCols){for(var s=new Set(e.resizingCols),a=this.displayedColumnsCenter,l=a.length-1;l>=0;l--)if(s.has(a[l])){o=l;break}}for(var u=0,c=[],p=0,d=0,l=0;l<this.displayedColumnsCenter.length;l++){var h=this.displayedColumnsCenter[l].getFlex()&&l>o;h?(c.push(this.displayedColumnsCenter[l]),d+=this.displayedColumnsCenter[l].getFlex(),p+=(r=this.displayedColumnsCenter[l].getMinWidth())!==null&&r!==void 0?r:0):u+=this.displayedColumnsCenter[l].getActualWidth()}if(!c.length)return[];var v=[];u+p>this.flexViewportWidth&&(c.forEach(function(A){var x;return A.setActualWidth((x=A.getMinWidth())!==null&&x!==void 0?x:0,i)}),v=c,c=[]);var y=[],C;e:for(;;){C=this.flexViewportWidth-u;for(var m=C/d,l=0;l<c.length;l++){var w=c[l],E=m*w.getFlex(),S=0,R=w.getMinWidth(),T=w.getMaxWidth();if(P(R)&&E<R?S=R:P(T)&&E>T&&(S=T),S){w.setActualWidth(S,i),tn(c,w),d-=w.getFlex(),v.push(w),u+=w.getActualWidth();continue e}y[l]=Math.round(E)}break}var F=C;return c.forEach(function(A,x){A.setActualWidth(Math.min(y[x],F),i),v.push(A),F-=y[x]}),e.skipSetLeft||this.setLeftValues(i),e.updateBodyWidths&&this.updateBodyWidths(),e.fireResizedEvent&&this.dispatchColumnResizedEvent(v,!0,i,c),c},t.prototype.sizeColumnsToFit=function(e,r,i,o){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,i,o)});return}var d={};o&&((a=o==null?void 0:o.columnLimits)===null||a===void 0||a.forEach(function(X){var Ne=X.key,ut=hp(X,["key"]);d[typeof Ne=="string"?Ne:Ne.getColId()]=ut}));var h=this.getAllDisplayedColumns(),v=e===this.getWidthOfColsInList(h);if(!(e<=0||!h.length||v)){var y=[],C=[];h.forEach(function(X){X.getColDef().suppressSizeToFit===!0?C.push(X):y.push(X)});var m=y.slice(0),w=!1,E=function(X){Ve(y,X),C.push(X)};for(y.forEach(function(X){var Ne,ut;X.resetActualWidth(r);var At=d==null?void 0:d[X.getId()],sa=(Ne=At==null?void 0:At.minWidth)!==null&&Ne!==void 0?Ne:o==null?void 0:o.defaultMinWidth,aa=(ut=At==null?void 0:At.maxWidth)!==null&&ut!==void 0?ut:o==null?void 0:o.defaultMaxWidth,mc=X.getActualWidth();typeof sa=="number"&&mc<sa?X.setActualWidth(sa,r,!0):typeof aa=="number"&&mc>aa&&X.setActualWidth(aa,r,!0)});!w;){w=!0;var S=e-this.getWidthOfColsInList(C);if(S<=0)y.forEach(function(X){var Ne,ut,At=(ut=(Ne=d==null?void 0:d[X.getId()])===null||Ne===void 0?void 0:Ne.minWidth)!==null&&ut!==void 0?ut:o==null?void 0:o.defaultMinWidth;if(typeof At=="number"){X.setActualWidth(At,r,!0);return}X.setMinimum(r)});else for(var R=S/this.getWidthOfColsInList(y),T=S,F=y.length-1;F>=0;F--){var A=y[F],x=d==null?void 0:d[A.getId()],G=(l=x==null?void 0:x.minWidth)!==null&&l!==void 0?l:o==null?void 0:o.defaultMinWidth,N=(u=x==null?void 0:x.maxWidth)!==null&&u!==void 0?u:o==null?void 0:o.defaultMaxWidth,j=(c=A.getMinWidth())!==null&&c!==void 0?c:0,ee=(p=A.getMaxWidth())!==null&&p!==void 0?p:Number.MAX_VALUE,ie=typeof G=="number"&&G>j?G:A.getMinWidth(),J=typeof N=="number"&&N<ee?N:A.getMaxWidth(),te=Math.round(A.getActualWidth()*R);P(ie)&&te<ie?(te=ie,E(A),w=!1):P(J)&&te>J?(te=J,E(A),w=!1):F===0&&(te=T),A.setActualWidth(te,r,!0),T-=te}}m.forEach(function(X){X.fireColumnWidthChangedEvent(r)}),this.setLeftValues(r),this.updateBodyWidths(),!i&&this.dispatchColumnResizedEvent(m,!0,r)}},t.prototype.buildDisplayedTrees=function(e){var r=[],i=[],o=[];e.forEach(function(a){switch(a.getPinned()){case"left":r.push(a);break;case"right":i.push(a);break;default:o.push(a);break}});var s=new Fa;this.displayedTreeLeft=this.displayedGroupCreator.createDisplayedGroups(r,s,"left",this.displayedTreeLeft),this.displayedTreeRight=this.displayedGroupCreator.createDisplayedGroups(i,s,"right",this.displayedTreeRight),this.displayedTreeCentre=this.displayedGroupCreator.createDisplayedGroups(o,s,null,this.displayedTreeCentre),this.updateDisplayedMap()},t.prototype.updateDisplayedMap=function(){var e=this;this.displayedColumnsAndGroupsMap={};var r=function(i){e.displayedColumnsAndGroupsMap[i.getUniqueId()]=i};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){r instanceof ce&&r.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),i=this.pivotMode?this.gridOptionsService.get("pivotSuppressAutoColumn"):this.isGroupSuppressAutoColumn(),o=this.rowGroupColumns.length>0||this.gridOptionsService.get("treeData"),s=o&&!i&&!r;if(s){var a=this.autoGroupColService.createAutoGroupColumns(this.rowGroupColumns),l=!this.autoColsEqual(a,this.groupAutoColumns);if(l||e)return this.groupAutoColumns=a,!0}else this.groupAutoColumns=null;return!1},t.prototype.isGroupSuppressAutoColumn=function(){var e=this.gridOptionsService.get("groupDisplayType"),r=e==="custom";if(r)return!0;var i=this.gridOptionsService.get("treeDataDisplayType");return i==="custom"},t.prototype.autoColsEqual=function(e,r){return _t(e,r,function(i,o){return i.getColId()===o.getColId()})},t.prototype.getWidthOfColsInList=function(e){return e.reduce(function(r,i){return r+i.getActualWidth()},0)},t.prototype.getFirstDisplayedColumn=function(){var e=this.gridOptionsService.get("enableRtl"),r=["getDisplayedLeftColumns","getDisplayedCenterColumns","getDisplayedRightColumns"];e&&r.reverse();for(var i=0;i<r.length;i++){var o=this[r[i]]();if(o.length)return e?Q(o):o[0]}return null},t.prototype.setColumnHeaderHeight=function(e,r){var i=e.setAutoHeaderHeight(r);if(i){var o={type:g.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,column:e,columns:[e],source:"autosizeColumnHeaderHeight"};this.eventService.dispatchEvent(o)}},t.prototype.getColumnGroupHeaderRowHeight=function(){return this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight()},t.prototype.getColumnHeaderRowHeight=function(){var e=this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),r=this.getAllDisplayedColumns().filter(function(i){return i.isAutoHeaderHeight()}).map(function(i){return i.getAutoHeaderHeight()||0});return Math.max.apply(Math,it([e],rt(r),!1))},t.prototype.getHeaderHeight=function(){var e;return(e=this.gridOptionsService.get("headerHeight"))!==null&&e!==void 0?e:this.environment.getFromTheme(25,"headerHeight")},t.prototype.getFloatingFiltersHeight=function(){var e;return(e=this.gridOptionsService.get("floatingFiltersHeight"))!==null&&e!==void 0?e:this.getHeaderHeight()},t.prototype.getGroupHeaderHeight=function(){var e;return(e=this.gridOptionsService.get("groupHeaderHeight"))!==null&&e!==void 0?e:this.getHeaderHeight()},t.prototype.getPivotHeaderHeight=function(){var e;return(e=this.gridOptionsService.get("pivotHeaderHeight"))!==null&&e!==void 0?e:this.getHeaderHeight()},t.prototype.getPivotGroupHeaderHeight=function(){var e;return(e=this.gridOptionsService.get("pivotGroupHeaderHeight"))!==null&&e!==void 0?e:this.getGroupHeaderHeight()},t.prototype.queueResizeOperations=function(){this.shouldQueueResizeOperations=!0},t.prototype.processResizeOperations=function(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(function(e){return e()}),this.resizeOperationQueue=[]},t.prototype.resetColumnDefIntoColumn=function(e,r){var i=e.getUserProvidedColDef();if(!i)return!1;var o=this.columnFactory.addColumnDefaultAndTypes(i,e.getColId());return e.setColDef(o,i,r),!0},t.prototype.isColumnGroupingLocked=function(e){var r=this.gridOptionsService.get("groupLockGroupColumns");if(!e.isRowGroupActive()||r===0)return!1;if(r===-1)return!0;var i=this.rowGroupColumns.findIndex(function(o){return o.getColId()===e.getColId()});return r>i},t.prototype.generateColumnStateForRowGroupAndPivotIndexes=function(e,r){var i=this,o={},s=function(a,l,u,c,p,d){if(!l.length||!i.primaryColumns)return[];for(var h=Object.keys(a),v=new Set(h),y=new Set(h),C=new Set(l.map(function(G){var N=G.getColId();return y.delete(N),N}).concat(h)),m=[],w={},E=0,S=0;S<i.primaryColumns.length;S++){var R=i.primaryColumns[S].getColId();C.has(R)&&(m.push(R),w[R]=E++)}var T=1e3,F=!1,A=0,x=function(G){for(var N=w[G],j=A;j<N;j++){var ee=m[j];y.has(ee)&&(a[ee][p]=T++,y.delete(ee))}A=N};l.forEach(function(G){var N=G.getColId();if(v.has(N))x(N),a[N][p]=T++;else{var j=G.getColDef(),ee=j[p]===null||j[p]===void 0&&j[d]==null;if(ee){if(!F){var ie=j[u]||j[u]===void 0&&j[c];ie?x(N):(y.forEach(function(J){a[J][p]=T+w[J]}),T+=m.length,F=!0)}o[N]||(o[N]={colId:N}),o[N][p]=T++}}})};return s(e,this.rowGroupColumns,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),s(r,this.pivotColumns,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(o)},t.prototype.onColumnsReady=function(){var e=this,r=this.gridOptionsService.get("autoSizeStrategy");if(r){var i=r.type;setTimeout(function(){if(i==="fitGridWidth"){var o=r.columnLimits,s=r.defaultMinWidth,a=r.defaultMaxWidth,l=o==null?void 0:o.map(function(u){var c=u.colId,p=u.minWidth,d=u.maxWidth;return{key:c,minWidth:p,maxWidth:d}});e.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:s,defaultMaxWidth:a,columnLimits:l})}else i==="fitProvidedWidth"&&e.sizeColumnsToFit(r.width,"sizeColumnsToFit")})}},t.prototype.onFirstDataRendered=function(){var e=this,r=this.gridOptionsService.get("autoSizeStrategy");if((r==null?void 0:r.type)==="fitCellContents"){var i=r.colIds,o=r.skipHeader;setTimeout(function(){i?e.autoSizeColumns({columns:i,skipHeader:o,source:"autosizeColumns"}):e.autoSizeAllColumns(o,"autosizeColumns")})}},ve([f("expressionService")],t.prototype,"expressionService",void 0),ve([f("columnFactory")],t.prototype,"columnFactory",void 0),ve([f("displayedGroupCreator")],t.prototype,"displayedGroupCreator",void 0),ve([f("ctrlsService")],t.prototype,"ctrlsService",void 0),ve([f("autoWidthCalculator")],t.prototype,"autoWidthCalculator",void 0),ve([f("columnUtils")],t.prototype,"columnUtils",void 0),ve([f("columnAnimationService")],t.prototype,"columnAnimationService",void 0),ve([f("autoGroupColService")],t.prototype,"autoGroupColService",void 0),ve([Y("aggFuncService")],t.prototype,"aggFuncService",void 0),ve([Y("valueCache")],t.prototype,"valueCache",void 0),ve([Y("animationFrameService")],t.prototype,"animationFrameService",void 0),ve([f("sortController")],t.prototype,"sortController",void 0),ve([f("columnDefFactory")],t.prototype,"columnDefFactory",void 0),ve([b],t.prototype,"init",null),ve([Se],t.prototype,"destroyColumns",null),ve([dp(0,Re("loggerFactory"))],t.prototype,"setBeans",null),t=ve([I("columnModel")],t),t}(D),vp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),gp=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},yp=function(n){vp(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),i=this.calculateColMaxWidth(e),o,s=bt(e.width),a=bt(e.initialWidth);return s!=null?o=s:a!=null?o=a:o=200,Math.max(Math.min(o,i),r)},t.prototype.getOriginalPathForColumn=function(e,r){var i=[],o=!1,s=function(a,l){for(var u=0;u<a.length;u++){if(o)return;var c=a[u];if(c instanceof oe){var p=c;s(p.getChildren(),l+1),i[l]=c}else c===e&&(o=!0)}};return s(r,0),o?i:null},t.prototype.depthFirstOriginalTreeSearch=function(e,r,i){var o=this;r&&r.forEach(function(s){s instanceof oe&&o.depthFirstOriginalTreeSearch(s,s.getChildren(),i),i(s,e)})},t.prototype.depthFirstAllColumnTreeSearch=function(e,r){var i=this;e&&e.forEach(function(o){o instanceof ce&&i.depthFirstAllColumnTreeSearch(o.getChildren(),r),r(o)})},t.prototype.depthFirstDisplayedColumnTreeSearch=function(e,r){var i=this;e&&e.forEach(function(o){o instanceof ce&&i.depthFirstDisplayedColumnTreeSearch(o.getDisplayedChildren(),r),r(o)})},t=gp([I("columnUtils")],t),t}(D),Cp=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),mp=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Sp=function(n){Cp(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.createDisplayedGroups=function(e,r,i,o){for(var s=this,a=this.mapOldGroupsById(o),l=[],u=e,c=function(){var p=u;u=[];for(var d=0,h=function(R){var T=d;d=R;var F=p[T],A=F instanceof ce?F.getProvidedColumnGroup():F,x=A.getOriginalParent();if(x==null){for(var G=T;G<R;G++)l.push(p[G]);return}for(var N=s.createColumnGroup(x,r,a,i),G=T;G<R;G++)N.addChild(p[G]);u.push(N)},v=1;v<p.length;v++){var y=p[v],C=y instanceof ce?y.getProvidedColumnGroup():y,m=C.getOriginalParent(),w=p[d],E=w instanceof ce?w.getProvidedColumnGroup():w,S=E.getOriginalParent();m!==S&&h(v)}d<p.length&&h(p.length)};u.length;)c();return this.setupParentsIntoColumns(l,null),l},t.prototype.createColumnGroup=function(e,r,i,o){var s=e.getGroupId(),a=r.getInstanceIdForKey(s),l=ce.createUniqueId(s,a),u=i[l];return u&&u.getProvidedColumnGroup()!==e&&(u=null),P(u)?u.reset():(u=new ce(e,s,a,o),this.context.createBean(u)),u},t.prototype.mapOldGroupsById=function(e){var r={},i=function(o){o.forEach(function(s){if(s instanceof ce){var a=s;r[s.getUniqueId()]=a,i(a.getChildren())}})};return e&&i(e),r},t.prototype.setupParentsIntoColumns=function(e,r){var i=this;e.forEach(function(o){if(o.setParent(r),o instanceof ce){var s=o;i.setupParentsIntoColumns(s.getChildren(),s)}})},t=mp([I("displayedGroupCreator")],t),t}(D),xt=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},Mt=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},wp={statusBar:!0,enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,excludeHiddenColumnsFromQuickFilter:!0,advancedFilterModel:!0,customChartThemes:!0,chartThemeOverrides:!0,enableChartToolPanelsButton:!0,suppressChartToolPanelsButton:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,alignedGrids:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressParentsInRowNodes:!0,suppressTouch:!0,suppressAsyncEvents:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,loadingOverlayComponent:!0,loadingOverlayComponentParams:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,noRowsOverlayComponentParams:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,suppressAggFuncInHeader:!0,suppressAggAtRootLevel:!0,removePivotHeaderRowWhenSingleValueColumn:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,suppressGroupMaintainValueType:!0,autoGroupColumnDef:!0,groupLockGroupColumns:!0,rowGroupPanelSuppressSort:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,suppressServerSideInfiniteScroll:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,functionsPassive:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0},ht=function(){function n(){}return n.STRING_PROPERTIES=["rowSelection","overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator"],n.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy"],n.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],n.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","tabIndex"],n.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupIncludeTotalFooter","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressParentsInRowNodes","suppressColumnMoveAnimation","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressAggAtRootLevel","suppressFocusAfterRefresh","functionsPassive","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","excludeHiddenColumnsFromQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterMovesDown","enterMovesDownAfterEdit","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","enableChartToolPanelsButton","suppressChartToolPanelsButton","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideFilterAllLevels","serverSideSortAllLevels","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","maintainColumnOrder","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","suppressGroupMaintainValueType"],n.FUNCTIONAL_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher"],n.CALLBACK_PROPERTIES=["getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","groupIncludeFooter","loadingCellRendererSelector","getRowId","groupAggFiltering"],n.FUNCTION_PROPERTIES=Mt(Mt([],xt(n.FUNCTIONAL_PROPERTIES),!1),xt(n.CALLBACK_PROPERTIES),!1),n.ALL_PROPERTIES=Mt(Mt(Mt(Mt(Mt(Mt([],xt(n.ARRAY_PROPERTIES),!1),xt(n.OBJECT_PROPERTIES),!1),xt(n.STRING_PROPERTIES),!1),xt(n.NUMBER_PROPERTIES),!1),xt(n.FUNCTION_PROPERTIES),!1),xt(n.BOOLEAN_PROPERTIES),!1),n}(),ln=function(){return ln=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},ln.apply(this,arguments)},Ma=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},Na=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},Ga=function(){function n(){}n.getCallbackForEvent=function(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)},n.getGridOptionKeys=function(){return this.ALL_PROPERTIES_AND_CALLBACKS},n.combineAttributesAndGridOptions=function(e,r){typeof e!="object"&&(e={});var i=ln({},e),o=n.getGridOptionKeys();return o.forEach(function(s){var a=r[s];typeof a<"u"&&a!==n.VUE_OMITTED_PROPERTY&&(i[s]=a)}),i},n.processOnChange=function(e,r){if(e){var i={},o=!1;if(Object.keys(e).filter(function(a){return n.ALL_PROPERTIES_AND_CALLBACKS_SET.has(a)}).forEach(function(a){i[a]=e[a],o=!0}),!!o){r.__internalUpdateGridOptions(i);var s={type:g.EVENT_COMPONENT_STATE_CHANGED};Ce(i,function(a,l){s[a]=l}),r.dispatchEvent(s)}}};var t;return t=n,n.EVENTS=Jt(g),n.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY",n.EXCLUDED_INTERNAL_EVENTS=[g.EVENT_SCROLLBAR_WIDTH_CHANGED,g.EVENT_CHECKBOX_CHANGED,g.EVENT_HEIGHT_SCALE_CHANGED,g.EVENT_BODY_HEIGHT_CHANGED,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,g.EVENT_SCROLL_VISIBILITY_CHANGED,g.EVENT_COLUMN_HOVER_CHANGED,g.EVENT_FLASH_CELLS,g.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,g.EVENT_DISPLAYED_ROWS_CHANGED,g.EVENT_LEFT_PINNED_WIDTH_CHANGED,g.EVENT_RIGHT_PINNED_WIDTH_CHANGED,g.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,g.EVENT_POPUP_TO_FRONT,g.EVENT_STORE_UPDATED,g.EVENT_COLUMN_PANEL_ITEM_DRAG_START,g.EVENT_COLUMN_PANEL_ITEM_DRAG_END,g.EVENT_FILL_START,g.EVENT_FILL_END,g.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,g.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,g.EVENT_FULL_WIDTH_ROW_FOCUSED,g.EVENT_HEADER_HEIGHT_CHANGED,g.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,g.EVENT_CELL_FOCUS_CLEARED,g.EVENT_GRID_STYLES_CHANGED,g.EVENT_FILTER_DESTROYED,g.EVENT_ROW_DATA_UPDATE_STARTED,g.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,g.EVENT_DATA_TYPES_INFERRED,g.EVENT_FIELD_VALUE_CHANGED,g.EVENT_FIELD_PICKER_VALUE_SELECTED,g.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED,g.EVENT_SUPPRESS_MENU_HIDE_CHANGED,g.EVENT_SUPPRESS_FIELD_DOT_NOTATION,g.EVENT_ROW_COUNT_READY,g.EVENT_SIDE_BAR_UPDATED],n.PUBLIC_EVENTS=n.EVENTS.filter(function(e){return!$e(n.EXCLUDED_INTERNAL_EVENTS,e)}),n.EVENT_CALLBACKS=n.EVENTS.map(function(e){return n.getCallbackForEvent(e)}),n.STRING_PROPERTIES=ht.STRING_PROPERTIES,n.OBJECT_PROPERTIES=ht.OBJECT_PROPERTIES,n.ARRAY_PROPERTIES=ht.ARRAY_PROPERTIES,n.NUMBER_PROPERTIES=ht.NUMBER_PROPERTIES,n.BOOLEAN_PROPERTIES=ht.BOOLEAN_PROPERTIES,n.FUNCTION_PROPERTIES=ht.FUNCTION_PROPERTIES,n.ALL_PROPERTIES=ht.ALL_PROPERTIES,n.ALL_PROPERTIES_AND_CALLBACKS=Na(Na([],Ma(t.ALL_PROPERTIES),!1),Ma(t.EVENT_CALLBACKS),!1),n.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(n.ALL_PROPERTIES_AND_CALLBACKS),n}(),Ep=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),_p=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Rp=function(n){Ep(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(i){return r.addComponent(i)})},t.prototype.addComponent=function(e){var r=e.componentName.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=r.toUpperCase();this.componentsMappedByName[i]=e.componentClass},t.prototype.getComponentClass=function(e){return this.componentsMappedByName[e]},t=_p([I("agStackComponentsRegistry")],t),t}(D);function He(n,t,e){e==null||typeof e=="string"&&e==""?un(n,t):Ke(n,t,e)}function Ke(n,t,e){n.setAttribute(Va(t),e.toString())}function un(n,t){n.removeAttribute(Va(t))}function Va(n){return"aria-".concat(n)}function pe(n,t){t?n.setAttribute("role",t):n.removeAttribute("role")}function Ha(n){var t;return n==="asc"?t="ascending":n==="desc"?t="descending":n==="mixed"?t="other":t="none",t}function Ba(n){return parseInt(n.getAttribute("aria-level"),10)}function ka(n){return parseInt(n.getAttribute("aria-posinset"),10)}function Wa(n){return n.getAttribute("aria-label")}function Rt(n,t){He(n,"label",t)}function Wi(n,t){He(n,"labelledby",t)}function ja(n,t){He(n,"description",t)}function Op(n,t){He(n,"describedby",t)}function cn(n,t){He(n,"live",t)}function Tp(n,t){He(n,"atomic",t)}function Pp(n,t){He(n,"relevant",t)}function Ua(n,t){He(n,"level",t)}function pn(n,t){He(n,"disabled",t)}function ji(n,t){He(n,"hidden",t)}function dn(n,t){He(n,"activedescendant",t)}function ot(n,t){Ke(n,"expanded",t)}function za(n){un(n,"expanded")}function hn(n,t){Ke(n,"setsize",t)}function fn(n,t){Ke(n,"posinset",t)}function $a(n,t){Ke(n,"multiselectable",t)}function Ka(n,t){Ke(n,"rowcount",t)}function vn(n,t){Ke(n,"rowindex",t)}function Ya(n,t){Ke(n,"colcount",t)}function gn(n,t){Ke(n,"colindex",t)}function qa(n,t){Ke(n,"colspan",t)}function Qa(n,t){Ke(n,"sort",t)}function Xa(n){un(n,"sort")}function Er(n,t){He(n,"selected",t)}function Dp(n,t){Ke(n,"checked",t===void 0?"mixed":t)}function yn(n,t){He(n,"controls",t.id),Wi(t,n.id)}function Ui(n,t){return t===void 0?n("ariaIndeterminate","indeterminate"):t===!0?n("ariaChecked","checked"):n("ariaUnchecked","unchecked")}var Ap=Object.freeze({__proto__:null,setAriaRole:pe,getAriaSortState:Ha,getAriaLevel:Ba,getAriaPosInSet:ka,getAriaLabel:Wa,setAriaLabel:Rt,setAriaLabelledBy:Wi,setAriaDescription:ja,setAriaDescribedBy:Op,setAriaLive:cn,setAriaAtomic:Tp,setAriaRelevant:Pp,setAriaLevel:Ua,setAriaDisabled:pn,setAriaHidden:ji,setAriaActiveDescendant:dn,setAriaExpanded:ot,removeAriaExpanded:za,setAriaSetSize:hn,setAriaPosInSet:fn,setAriaMultiSelectable:$a,setAriaRowCount:Ka,setAriaRowIndex:vn,setAriaColCount:Ya,setAriaColIndex:gn,setAriaColSpan:qa,setAriaSort:Qa,removeAriaSort:Xa,setAriaSelected:Er,setAriaChecked:Dp,setAriaControls:yn,getAriaCheckboxStateName:Ui}),Cn,zi,mn,Sn,wn,En,_n,Rn;function nt(){return Cn===void 0&&(Cn=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Cn}function On(){if(zi===void 0)if(nt()){var n=navigator.userAgent.match(/version\/(\d+)/i);n&&(zi=n[1]!=null?parseFloat(n[1]):0)}else zi=0;return zi}function $i(){if(mn===void 0){var n=window;mn=!!n.chrome&&(!!n.chrome.webstore||!!n.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return mn}function Tn(){return Sn===void 0&&(Sn=/(firefox)/i.test(navigator.userAgent)),Sn}function Pn(){return wn===void 0&&(wn=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),wn}function Nt(){return En===void 0&&(En=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),En}function Ki(){return!nt()||On()>=15}function Yi(n){if(!n)return null;var t=n.tabIndex,e=n.getAttribute("tabIndex");return t===-1&&(e===null||e===""&&!Tn())?null:t.toString()}function Ja(){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 Za(){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 el(){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 tl(){return Rn==null&&rl(),Rn}function rl(){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&&(Rn=e,_n=e===0)}function Dn(){return _n==null&&rl(),_n}var bp=Object.freeze({__proto__:null,isBrowserSafari:nt,getSafariVersion:On,isBrowserChrome:$i,isBrowserFirefox:Tn,isMacOsUserAgent:Pn,isIOSUserAgent:Nt,browserSupportsPreventScroll:Ki,getTabIndex:Yi,getMaxDivHeight:Ja,getBodyWidth:Za,getBodyHeight:el,getScrollbarWidth:tl,isInvisibleScrollbar:Dn});function _r(n,t){return n.toString().padStart(t,"0")}function il(n,t){for(var e=[],r=n;r<=t;r++)e.push(r);return e}function Fp(n){return typeof n=="string"&&(n=parseInt(n,10)),typeof n=="number"?Math.floor(n):null}function Lp(n,t){for(var e="",r=0;r<t;r++)e+=String.fromCharCode(n&255),n>>>=8;return e}function Ip(n,t,e){return typeof n!="number"?"":An(Math.round(n*100)/100,t,e)}function An(n,t,e){return typeof n!="number"?"":n.toString().replace(".",e).replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1".concat(t))}function xp(n){return n==null?null:n.reduce(function(t,e){return t+e},0)}var Mp=Object.freeze({__proto__:null,padStartWidthZeros:_r,createArrayOfNumbers:il,cleanNumber:Fp,decToHex:Lp,formatNumberTwoDecimalPlacesAndCommas:Ip,formatNumberCommas:An,sum:xp}),bn=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o};function Ye(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(i){return _r(i,2)}).join(e);return t&&(r+=" "+[n.getHours(),n.getMinutes(),n.getSeconds()].map(function(i){return _r(i,2)}).join(":")),r}var Fn=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 Rr(n,t){t===void 0&&(t="YYYY-MM-DD");var e=_r(n.getFullYear(),4),r=["January","February","March","April","May","June","July","August","September","October","November","December"],i=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o={YYYY:function(){return e.slice(e.length-4,e.length)},YY:function(){return e.slice(e.length-2,e.length)},Y:function(){return"".concat(n.getFullYear())},MMMM:function(){return r[n.getMonth()]},MMM:function(){return r[n.getMonth()].slice(0,3)},MM:function(){return _r(n.getMonth()+1,2)},Mo:function(){return"".concat(n.getMonth()+1).concat(Fn(n.getMonth()+1))},M:function(){return"".concat(n.getMonth()+1)},Do:function(){return"".concat(n.getDate()).concat(Fn(n.getDate()))},DD:function(){return _r(n.getDate(),2)},D:function(){return"".concat(n.getDate())},dddd:function(){return i[n.getDay()]},ddd:function(){return i[n.getDay()].slice(0,3)},dd:function(){return i[n.getDay()].slice(0,2)},do:function(){return"".concat(n.getDay()).concat(Fn(n.getDay()))},d:function(){return"".concat(n.getDay())}},s=new RegExp(Object.keys(o).join("|"),"g");return t.replace(s,function(a){return a in o?o[a]():a})}function Oe(n){if(!n)return null;var t=bn(n.split(" "),2),e=t[0],r=t[1];if(!e)return null;var i=e.split("-").map(function(v){return parseInt(v,10)});if(i.filter(function(v){return!isNaN(v)}).length!==3)return null;var o=bn(i,3),s=o[0],a=o[1],l=o[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=bn(r.split(":").map(function(v){return parseInt(v,10)}),3),p=c[0],d=c[1],h=c[2];return p>=0&&p<24&&u.setHours(p),d>=0&&d<60&&u.setMinutes(d),h>=0&&h<60&&u.setSeconds(h),u}var Np=Object.freeze({__proto__:null,serialiseDate:Ye,dateToFormattedString:Rr,parseDateTimeFromString:Oe}),Gp=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.")},Vp=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},qi;function Ln(n,t,e){for(var r=n.parentElement,i=r&&r.firstChild;i;)t&&i.classList.toggle(t,i===n),e&&i.classList.toggle(e,i!==n),i=i.nextSibling}var ol="[tabindex], input, select, button, textarea, [href]",In="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function xn(n){var t=Element.prototype.matches||Element.prototype.msMatchesSelector,e="input, select, button, textarea",r=t.call(n,e),i=t.call(n,In),o=Te(n),s=r&&!i&&o;return s}function q(n,t,e){e===void 0&&(e={});var r=e.skipAriaHidden;n.classList.toggle("ag-hidden",!t),r||ji(n,!t)}function nl(n,t,e){e===void 0&&(e={});var r=e.skipAriaHidden;n.classList.toggle("ag-invisible",!t),r||ji(n,!t)}function Or(n,t){var e="disabled",r=t?function(i){return i.setAttribute(e,"")}:function(i){return i.removeAttribute(e)};r(n),Wn(n.querySelectorAll("input"),function(i){return r(i)})}function rr(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 Gt(n){var t=window.getComputedStyle(n),e=t.height,r=t.width,i=t.borderTopWidth,o=t.borderRightWidth,s=t.borderBottomWidth,a=t.borderLeftWidth,l=t.paddingTop,u=t.paddingRight,c=t.paddingBottom,p=t.paddingLeft,d=t.marginTop,h=t.marginRight,v=t.marginBottom,y=t.marginLeft,C=t.boxSizing;return{height:parseFloat(e),width:parseFloat(r),borderTopWidth:parseFloat(i),borderRightWidth:parseFloat(o),borderBottomWidth:parseFloat(s),borderLeftWidth:parseFloat(a),paddingTop:parseFloat(l),paddingRight:parseFloat(u),paddingBottom:parseFloat(c),paddingLeft:parseFloat(p),marginTop:parseFloat(d),marginRight:parseFloat(h),marginBottom:parseFloat(v),marginLeft:parseFloat(y),boxSizing:C}}function zr(n){var t=Gt(n);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function ir(n){var t=Gt(n);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function Mn(n){var t=Gt(n),e=t.marginBottom+t.marginTop;return Math.ceil(n.offsetHeight+e)}function $r(n){var t=Gt(n),e=t.marginLeft+t.marginRight;return Math.ceil(n.offsetWidth+e)}function Nn(n){var t=n.getBoundingClientRect(),e=Gt(n),r=e.borderTopWidth,i=e.borderLeftWidth,o=e.borderRightWidth,s=e.borderBottomWidth;return{top:t.top+(r||0),left:t.left+(i||0),right:t.right+(o||0),bottom:t.bottom+(s||0)}}function Kr(){if(typeof qi=="boolean")return qi;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=`<div style="width: 2px">
|
||
<span style="display: inline-block; width: 1px"></span>
|
||
<span style="display: inline-block; width: 1px"></span>
|
||
</div>`,document.body.appendChild(n),n.scrollLeft=1,qi=Math.floor(n.scrollLeft)===0,document.body.removeChild(n),qi}function Yr(n,t){var e=n.scrollLeft;return t&&(e=Math.abs(e),$i()&&!Kr()&&(e=n.scrollWidth-n.clientWidth-e)),e}function qr(n,t,e){e&&(Kr()?t*=-1:(nt()||$i())&&(t=n.scrollWidth-n.clientWidth-t)),n.scrollLeft=t}function he(n){for(;n&&n.firstChild;)n.removeChild(n.firstChild)}function Ot(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function Te(n){var t=n;if(t.checkVisibility)return t.checkVisibility({checkVisibilityCSS:!0});var e=!n.offsetParent||window.getComputedStyle(n).visibility!=="visible";return!e}function ge(n){var t=document.createElement("div");return t.innerHTML=(n||"").trim(),t.firstChild}function Hp(n,t){n.lastChild?n.insertAdjacentHTML("afterbegin",t):n.innerHTML=t}function Gn(n){return n&&n.clientHeight?n.clientHeight:0}function Vn(n){return n&&n.clientWidth?n.clientWidth:0}function Hn(n,t,e){if(!(e&&e.nextSibling===t)){var r=document.activeElement,i=t.contains(r);e?e.nextSibling?n.insertBefore(t,e.nextSibling):n.appendChild(t):n.firstChild&&n.firstChild!==t&&n.insertAdjacentElement("afterbegin",t),i&&r&&Ki()&&r.focus({preventScroll:!0})}}function Bn(n,t){for(var e=0;e<t.length;e++){var r=t[e],i=n.children[e];i!==r&&n.insertBefore(r,i)}}function sl(n,t,e){e?e.insertAdjacentElement("afterend",t):n.firstChild?n.insertAdjacentElement("afterbegin",t):n.appendChild(t)}function kn(n,t){var e,r;if(t)try{for(var i=Gp(Object.entries(t)),o=i.next();!o.done;o=i.next()){var s=Vp(o.value,2),a=s[0],l=s[1];if(!(!a||!a.length||l==null)){var u=Ia(a),c=l.toString(),p=c.replace(/\s*!important/g,""),d=p.length!=c.length?"important":void 0;n.style.setProperty(u,p,d)}}}catch(h){e={error:h}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}}function al(n){return n.clientWidth<n.scrollWidth}function ll(n){return n.clientHeight<n.scrollHeight}function Qr(n,t){t==="flex"?(n.style.removeProperty("width"),n.style.removeProperty("minWidth"),n.style.removeProperty("maxWidth"),n.style.flex="1 1 auto"):qe(n,t)}function qe(n,t){t=Qi(t),n.style.width=t.toString(),n.style.maxWidth=t.toString(),n.style.minWidth=t.toString()}function Bp(n,t){t==="flex"?(n.style.removeProperty("height"),n.style.removeProperty("minHeight"),n.style.removeProperty("maxHeight"),n.style.flex="1 1 auto"):or(n,t)}function or(n,t){t=Qi(t),n.style.height=t.toString(),n.style.maxHeight=t.toString(),n.style.minHeight=t.toString()}function Qi(n){return typeof n=="number"?"".concat(n,"px"):n}function Xr(n){return n instanceof Node||n instanceof HTMLElement}function ul(n){if(n==null)return[];var t=[];return Wn(n,function(e){return t.push(e)}),t}function cl(n,t){if(n)for(var e=0;e<n.length;e++){var r=n[e];t(r.name,r.value)}}function ft(n,t,e){e==null?n.removeAttribute(t):n.setAttribute(t,e.toString())}function Wn(n,t){if(n!=null)for(var e=0;e<n.length;e++)t(n[e])}function jn(n,t){n.then(function(e){var r=e.getGui();r!=null&&(typeof r=="object"?t.appendChild(r):t.innerHTML=r)})}var kp=Object.freeze({__proto__:null,radioCssClass:Ln,FOCUSABLE_SELECTOR:ol,FOCUSABLE_EXCLUDE:In,isFocusableFormField:xn,setDisplayed:q,setVisible:nl,setDisabled:Or,isElementChildOfClass:rr,getElementSize:Gt,getInnerHeight:zr,getInnerWidth:ir,getAbsoluteHeight:Mn,getAbsoluteWidth:$r,getElementRectWithOffset:Nn,isRtlNegativeScroll:Kr,getScrollLeft:Yr,setScrollLeft:qr,clearElement:he,removeFromParent:Ot,isVisible:Te,loadTemplate:ge,appendHtml:Hp,offsetHeight:Gn,offsetWidth:Vn,ensureDomOrder:Hn,setDomChildOrder:Bn,insertWithDomOrder:sl,addStylesToElement:kn,isHorizontalScrollShowing:al,isVerticalScrollShowing:ll,setElementWidth:Qr,setFixedWidth:qe,setElementHeight:Bp,setFixedHeight:or,formatSize:Qi,isNodeOrElement:Xr,copyNodeList:ul,iterateNamedNodeMap:cl,addOrRemoveAttribute:ft,nodeListForEach:Wn,bindCellRendererToHtmlElement:jn}),Wp=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.")};function pl(n,t,e){var r={},i=n.filter(function(o){return!t.some(function(s){return s===o})});return i.length>0&&i.forEach(function(o){return r[o]=Jr(o,e).values}),r}function Jr(n,t,e,r){var i,o,s=t.map(function(v,y){return{value:v,relevance:jp(n.toLowerCase(),v.toLocaleLowerCase()),idx:y}});if(s.sort(function(v,y){return y.relevance-v.relevance}),e&&(s=s.filter(function(v){return v.relevance!==0})),s.length>0&&r&&r>0){var a=s[0].relevance,l=a*r;s=s.filter(function(v){return l-v.relevance<0})}var u=[],c=[];try{for(var p=Wp(s),d=p.next();!d.done;d=p.next()){var h=d.value;u.push(h.value),c.push(h.idx)}}catch(v){i={error:v}}finally{try{d&&!d.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}return{values:u,indices:c}}function jp(n,t){for(var e=n.replace(/\s/g,""),r=t.replace(/\s/g,""),i=0,o=-1,s=0;s<e.length;s++){var a=r.indexOf(e[s],o+1);a!==-1&&(o=a,i+=100-o*100/1e4*100)}return i}var Up=Object.freeze({__proto__:null,fuzzyCheckStrings:pl,fuzzySuggestions:Jr}),dl={columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate",columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"tree-closed",groupExpanded:"tree-open",setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",chart:"chart",close:"cross",cancel:"cancel",check:"tick",first:"first",previous:"previous",next:"next",last:"last",linked:"linked",unlinked:"unlinked",colorPicker:"color-picker",groupLoading:"loading",menu:"menu",filter:"filter",columns:"columns",maximize:"maximize",minimize:"minimize",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnDrag:"grip",rowDrag:"grip",save:"save",csvExport:"csv",excelExport:"excel",smallDown:"small-down",smallLeft:"small-left",smallRight:"small-right",smallUp:"small-up",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",advancedFilterBuilder:"group",advancedFilterBuilderDrag:"grip",advancedFilterBuilderInvalid:"not-allowed",advancedFilterBuilderMoveUp:"up",advancedFilterBuilderMoveDown:"down",advancedFilterBuilderAdd:"plus",advancedFilterBuilderRemove:"minus"};function Qe(n,t,e){var r=ne(n,t,e);if(r){var i=r.className;if(typeof i=="string"&&i.indexOf("ag-icon")>-1||typeof i=="object"&&i["ag-icon"])return r}var o=document.createElement("span");return o.appendChild(r),o}function ne(n,t,e,r){var i=null,o=e&&e.getColDef().icons;if(o&&(i=o[n]),t&&!i){var s=t.get("icons");s&&(i=s[n])}if(i){var a=void 0;if(typeof i=="function")a=i();else if(typeof i=="string")a=i;else throw new Error("icon from grid options needs to be a string or a function");if(typeof a=="string")return ge(a);if(Xr(a))return a;console.warn("AG Grid: iconRenderer should return back a string or a dom object")}else{var l=document.createElement("span"),u=dl[n];return u||(r?u=n:(console.warn("AG Grid: Did not find icon ".concat(n)),u="")),l.setAttribute("class","ag-icon ag-icon-".concat(u)),l.setAttribute("unselectable","on"),pe(l,"presentation"),l}}var zp=Object.freeze({__proto__:null,iconNameClassMap:dl,createIcon:Qe,createIconNoSpan:ne}),_=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}(),$p=65,Kp=67,Yp=86,qp=68,Qp=90,Xp=89;function Xi(n){if(n.altKey||n.ctrlKey||n.metaKey)return!1;var t=n.key.length===1;return t}function Ji(n,t,e,r,i){var o=r?r.getColDef().suppressKeyboardEvent:void 0;if(!o)return!1;var s={event:t,editing:i,column:r,api:n.api,node:e,data:e.data,colDef:r.getColDef(),context:n.context,columnApi:n.columnApi};if(o){var a=o(s);if(a)return!0}return!1}function hl(n,t,e,r){var i=r.getDefinition(),o=i&&i.suppressHeaderKeyboardEvent;if(!P(o))return!1;var s={api:n.api,columnApi:n.columnApi,context:n.context,colDef:i,column:r,headerRowIndex:e,event:t};return!!o(s)}function fl(n){var t=n.keyCode,e;switch(t){case $p:e=_.A;break;case Kp:e=_.C;break;case Yp:e=_.V;break;case qp:e=_.D;break;case Qp:e=_.Z;break;case Xp:e=_.Y;break;default:e=n.code}return e}function vl(n,t){return t===void 0&&(t=!1),n===_.DELETE?!0:!t&&n===_.BACKSPACE?Pn():!1}var Jp=Object.freeze({__proto__:null,isEventFromPrintableCharacter:Xi,isUserSuppressingKeyboardEvent:Ji,isUserSuppressingHeaderKeyboardEvent:hl,normaliseQwertyAzerty:fl,isDeleteKey:vl});function Un(n,t,e){if(e===0)return!1;var r=Math.abs(n.clientX-t.clientX),i=Math.abs(n.clientY-t.clientY);return Math.max(r,i)<=e}var Zp=Object.freeze({__proto__:null,areEventsNear:Un});function ed(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,h=p&&d,v=!p&&!d;return h?u-c:v?a.__objectId-l.__objectId:p?1:-1},r,i,o=!1,s=0;s<n.length-1;s++)if(r=n[s],i=n[s+1],e(r,i)>0){o=!0;break}return o?(n.sort(e),!0):!1}var td=Object.freeze({__proto__:null,sortRowNodesByOrder:ed});function zn(n){var t=new Set;return n.forEach(function(e){return t.add(e)}),t}var rd=Object.freeze({__proto__:null,convertToSet:zn}),ae=function(){return ae=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},ae.apply(this,arguments)},id=ae(ae(ae(ae(ae(ae(ae(ae(ae(ae(ae(ae(ae(ae(ae(ae(ae(ae({},Ap),Yc),bp),Np),kp),Qc),xc),Up),Ec),zp),Jp),cp),Zp),Mp),Fc),td),rd),ap),z=id,Tr=function(){function n(t,e){t===void 0&&(t=0),e===void 0&&(e=1),this.nextValue=t,this.step=e}return n.prototype.next=function(){var t=this.nextValue;return this.nextValue+=this.step,t},n.prototype.peek=function(){return this.nextValue},n.prototype.skip=function(t){this.nextValue+=t},n}(),Pr;(function(n){n[n.IN_PROGRESS=0]="IN_PROGRESS",n[n.RESOLVED=1]="RESOLVED"})(Pr||(Pr={}));var vt=function(){function n(t){var e=this;this.status=Pr.IN_PROGRESS,this.resolution=null,this.waiters=[],t(function(r){return e.onDone(r)},function(r){return e.onReject(r)})}return n.all=function(t){return new n(function(e){var r=t.length,i=new Array(r);t.forEach(function(o,s){o.then(function(a){i[s]=a,r--,r===0&&e(i)})})})},n.resolve=function(t){return t===void 0&&(t=null),new n(function(e){return e(t)})},n.prototype.then=function(t){var e=this;return new n(function(r){e.status===Pr.RESOLVED?r(t(e.resolution)):e.waiters.push(function(i){return r(t(i))})})},n.prototype.resolveNow=function(t,e){return this.status===Pr.RESOLVED?e(this.resolution):t},n.prototype.onDone=function(t){this.status=Pr.RESOLVED,this.resolution=t,this.waiters.forEach(function(e){return e(t)})},n.prototype.onReject=function(t){console.warn("TBI")},n}(),od=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),nr=function(){return nr=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},nr.apply(this,arguments)},$n=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},st;(function(n){n[n.NOTHING=0]="NOTHING",n[n.WAITING_TO_SHOW=1]="WAITING_TO_SHOW",n[n.SHOWING=2]="SHOWING"})(st||(st={}));var gt;(function(n){n[n.HOVER=0]="HOVER",n[n.FOCUS=1]="FOCUS"})(gt||(gt={}));var Kn=function(n){od(t,n);function t(e,r,i){var o=n.call(this)||this;return o.parentComp=e,o.tooltipShowDelayOverride=r,o.tooltipHideDelayOverride=i,o.SHOW_QUICK_TOOLTIP_DIFF=1e3,o.FADE_OUT_TOOLTIP_TIMEOUT=1e3,o.INTERACTIVE_HIDE_DELAY=100,o.interactionEnabled=!1,o.isInteractingWithTooltip=!1,o.state=st.NOTHING,o.tooltipInstanceCount=0,o.tooltipMouseTrack=!1,o}return t.prototype.postConstruct=function(){this.gridOptionsService.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gridOptionsService.get("tooltipMouseTrack");var e=this.parentComp.getGui();this.tooltipTrigger===gt.HOVER&&(this.addManagedListener(e,"mouseenter",this.onMouseEnter.bind(this)),this.addManagedListener(e,"mouseleave",this.onMouseLeave.bind(this))),this.tooltipTrigger===gt.FOCUS&&(this.addManagedListener(e,"focusin",this.onFocusIn.bind(this)),this.addManagedListener(e,"focusout",this.onFocusOut.bind(this))),this.addManagedListener(e,"mousemove",this.onMouseMove.bind(this)),this.interactionEnabled||(this.addManagedListener(e,"mousedown",this.onMouseDown.bind(this)),this.addManagedListener(e,"keydown",this.onKeyDown.bind(this)))},t.prototype.getGridOptionsTooltipDelay=function(e){var r=this.gridOptionsService.get(e);return r<0&&B("".concat(e," should not be lower than 0")),Math.max(200,r)},t.prototype.getTooltipDelay=function(e){var r,i;return e==="show"?(r=this.tooltipShowDelayOverride)!==null&&r!==void 0?r:this.getGridOptionsTooltipDelay("tooltipShowDelay"):(i=this.tooltipHideDelayOverride)!==null&&i!==void 0?i:this.getGridOptionsTooltipDelay("tooltipHideDelay")},t.prototype.destroy=function(){this.setToDoNothing(),n.prototype.destroy.call(this)},t.prototype.getTooltipTrigger=function(){var e=this.gridOptionsService.get("tooltipTrigger");return!e||e==="hover"?gt.HOVER:gt.FOCUS},t.prototype.onMouseEnter=function(e){var r=this;this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!Nt()&&(t.isLocked?this.showTooltipTimeoutId=window.setTimeout(function(){r.prepareToShowTooltip(e)},this.INTERACTIVE_HIDE_DELAY):this.prepareToShowTooltip(e))},t.prototype.onMouseMove=function(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===st.SHOWING&&this.tooltipComp&&this.positionTooltip()},t.prototype.onMouseDown=function(){this.setToDoNothing()},t.prototype.onMouseLeave=function(){this.interactionEnabled?this.lockService():this.setToDoNothing()},t.prototype.onFocusIn=function(){this.prepareToShowTooltip()},t.prototype.onFocusOut=function(e){var r,i=e.relatedTarget,o=this.parentComp.getGui(),s=(r=this.tooltipComp)===null||r===void 0?void 0:r.getGui();this.isInteractingWithTooltip||o.contains(i)||this.interactionEnabled&&(s!=null&&s.contains(i))||this.setToDoNothing()},t.prototype.onKeyDown=function(){this.setToDoNothing()},t.prototype.prepareToShowTooltip=function(e){if(this.state!=st.NOTHING||t.isLocked)return!1;var r=0;return e&&(r=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),r),this.state=st.WAITING_TO_SHOW,!0},t.prototype.isLastTooltipHiddenRecently=function(){var e=new Date().getTime(),r=t.lastTooltipHideTime;return e-r<this.SHOW_QUICK_TOOLTIP_DIFF},t.prototype.setToDoNothing=function(){this.state===st.SHOWING&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.clearTimeouts(),this.state=st.NOTHING,this.lastMouseEvent=null},t.prototype.showTooltip=function(){var e=nr({},this.parentComp.getTooltipParams());if(!P(e.value)){this.setToDoNothing();return}this.state=st.SHOWING,this.tooltipInstanceCount++;var r=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount),i=this.userComponentFactory.getTooltipCompDetails(e);i.newAgStackInstance().then(r)},t.prototype.hideTooltip=function(e){if(!(!e&&this.isInteractingWithTooltip)){this.tooltipComp&&(this.destroyTooltipComp(),t.lastTooltipHideTime=new Date().getTime());var r={type:g.EVENT_TOOLTIP_HIDE,parentGui:this.parentComp.getGui()};this.eventService.dispatchEvent(r),this.state=st.NOTHING}},t.prototype.newTooltipComponentCallback=function(e,r){var i=this.state!==st.SHOWING||this.tooltipInstanceCount!==e;if(i){this.getContext().destroyBean(r);return}var o=r.getGui();this.tooltipComp=r,o.classList.contains("ag-tooltip")||o.classList.add("ag-tooltip-custom"),this.tooltipTrigger===gt.HOVER&&o.classList.add("ag-tooltip-animate"),this.interactionEnabled&&o.classList.add("ag-tooltip-interactive");var s=this.localeService.getLocaleTextFunc(),a=this.popupService.addPopup({eChild:o,ariaLabel:s("ariaLabelTooltip","Tooltip")});a&&(this.tooltipPopupDestroyFunc=a.hideFunc),this.positionTooltip(),this.tooltipTrigger===gt.FOCUS&&(this.onBodyScrollEventCallback=this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL,this.setToDoNothing.bind(this)),this.onColumnMovedEventCallback=this.addManagedListener(this.eventService,g.EVENT_COLUMN_MOVED,this.setToDoNothing.bind(this))),this.interactionEnabled&&(this.tooltipTrigger===gt.HOVER?(this.tooltipMouseEnterListener=this.addManagedListener(o,"mouseenter",this.onTooltipMouseEnter.bind(this))||null,this.tooltipMouseLeaveListener=this.addManagedListener(o,"mouseleave",this.onTooltipMouseLeave.bind(this))||null):(this.tooltipFocusInListener=this.addManagedListener(o,"focusin",this.onTooltipFocusIn.bind(this))||null,this.tooltipFocusOutListener=this.addManagedListener(o,"focusout",this.onTooltipFocusOut.bind(this))||null));var l={type:g.EVENT_TOOLTIP_SHOW,tooltipGui:o,parentGui:this.parentComp.getGui()};this.eventService.dispatchEvent(l),this.startHideTimeout()},t.prototype.onTooltipMouseEnter=function(){this.isInteractingWithTooltip=!0,this.unlockService()},t.prototype.onTooltipMouseLeave=function(){this.isInteractingWithTooltip=!1,this.lockService()},t.prototype.onTooltipFocusIn=function(){this.isInteractingWithTooltip=!0},t.prototype.onTooltipFocusOut=function(e){var r,i=this.parentComp.getGui(),o=(r=this.tooltipComp)===null||r===void 0?void 0:r.getGui(),s=e.relatedTarget;o!=null&&o.contains(s)||(this.isInteractingWithTooltip=!1,i.contains(s)?this.startHideTimeout():this.hideTooltip())},t.prototype.positionTooltip=function(){var e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupService.positionPopupUnderMouseEvent(nr(nr({},e),{mouseEvent:this.lastMouseEvent})):this.popupService.positionPopupByComponent(nr(nr({},e),{eventSource:this.parentComp.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5}))},t.prototype.destroyTooltipComp=function(){var e=this;this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");var r=this.tooltipPopupDestroyFunc,i=this.tooltipComp,o=this.tooltipTrigger===gt.HOVER?this.FADE_OUT_TOOLTIP_TIMEOUT:0;window.setTimeout(function(){r(),e.getContext().destroyBean(i)},o),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0},t.prototype.clearTooltipListeners=function(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(function(e){e&&e()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null},t.prototype.lockService=function(){var e=this;t.isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout(function(){e.unlockService(),e.setToDoNothing()},this.INTERACTIVE_HIDE_DELAY)},t.prototype.unlockService=function(){t.isLocked=!1,this.clearInteractiveTimeout()},t.prototype.startHideTimeout=function(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))},t.prototype.clearShowTimeout=function(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)},t.prototype.clearHideTimeout=function(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)},t.prototype.clearInteractiveTimeout=function(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)},t.prototype.clearTimeouts=function(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()},t.isLocked=!1,$n([f("popupService")],t.prototype,"popupService",void 0),$n([f("userComponentFactory")],t.prototype,"userComponentFactory",void 0),$n([b],t.prototype,"postConstruct",null),t}(D),nd=function(){function n(t){this.cssClassStates={},this.getGui=t}return n.prototype.addCssClass=function(t){var e=this,r=(t||"").split(" ");if(r.length>1){r.forEach(function(s){return e.addCssClass(s)});return}var i=this.cssClassStates[t]!==!0;if(i&&t.length){var o=this.getGui();o&&o.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 i=this.cssClassStates[t]!==!1;if(i&&t.length){var o=this.getGui();o&&o.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 i=(t||"").split(" ");if(i.length>1){i.forEach(function(a){return r.addOrRemoveCssClass(a,e)});return}}var o=this.cssClassStates[t]!==e;if(o&&t.length){var s=this.getGui();s&&s.classList.toggle(t,e),this.cssClassStates[t]=e}}},n}(),sd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},ad=new Tr,W=function(n){sd(t,n);function t(e){var r=n.call(this)||this;return r.displayed=!0,r.visible=!0,r.compId=ad.next(),r.cssClassManager=new nd(function(){return r.eGui}),e&&r.setTemplate(e),r}return t.prototype.preConstructOnComponent=function(){this.usingBrowserTooltips=this.gridOptionsService.get("enableBrowserTooltips")},t.prototype.getCompId=function(){return this.compId},t.prototype.getTooltipParams=function(){return{value:this.tooltipText,location:"UNKNOWN"}},t.prototype.setTooltip=function(e,r,i){var o=this,s=function(){o.usingBrowserTooltips?o.getGui().removeAttribute("title"):o.tooltipFeature=o.destroyBean(o.tooltipFeature)},a=function(){o.usingBrowserTooltips?o.getGui().setAttribute("title",o.tooltipText):o.tooltipFeature=o.createBean(new Kn(o,r,i))};this.tooltipText!=e&&(this.tooltipText&&s(),e!=null&&(this.tooltipText=e,this.tooltipText&&a()))},t.prototype.createChildComponentsFromTags=function(e,r){var i=this,o=ul(e.childNodes);o.forEach(function(s){if(s instanceof HTMLElement){var a=i.createComponentFromElement(s,function(u){var c=u.getGui();c&&i.copyAttributesFromNode(s,u.getGui())},r);if(a){if(a.addItems&&s.children.length){i.createChildComponentsFromTags(s,r);var l=Array.prototype.slice.call(s.children);a.addItems(l)}i.swapComponentForNode(a,e,s)}else s.childNodes&&i.createChildComponentsFromTags(s,r)}})},t.prototype.createComponentFromElement=function(e,r,i){var o=e.nodeName,s=i?i[e.getAttribute("ref")]:void 0,a=this.agStackComponentsRegistry.getComponentClass(o);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){cl(e.attributes,function(i,o){return r.setAttribute(i,o)})},t.prototype.swapComponentForNode=function(e,r,i){var o=e.getGui();r.replaceChild(o,i),r.insertBefore(document.createComment(i.nodeName),o),this.addDestroyFunc(this.destroyBean.bind(this,e)),this.swapInComponentForQuerySelectors(e,i)},t.prototype.swapInComponentForQuerySelectors=function(e,r){var i=this;this.iterateOverQuerySelectors(function(o){i[o.attributeName]===r&&(i[o.attributeName]=e)})},t.prototype.iterateOverQuerySelectors=function(e){for(var r=Object.getPrototypeOf(this);r!=null;){var i=r.__agComponentMetaData,o=Ni(r.constructor);i&&i[o]&&i[o].querySelectors&&i[o].querySelectors.forEach(function(s){return e(s)}),r=Object.getPrototypeOf(r)}},t.prototype.activateTabIndex=function(e){var r=this.gridOptionsService.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach(function(i){return i.setAttribute("tabindex",r.toString())})},t.prototype.setTemplate=function(e,r){var i=ge(e);this.setTemplateFromElement(i,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(i){var o=function(l){return r[i.attributeName]=l},s=i.refSelector&&e.getAttribute("ref")===i.refSelector;if(s)o(e.eGui);else{var a=e.eGui.querySelector(i.querySelector);a&&o(a.__agComponent||a)}})}},t.prototype.getGui=function(){return this.eGui},t.prototype.getFocusableElement=function(){return this.eGui},t.prototype.getAriaElement=function(){return this.getFocusableElement()},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),Xr(e))r.appendChild(e);else{var i=e;r.appendChild(i.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 i=r.skipAriaHidden;nl(this.eGui,e,{skipAriaHidden:i})}},t.prototype.setDisplayed=function(e,r){if(r===void 0&&(r={}),e!==this.displayed){this.displayed=e;var i=r.skipAriaHidden;q(this.eGui,e,{skipAriaHidden:i});var o={type:t.EVENT_DISPLAYED_CHANGED,visible:this.displayed};this.dispatchEvent(o)}},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,i){var o=this;this.eGui.addEventListener(e,r,i),this.addDestroyFunc(function(){return o.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="'.concat(e,'"]'))},t.EVENT_DISPLAYED_CHANGED="displayedChanged",Yn([f("agStackComponentsRegistry")],t.prototype,"agStackComponentsRegistry",void 0),Yn([Ca],t.prototype,"preConstructOnComponent",null),Yn([Ca],t.prototype,"createChildComponentsPreConstruct",null),t}(D);function L(n){return ld.bind(this,"[ref=".concat(n,"]"),n)}function ld(n,t,e,r,i){if(n===null){console.error("AG Grid: QuerySelector selector should not be null");return}if(typeof i=="number"){console.error("AG Grid: QuerySelector should be on an attribute");return}ud(e,"querySelectors",{attributeName:r,querySelector:n,refSelector:t})}function ud(n,t,e){var r=cd(n,Ni(n.constructor));r[t]||(r[t]=[]),r[t].push(e)}function cd(n,t){return n.__agComponentMetaData||(n.__agComponentMetaData={}),n.__agComponentMetaData[t]||(n.__agComponentMetaData[t]={}),n.__agComponentMetaData[t]}var pd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),gl=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},dd=function(n){pd(t,n);function t(){return n.call(this,`
|
||
<div class="ag-floating-filter-input" role="presentation">
|
||
<ag-input-text-field ref="eFloatingFilterText"></ag-input-text-field>
|
||
</div>`)||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),i=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel("".concat(r," ").concat(i("ariaFilterInput","Filter Input")))},t.prototype.onParentModelChanged=function(e){var r=this;if(!e){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(function(i){if(i.getModelAsString){var o=i.getModelAsString(e);r.eFloatingFilterText.setValue(o)}})},t.prototype.onParamsUpdated=function(e){this.init(e)},gl([L("eFloatingFilterText")],t.prototype,"eFloatingFilterText",void 0),gl([f("columnModel")],t.prototype,"columnModel",void 0),t}(W),yl=function(){function n(t,e,r,i){var o=this;this.alive=!0,this.context=t,this.eParent=i;var s=e.getDateCompDetails(r),a=s.newAgStackInstance();a.then(function(l){if(!o.alive){t.destroyBean(l);return}o.dateComp=l,l&&(i.appendChild(l.getGui()),l.afterGuiAttached&&l.afterGuiAttached(),o.tempValue&&l.setDate(o.tempValue),o.disabled!=null&&o.setDateCompDisabled(o.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){q(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.updateParams=function(t){var e;!((e=this.dateComp)===null||e===void 0)&&e.onParamsUpdated&&typeof this.dateComp.onParamsUpdated=="function"&&this.dateComp.onParamsUpdated(t)},n.prototype.setDateCompDisabled=function(t){this.dateComp!=null&&this.dateComp.setDisabled!=null&&this.dateComp.setDisabled(t)},n}(),Cl=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"]],i=function(o){return o.some(function(s){return e[s]!=null})?!0:(console.warn("AG Grid: ignoring FilterOptionDef as it doesn't contain one of '".concat(o,"'")),!1)};if(!r.every(i)){t.filterOptions=t.filterOptions.filter(function(o){return o===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}(),ml={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"},hd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},qn.apply(this,arguments)},Sl=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Vt=function(n){hd(t,n);function t(e,r){r===void 0&&(r={});var i=n.call(this)||this;return i.eFocusableElement=e,i.callbacks=r,i.callbacks=qn({shouldStopEventPropagation:function(){return!1},onTabKeyDown:function(o){if(!o.defaultPrevented){var s=i.focusService.findNextFocusableElement(i.eFocusableElement,!1,o.shiftKey);s&&(s.focus(),o.preventDefault())}}},r),i}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(i){if(!(i.defaultPrevented||tt(i))){if(r.callbacks.shouldStopEventPropagation(i)){dt(i);return}i.key===_.TAB?r.callbacks.onTabKeyDown(i):r.callbacks.handleKeyDown&&r.callbacks.handleKeyDown(i)}})},t.FOCUS_MANAGED_CLASS="ag-focus-managed",Sl([f("focusService")],t.prototype,"focusService",void 0),Sl([b],t.prototype,"postConstruct",null),t}(D),fd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},wl="ag-resizer-wrapper",vd='<div class="'.concat(wl,`">
|
||
<div ref="eTopLeftResizer" class="ag-resizer ag-resizer-topLeft"></div>
|
||
<div ref="eTopResizer" class="ag-resizer ag-resizer-top"></div>
|
||
<div ref="eTopRightResizer" class="ag-resizer ag-resizer-topRight"></div>
|
||
<div ref="eRightResizer" class="ag-resizer ag-resizer-right"></div>
|
||
<div ref="eBottomRightResizer" class="ag-resizer ag-resizer-bottomRight"></div>
|
||
<div ref="eBottomResizer" class="ag-resizer ag-resizer-bottom"></div>
|
||
<div ref="eBottomLeftResizer" class="ag-resizer ag-resizer-bottomLeft"></div>
|
||
<div ref="eLeftResizer" class="ag-resizer ag-resizer-left"></div>
|
||
</div>`),El=function(n){fd(t,n);function t(e,r){var i=n.call(this)||this;return i.element=e,i.dragStartPosition={x:0,y:0},i.position={x:0,y:0},i.lastSize={width:-1,height:-1},i.positioned=!1,i.resizersAdded=!1,i.resizeListeners=[],i.boundaryEl=null,i.isResizing=!1,i.isMoving=!1,i.resizable={},i.movable=!1,i.currentResizer=null,i.config=Object.assign({},{popup:!1},r),i}return t.prototype.center=function(){var e=this.offsetParent,r=e.clientHeight,i=e.clientWidth,o=i/2-this.getWidth()/2,s=r/2-this.getHeight()/2;this.offsetElement(o,s)},t.prototype.initialisePosition=function(){if(!this.positioned){var e=this.config,r=e.centered,i=e.forcePopupParentAsOffsetParent,o=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,h=Te(this.element);if(h){var v=this.findBoundaryElement(),y=window.getComputedStyle(v);if(y.minWidth!=null){var C=v.offsetWidth-this.element.offsetWidth;d=parseInt(y.minWidth,10)-C}if(y.minHeight!=null){var m=v.offsetHeight-this.element.offsetHeight;p=parseInt(y.minHeight,10)-m}}if(this.minHeight=a||p,this.minWidth=o||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(h&&i){var v=this.boundaryEl,w=!0;if(v||(v=this.findBoundaryElement(),w=!1),v){var E=parseFloat(v.style.top),S=parseFloat(v.style.left);w?this.offsetElement(isNaN(S)?0:S,isNaN(E)?0:E):this.setPosition(S,E)}}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 i=this.moveElementDragListener||{eElement:r,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragService.addDragSource(i),this.moveElementDragListener=i):(this.dragService.removeDragSource(i),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(i){var o=e,s=!!o[i],a=r.getResizerElement(i),l={dragStartPixels:0,eElement:a,onDragStart:function(u){return r.onResizeStart(u,i)},onDragging:r.onResize.bind(r),onDragStop:function(u){return r.onResizeEnd(u,i)}};(s||!r.isAlive()&&!s)&&(s?(r.dragService.addDragSource(l),r.resizeListeners.push(l),a.style.pointerEvents="all"):a.style.pointerEvents="none",r.resizable[i]=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,i=e.width;i!==-1&&(this.element.style.width="".concat(i,"px")),r!==-1&&(this.element.style.height="".concat(r,"px"))},t.prototype.getHeight=function(){return this.element.offsetHeight},t.prototype.setHeight=function(e){var r=this.config.popup,i=this.element,o=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)or(i,e),e=Mn(i),o=!0;else if(e=Math.max(this.minHeight,e),this.positioned){var s=this.getAvailableHeight();s&&e>s&&(e=s)}this.getHeight()!==e&&(o?(i.style.maxHeight="unset",i.style.minHeight="unset"):r?or(i,e):(i.style.height="".concat(e,"px"),i.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,i=e.forcePopupParentAsOffsetParent;this.positioned||this.initialisePosition();var o=this.offsetParent.clientHeight;if(!o)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(i){var p=this.element.parentElement;if(p){var d=p.getBoundingClientRect().bottom;c=d-s.bottom}}var h=o+u-l-c;return h},t.prototype.getWidth=function(){return this.element.offsetWidth},t.prototype.setWidth=function(e){var r=this.element,i=this.config.popup,o=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)qe(r,e),e=$r(r),o=!0;else if(this.positioned){e=Math.max(this.minWidth,e);var s=this.offsetParent.clientWidth,a=i?this.position.x:this.element.getBoundingClientRect().left;s&&e+a>s&&(e=s-a)}this.getWidth()!==e&&(o?(r.style.maxWidth="unset",r.style.minWidth="unset"):this.config.popup?qe(r,e):(r.style.width="".concat(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 i=this.config.forcePopupParentAsOffsetParent,o=i?this.boundaryEl:this.element;o&&(this.popupService.positionPopup({ePopup:o,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:function(){return{x:e,y:r}}}),this.setPosition(parseFloat(o.style.left),parseFloat(o.style.top)))},t.prototype.constrainSizeToAvailableHeight=function(e){var r=this;if(this.config.forcePopupParentAsOffsetParent){var i=function(){var o=r.getAvailableHeight();r.element.style.setProperty("max-height","".concat(o,"px"))};e?this.resizeObserverSubscriber=this.resizeObserverService.observeResize(this.popupService.getPopupParent(),i):(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,i=e.isLeft,o=e.isTop,s=e.anywhereWithin,a=e.topBuffer,l=r.clientX-this.dragStartPosition.x,u=r.clientY-this.dragStartPosition.y,c=this.shouldSkipX(r,!!i,!!s,l)?0:l,p=this.shouldSkipY(r,!!o,a,u)?0:u;return{movementX:c,movementY:p}},t.prototype.shouldSkipX=function(e,r,i,o){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=o<0&&e.clientX>u+a.left||o>0&&e.clientX<u+a.left:i?c=o<0&&e.clientX>l.right||o>0&&e.clientX<u+a.left:c=o<0&&e.clientX>l.right||o>0&&e.clientX<l.right,c)},t.prototype.shouldSkipY=function(e,r,i,o){i===void 0&&(i=0);var s=this.element.getBoundingClientRect(),a=this.offsetParent.getBoundingClientRect(),l=this.boundaryEl.getBoundingClientRect(),u=this.config.popup?this.position.y:s.top,c=u<=0&&a.top>=e.clientY||a.bottom<=e.clientY&&a.bottom<=l.bottom;return c?!0:(r?c=o<0&&e.clientY>u+a.top+i||o>0&&e.clientY<u+a.top:c=o<0&&e.clientY>l.bottom||o>0&&e.clientY<l.bottom,c)},t.prototype.createResizeMap=function(){var e=this.element;this.resizerMap={topLeft:{element:e.querySelector("[ref=eTopLeftResizer]")},top:{element:e.querySelector("[ref=eTopResizer]")},topRight:{element:e.querySelector("[ref=eTopRightResizer]")},right:{element:e.querySelector("[ref=eRightResizer]")},bottomRight:{element:e.querySelector("[ref=eBottomRightResizer]")},bottom:{element:e.querySelector("[ref=eBottomResizer]")},bottomLeft:{element:e.querySelector("[ref=eBottomLeftResizer]")},left:{element:e.querySelector("[ref=eLeftResizer]")}}},t.prototype.addResizers=function(){if(!this.resizersAdded){var e=this.element;if(e){var r=new DOMParser,i=r.parseFromString(vd,"text/html").body;e.appendChild(i.firstChild),this.createResizeMap(),this.resizersAdded=!0}}},t.prototype.removeResizers=function(){this.resizerMap=void 0;var e=this.element.querySelector(".".concat(wl));e&&this.element.removeChild(e),this.resizersAdded=!1},t.prototype.getResizerElement=function(e){return this.resizerMap[e].element},t.prototype.onResizeStart=function(e,r){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!r.match(/top/i),isRight:!!r.match(/right/i),isBottom:!!r.match(/bottom/i),isLeft:!!r.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[r].element.classList.add("ag-active");var i=this.config,o=i.popup,s=i.forcePopupParentAsOffsetParent;!o&&!s&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)},t.prototype.getSiblings=function(){var e=this.element,r=e.parentElement;return r?Array.prototype.slice.call(r.children).filter(function(i){return!i.classList.contains("ag-hidden")}):null},t.prototype.getMinSizeOfSiblings=function(){for(var e=this.getSiblings()||[],r=0,i=0,o=0;o<e.length;o++){var s=e[o],a=!!s.style.flex&&s.style.flex!=="0 0 auto";if(s!==this.element){var l=this.minHeight||0,u=this.minWidth||0;if(a){var c=window.getComputedStyle(s);c.minHeight&&(l=parseInt(c.minHeight,10)),c.minWidth&&(u=parseInt(c.minWidth,10))}else l=s.offsetHeight,u=s.offsetWidth;r+=l,i+=u}}return{height:r,width:i}},t.prototype.applySizeToSiblings=function(e){var r=null,i=this.getSiblings();if(i){for(var o=0;o<i.length;o++){var s=i[o];s!==r&&(e?s.style.height="".concat(s.offsetHeight,"px"):s.style.width="".concat(s.offsetWidth,"px"),s.style.flex="0 0 auto",s===this.element&&(r=i[o+1]))}r&&(r.style.removeProperty("height"),r.style.removeProperty("min-height"),r.style.removeProperty("max-height"),r.style.flex="1 1 auto")}},t.prototype.isResizable=function(){return Object.values(this.resizable).some(function(e){return e})},t.prototype.onResize=function(e){if(!(!this.isResizing||!this.currentResizer)){var r=this.config,i=r.popup,o=r.forcePopupParentAsOffsetParent,s=this.currentResizer,a=s.isTop,l=s.isRight,u=s.isBottom,c=s.isLeft,p=l||c,d=u||a,h=this.calculateMouseMovement({e,isLeft:c,isTop:a}),v=h.movementX,y=h.movementY,C=this.position.x,m=this.position.y,w=0,E=0;if(p&&v){var S=c?-1:1,R=this.getWidth(),T=R+v*S,F=!1;c&&(w=R-T,(C+w<=0||T<=this.minWidth)&&(F=!0,w=0)),F||this.setWidth(T)}if(d&&y){var S=a?-1:1,A=this.getHeight(),x=A+y*S,G=!1;a?(E=A-x,(m+E<=0||x<=this.minHeight)&&(G=!0,E=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&A<x&&this.getMinSizeOfSiblings().height+x>this.element.parentElement.offsetHeight&&(G=!0),G||this.setHeight(x)}this.updateDragStartPosition(e.clientX,e.clientY),((i||o)&&w||E)&&this.offsetElement(C+w,m+E)}},t.prototype.onResizeEnd=function(e,r){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null;var i={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(i)},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,i=r.x,o=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(i+l,o+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()},Qn([f("popupService")],t.prototype,"popupService",void 0),Qn([f("resizeObserverService")],t.prototype,"resizeObserverService",void 0),Qn([f("dragService")],t.prototype,"dragService",void 0),t}(D),gd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Zi=function(n){gd(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.buttonListeners=[],r}return t.prototype.postConstruct=function(){this.resetTemplate(),this.createManagedBean(new Vt(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 i=`
|
||
<form class="ag-filter-wrapper">
|
||
<div class="ag-filter-body-wrapper ag-`.concat(this.getCssIdentifier(),`-body-wrapper" ref="eFilterBody">
|
||
`).concat(this.createBodyTemplate(),`
|
||
</div>
|
||
</form>`);this.setTemplate(i,e),r=this.getGui(),r&&r.addEventListener("submit",this.onFormSubmit)},t.prototype.isReadOnly=function(){return!!this.providedFilterParams.readOnly},t.prototype.init=function(e){var r=this;this.setParams(e),this.resetUiToDefaults(!0).then(function(){r.updateUiVisibility(),r.setupOnBtApplyDebounce()})},t.prototype.setParams=function(e){this.providedFilterParams=e,this.applyActive=t.isUseApplyButton(e),this.resetButtonsPanel()},t.prototype.updateParams=function(e){var r=this;this.providedFilterParams=e,this.applyActive=t.isUseApplyButton(e),this.resetUiToActiveModel(this.getModel(),function(){r.updateUiVisibility(),r.setupOnBtApplyDebounce()})},t.prototype.resetButtonsPanel=function(){var e=this,r=this.providedFilterParams.buttons,i=r&&r.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(he(this.eButtonsPanel),this.buttonListeners.forEach(function(a){return a==null?void 0:a()}),this.buttonListeners=[]):i&&(this.eButtonsPanel=document.createElement("div"),this.eButtonsPanel.classList.add("ag-filter-apply-panel")),!i){this.eButtonsPanel&&Ot(this.eButtonsPanel);return}var o=document.createDocumentFragment(),s=function(a){var l,u;switch(a){case"apply":l=e.translate("applyFilter"),u=function(d){return e.onBtApply(!1,!1,d)};break;case"clear":l=e.translate("clearFilter"),u=function(){return e.onBtClear()};break;case"reset":l=e.translate("resetFilter"),u=function(){return e.onBtReset()};break;case"cancel":l=e.translate("cancelFilter"),u=function(d){e.onBtCancel(d)};break;default:console.warn("AG Grid: Unknown button type specified");return}var c=a==="apply"?"submit":"button",p=ge(`<button
|
||
type="`.concat(c,`"
|
||
ref="`).concat(a,`FilterButton"
|
||
class="ag-button ag-standard-button ag-filter-apply-panel-button"
|
||
>`).concat(l,`
|
||
</button>`));e.buttonListeners.push(e.addManagedListener(p,"click",u)),o.append(p)};zn(r).forEach(function(a){return s(a)}),this.eButtonsPanel.append(o),this.getGui().appendChild(this.eButtonsPanel)},t.prototype.getDefaultDebounceMs=function(){return 0},t.prototype.setupOnBtApplyDebounce=function(){var e=this,r=t.getDebounceMs(this.providedFilterParams,this.getDefaultDebounceMs()),i=ze(this.checkApplyDebounce.bind(this),r);this.onBtApplyDebounce=function(){e.debouncePending=!0,i()}},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,i=e!=null?this.setModelIntoUi(e):this.resetUiToDefaults();return i.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 i=this,o=function(){i.onUiChanged(!1,"prevent"),r==null||r()};e!=null?this.setModelIntoUi(e).then(o):this.resetUiToDefaults().then(o)},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 i=this.appliedModel;return this.appliedModel=r,!this.areModelsEqual(i,r)},t.prototype.isModelValid=function(e){return!0},t.prototype.onFormSubmit=function(e){e.preventDefault()},t.prototype.onBtApply=function(e,r,i){if(e===void 0&&(e=!1),r===void 0&&(r=!1),i&&i.preventDefault(),this.applyModel(r?"rowDataUpdated":"ui")){var o="columnFilter";this.providedFilterParams.filterChangedCallback({afterFloatingFilter:e,afterDataChange:r,source:o})}var s=this.providedFilterParams.closeOnApply;s&&this.applyActive&&!e&&!r&&this.close(i)},t.prototype.onNewRowsLoaded=function(){},t.prototype.close=function(e){if(this.hidePopup){var r=e,i=r&&r.key,o;(i==="Enter"||i==="Space")&&(o={keyboardEvent:r}),this.hidePopup(o),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 i=this.isModelValid(this.getModelFromUi()),o=this.getRefElement("applyFilterButton");o&&Or(o,!i)}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",i=this,o=i.positionableFeature,s=i.gridOptionsService;r?(o.restoreLastSize(),o.setResizable(s.get("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.refresh=function(e){return this.providedFilterParams=e,!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,ml[e])},t.prototype.getCellValue=function(e){return this.providedFilterParams.getValue(e)},t.prototype.getPositionableElement=function(){return this.eFilterBody},Xn([f("rowModel")],t.prototype,"rowModel",void 0),Xn([L("eFilterBody")],t.prototype,"eFilterBody",void 0),Xn([b],t.prototype,"postConstruct",null),t}(W),yd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Cd=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},_l=function(n){yd(t,n);function t(e,r){var i=n.call(this,r)||this;return i.labelSeparator="",i.labelAlignment="left",i.disabled=!1,i.label="",i.config=e||{},i}return t.prototype.postConstruct=function(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");var e=this.config,r=e.labelSeparator,i=e.label,o=e.labelWidth,s=e.labelAlignment;r!=null&&this.setLabelSeparator(r),i!=null&&this.setLabel(i),o!=null&&this.setLabelWidth(o),this.setLabelAlignment(s||this.labelAlignment),this.refreshLabel()},t.prototype.refreshLabel=function(){he(this.eLabel),typeof this.label=="string"?this.eLabel.innerText=this.label+this.labelSeparator:this.label&&this.eLabel.appendChild(this.label),this.label===""?(q(this.eLabel,!1),pe(this.eLabel,"presentation")):(q(this.eLabel,!0),pe(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-".concat(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(),i=r.classList;return i.toggle("ag-label-align-left",e==="left"),i.toggle("ag-label-align-right",e==="right"),i.toggle("ag-label-align-top",e==="top"),this},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:(Qr(this.eLabel,e),this)},t.prototype.setDisabled=function(e){e=!!e;var r=this.getGui();return Or(r,e),r.classList.toggle("ag-disabled",e),this.disabled=e,this},t.prototype.isDisabled=function(){return!!this.disabled},Cd([b],t.prototype,"postConstruct",null),t}(W),md=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Rl=function(n){md(t,n);function t(e,r,i){var o=n.call(this,e,r)||this;return o.className=i,o}return t.prototype.postConstruct=function(){n.prototype.postConstruct.call(this),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()},t.prototype.refreshAriaLabelledBy=function(){var e=this.getAriaElement(),r=this.getLabelId();Wa(e)!==null?Wi(e,""):Wi(e,r??"")},t.prototype.setAriaLabel=function(e){return Rt(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this},t.prototype.onValueChange=function(e){var r=this;return this.addManagedListener(this,g.EVENT_FIELD_VALUE_CHANGED,function(){return e(r.getValue())}),this},t.prototype.getWidth=function(){return this.getGui().clientWidth},t.prototype.setWidth=function(e){return qe(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:g.EVENT_FIELD_VALUE_CHANGED}),this)},t}(_l),Sd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},wd=`
|
||
<div class="ag-picker-field" role="presentation">
|
||
<div ref="eLabel"></div>
|
||
<div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-picker-collapsed">
|
||
<div ref="eDisplayField" class="ag-picker-field-display"></div>
|
||
<div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
|
||
</div>
|
||
</div>`,Ol=function(n){Sd(t,n);function t(e){var r=n.call(this,e,(e==null?void 0:e.template)||wd,e==null?void 0:e.className)||this;if(r.isPickerDisplayed=!1,r.skipClick=!1,r.pickerGap=4,r.hideCurrentPicker=null,r.ariaRole=e==null?void 0:e.ariaRole,r.onPickerFocusIn=r.onPickerFocusIn.bind(r),r.onPickerFocusOut=r.onPickerFocusOut.bind(r),!e)return r;var i=e.pickerGap,o=e.maxPickerHeight,s=e.variableWidth,a=e.minPickerWidth,l=e.maxPickerWidth;return i!=null&&(r.pickerGap=i),r.variableWidth=!!s,o!=null&&r.setPickerMaxHeight(o),a!=null&&r.setPickerMinWidth(a),l!=null&&r.setPickerMaxWidth(l),r}return t.prototype.postConstruct=function(){n.prototype.postConstruct.call(this),this.setupAria();var e="ag-".concat(this.getCompId(),"-display");this.eDisplayField.setAttribute("id",e);var r=this.getAriaElement();this.addManagedListener(r,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(this.eLabel,"mousedown",this.onLabelOrWrapperMouseDown.bind(this)),this.addManagedListener(this.eWrapper,"mousedown",this.onLabelOrWrapperMouseDown.bind(this));var i=this.config.pickerIcon;if(i){var o=ne(i,this.gridOptionsService);o&&this.eIcon.appendChild(o)}},t.prototype.setupAria=function(){var e=this.getAriaElement();e.setAttribute("tabindex",this.gridOptionsService.get("tabIndex").toString()),ot(e,!1),this.ariaRole&&pe(e,this.ariaRole)},t.prototype.onLabelOrWrapperMouseDown=function(e){if(e){var r=this.getFocusableElement();if(r!==this.eWrapper&&(e==null?void 0:e.target)===r)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())},t.prototype.onKeyDown=function(e){switch(e.key){case _.UP:case _.DOWN:case _.ENTER:case _.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case _.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}},t.prototype.showPicker=function(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());var e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)},t.prototype.renderAndPositionPicker=function(){var e=this,r=this.gridOptionsService.getDocument(),i=this.pickerComponent.getGui();this.gridOptionsService.get("suppressScrollWhenPopupsAreOpen")||(this.destroyMouseWheelFunc=this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL,function(){e.hidePicker()}));var o=this.localeService.getLocaleTextFunc(),s=this.config,a=s.pickerAriaLabelKey,l=s.pickerAriaLabelValue,u=s.modalPicker,c=u===void 0?!0:u,p={modal:c,eChild:i,closeOnEsc:!0,closedCallback:function(){var E=r.activeElement===r.body;e.beforeHidePicker(),E&&e.isAlive()&&e.getFocusableElement().focus()},ariaLabel:o(a,l)},d=this.popupService.addPopup(p),h=this,v=h.maxPickerHeight,y=h.minPickerWidth,C=h.maxPickerWidth,m=h.variableWidth;m?(y&&(i.style.minWidth=y),i.style.width=Qi($r(this.eWrapper)),C&&(i.style.maxWidth=C)):Qr(i,C??$r(this.eWrapper));var w=v??"".concat(zr(this.popupService.getPopupParent()),"px");return i.style.setProperty("max-height",w),i.style.position="absolute",this.alignPickerToComponent(),d.hideFunc},t.prototype.alignPickerToComponent=function(){if(this.pickerComponent){var e=this.config.pickerType,r=this.pickerGap,i=this.gridOptionsService.get("enableRtl")?"right":"left";this.popupService.positionPopupByComponent({type:e,eventSource:this.eWrapper,ePopup:this.pickerComponent.getGui(),position:"under",alignSide:i,keepWithinBounds:!0,nudgeY:r})}},t.prototype.beforeHidePicker=function(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);var e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null},t.prototype.toggleExpandedStyles=function(e){if(this.isAlive()){var r=this.getAriaElement();ot(r,e),this.eWrapper.classList.toggle("ag-picker-expanded",e),this.eWrapper.classList.toggle("ag-picker-collapsed",!e)}},t.prototype.onPickerFocusIn=function(){this.togglePickerHasFocus(!0)},t.prototype.onPickerFocusOut=function(e){var r;!((r=this.pickerComponent)===null||r===void 0)&&r.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)},t.prototype.togglePickerHasFocus=function(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)},t.prototype.hidePicker=function(){this.hideCurrentPicker&&this.hideCurrentPicker()},t.prototype.setInputWidth=function(e){return Qr(this.eWrapper,e),this},t.prototype.getFocusableElement=function(){return this.eWrapper},t.prototype.setPickerGap=function(e){return this.pickerGap=e,this},t.prototype.setPickerMinWidth=function(e){return typeof e=="number"&&(e="".concat(e,"px")),this.minPickerWidth=e??void 0,this},t.prototype.setPickerMaxWidth=function(e){return typeof e=="number"&&(e="".concat(e,"px")),this.maxPickerWidth=e??void 0,this},t.prototype.setPickerMaxHeight=function(e){return typeof e=="number"&&(e="".concat(e,"px")),this.maxPickerHeight=e??void 0,this},t.prototype.destroy=function(){this.hidePicker(),n.prototype.destroy.call(this)},Zr([f("popupService")],t.prototype,"popupService",void 0),Zr([L("eLabel")],t.prototype,"eLabel",void 0),Zr([L("eWrapper")],t.prototype,"eWrapper",void 0),Zr([L("eDisplayField")],t.prototype,"eDisplayField",void 0),Zr([L("eIcon")],t.prototype,"eIcon",void 0),t}(Rl),Ed=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),_d=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Tl=function(n){Ed(t,n);function t(e){e===void 0&&(e="default");var r=n.call(this,'<div class="ag-list ag-'.concat(e,'-list" role="listbox"></div>'))||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 _.ENTER:if(!this.highlightedEl)this.setValue(this.getValue());else{var i=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(i)}break;case _.DOWN:case _.UP:var o=r===_.DOWN,s=void 0;if(e.preventDefault(),!this.highlightedEl)s=this.itemEls[o?0:this.itemEls.length-1];else{var a=this.itemEls.indexOf(this.highlightedEl),l=a+(o?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(i){return r.addOption(i)}),this},t.prototype.addOption=function(e){var r=e.value,i=e.text,o=se(i||r);return this.options.push({value:r,text:o}),this.renderOption(r,o),this.updateIndices(),this},t.prototype.updateIndices=function(){var e=this.getGui().querySelectorAll(".ag-list-item");e.forEach(function(r,i){fn(r,i+1),hn(r,e.length)})},t.prototype.renderOption=function(e,r){var i=this,o=document.createElement("div");pe(o,"option"),o.classList.add("ag-list-item","ag-".concat(this.cssIdentifier,"-list-item")),o.innerHTML="<span>".concat(r,"</span>"),o.tabIndex=-1,this.itemEls.push(o),this.addManagedListener(o,"mouseover",function(){return i.highlightItem(o)}),this.addManagedListener(o,"mouseleave",function(){return i.clearHighlighted()}),this.addManagedListener(o,"click",function(){return i.setValue(e)}),this.getGui().appendChild(o)},t.prototype.setValue=function(e,r){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(),this;var i=this.options.findIndex(function(s){return s.value===e});if(i!==-1){var o=this.options[i];this.value=o.value,this.displayValue=o.text!=null?o.text:o.value,this.highlightItem(this.itemEls[i]),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(i){return i.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){Te(e)&&(this.clearHighlighted(),this.highlightedEl=e,this.highlightedEl.classList.add(t.ACTIVE_CLASS),Er(this.highlightedEl,!0),this.highlightedEl.focus())},t.prototype.clearHighlighted=function(){!this.highlightedEl||!Te(this.highlightedEl)||(this.highlightedEl.classList.remove(t.ACTIVE_CLASS),Er(this.highlightedEl,!1),this.highlightedEl=null)},t.prototype.fireChangeEvent=function(){this.dispatchEvent({type:g.EVENT_FIELD_VALUE_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",_d([b],t.prototype,"init",null),t}(W),Rd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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(){return Jn=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Jn.apply(this,arguments)},eo=function(n){Rd(t,n);function t(e){return n.call(this,Jn({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"smallDown",ariaRole:"combobox"},e))||this}return t.prototype.postConstruct=function(){n.prototype.postConstruct.call(this),this.createListComponent(),this.eWrapper.tabIndex=this.gridOptionsService.get("tabIndex")},t.prototype.createListComponent=function(){var e=this;this.listComponent=this.createBean(new Tl("select")),this.listComponent.setParentComponent(this);var r=this.listComponent.getAriaElement(),i="ag-select-list-".concat(this.listComponent.getCompId());r.setAttribute("id",i),yn(this.getAriaElement(),r),this.listComponent.addGuiEventListener("keydown",function(o){o.key===_.TAB&&(o.preventDefault(),o.stopImmediatePropagation(),e.getGui().dispatchEvent(new KeyboardEvent("keydown",{key:o.key,shiftKey:o.shiftKey,ctrlKey:o.ctrlKey,bubbles:!0})))}),this.listComponent.addManagedListener(this.listComponent,Tl.EVENT_ITEM_SELECTED,function(){e.hidePicker(),e.dispatchEvent({type:t.EVENT_ITEM_SELECTED})}),this.listComponent.addManagedListener(this.listComponent,g.EVENT_FIELD_VALUE_CHANGED,function(){e.listComponent&&(e.setValue(e.listComponent.getValue(),!1,!0),e.hidePicker())})},t.prototype.createPickerComponent=function(){return this.listComponent},t.prototype.showPicker=function(){this.listComponent&&(n.prototype.showPicker.call(this),this.listComponent.refreshHighlighted())},t.prototype.addOptions=function(e){var r=this;return e.forEach(function(i){return r.addOption(i)}),this},t.prototype.addOption=function(e){return this.listComponent.addOption(e),this},t.prototype.setValue=function(e,r,i){if(this.value===e||!this.listComponent)return this;i||this.listComponent.setValue(e,!0);var o=this.listComponent.getValue();return o===this.getValue()?this:(this.eDisplayField.innerHTML=this.listComponent.getDisplayValue(),n.prototype.setValue.call(this,e,r))},t.prototype.destroy=function(){this.listComponent&&(this.destroyBean(this.listComponent),this.listComponent=void 0),n.prototype.destroy.call(this)},t.EVENT_ITEM_SELECTED="selectedItem",t}(Ol),Od=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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 i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Ht=function(n){Od(t,n);function t(e,r,i,o){i===void 0&&(i="text"),o===void 0&&(o="input");var s=n.call(this,e,`
|
||
<div role="presentation">
|
||
<div ref="eLabel" class="ag-input-field-label"></div>
|
||
<div ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">
|
||
<`.concat(o,' ref="eInput" class="ag-input-field-input"></').concat(o,`>
|
||
</div>
|
||
</div>`),r)||this;return s.inputType=i,s.displayFieldTag=o,s}return t.prototype.postConstruct=function(){n.prototype.postConstruct.call(this),this.setInputType(),this.eLabel.classList.add("".concat(this.className,"-label")),this.eWrapper.classList.add("".concat(this.className,"-input-wrapper")),this.eInput.classList.add("".concat(this.className,"-input")),this.addCssClass("ag-input-field"),this.eInput.id=this.eInput.id||"ag-".concat(this.getCompId(),"-input");var e=this.config,r=e.width,i=e.value;r!=null&&this.setWidth(r),i!=null&&this.setValue(i),this.addInputListeners(),this.activateTabIndex([this.eInput])},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 Qr(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 Rt(this.eInput,e),this.refreshAriaLabelledBy(),this},t.prototype.setDisabled=function(e){return Or(this.eInput,e),n.prototype.setDisabled.call(this,e)},t.prototype.setAutoComplete=function(e){if(e===!0)ft(this.eInput,"autocomplete",null);else{var r=typeof e=="string"?e:"off";ft(this.eInput,"autocomplete",r)}return this},Zn([L("eLabel")],t.prototype,"eLabel",void 0),Zn([L("eWrapper")],t.prototype,"eWrapper",void 0),Zn([L("eInput")],t.prototype,"eInput",void 0),t}(Rl),Td=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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){Td(t,n);function t(e,r,i){r===void 0&&(r="ag-checkbox"),i===void 0&&(i="checkbox");var o=n.call(this,e,r,i)||this;return o.labelAlignment="right",o.selected=!1,o.readOnly=!1,o.passive=!1,o}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,i){this.dispatchEvent({type:g.EVENT_FIELD_VALUE_CHANGED,selected:e,previousValue:r,event:i});var o=this.getInputElement(),s={type:g.EVENT_CHECKBOX_CHANGED,id:o.id,name:o.name,selected:e,previousValue:r};this.eventService.dispatchEvent(s)},t.prototype.onCheckboxClick=function(e){if(!(this.passive||this.eInput.disabled)){var r=this.isSelected(),i=this.selected=e.target.checked;this.refreshSelectedClass(i),this.dispatchChange(i,r,e)}},t.prototype.refreshSelectedClass=function(e){this.eWrapper.classList.toggle("ag-checked",e===!0),this.eWrapper.classList.toggle("ag-indeterminate",e==null)},t}(Ht),Pd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Pl=function(n){Pd(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,g.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}(to),Dd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Ad=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},bd=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},es=function(){function n(t,e,r){this.localeService=t,this.optionsFactory=e,this.valueFormatter=r}return n.prototype.getModelAsString=function(t){var e=this;if(!t)return null;var r=t.operator!=null,i=this.localeService.getLocaleTextFunc();if(r){var o=t,s=o.conditions;if(!s){var a=o.condition1,l=o.condition2;s=[a,l]}var u=s.map(function(m){return e.getModelAsString(m)}),c=o.operator==="AND"?"andCondition":"orCondition";return u.join(" ".concat(i(c,ml[c])," "))}else{if(t.type===re.BLANK||t.type===re.NOT_BLANK)return i(t.type,t.type);var p=t,d=this.optionsFactory.getCustomOption(p.type),h=d||{},v=h.displayKey,y=h.displayName,C=h.numberOfInputs;return v&&y&&C===0?(i(v,y),y):this.conditionToString(p,d)}},n.prototype.updateParams=function(t){this.optionsFactory=t.optionsFactory},n.prototype.formatValue=function(t){var e;return this.valueFormatter?(e=this.valueFormatter(t??null))!==null&&e!==void 0?e:"":String(t)},n}(),re=function(n){Dd(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.eTypes=[],e.eJoinOperatorPanels=[],e.eJoinOperatorsAnd=[],e.eJoinOperatorsOr=[],e.eConditionBodies=[],e.listener=function(){return e.onUiChanged()},e.lastUiCompletePosition=null,e.joinOperatorId=0,e}return t.prototype.getNumberOfInputs=function(e){var r=this.optionsFactory.getCustomOption(e);if(r){var i=r.numberOfInputs;return i??1}var o=[t.EMPTY,t.NOT_BLANK,t.BLANK];return e&&o.indexOf(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(i,o){o===0?i.setValue(e,!0):i.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 i=this;if(!e&&!r)return!0;if(!e&&r||e&&!r)return!1;var o=!e.operator,s=!r.operator,a=!o&&s||o&&!s;if(a)return!1;var l;if(o){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(h,v){return i.areSimpleModelsEqual(h,v)})}return l},t.prototype.shouldRefresh=function(e){var r,i,o,s=this.getModel(),a=s?(r=s.conditions)!==null&&r!==void 0?r:[s]:null,l=(o=(i=e.filterOptions)===null||i===void 0?void 0:i.map(function(c){return typeof c=="string"?c:c.displayKey}))!==null&&o!==void 0?o:this.getDefaultFilterOptions(),u=!a||a.every(function(c){return l.find(function(p){return p===c.type})!==void 0});return!(!u||typeof e.maxNumConditions=="number"&&a&&a.length>e.maxNumConditions)},t.prototype.refresh=function(e){if(!this.shouldRefresh(e))return!1;var r=n.prototype.refresh.call(this,e);return r?(this.setParams(e),this.removeConditionsAndOperators(0),this.createOption(),this.setModel(this.getModel()),!0):!1},t.prototype.setModelIntoUi=function(e){var r=this,i=e.operator;if(i){var o=e;o.conditions||(o.conditions=[o.condition1,o.condition2]);var s=this.validateAndUpdateConditions(o.conditions),a=this.getNumConditions();if(s<a)this.removeConditionsAndOperators(s);else if(s>a)for(var l=a;l<s;l++)this.createJoinOperatorPanel(),this.createOption();var u=o.operator==="OR";this.eJoinOperatorsAnd.forEach(function(p){return p.setValue(!u,!0)}),this.eJoinOperatorsOr.forEach(function(p){return p.setValue(u,!0)}),o.conditions.forEach(function(p,d){r.eTypes[d].setValue(p.type,!0),r.setConditionIntoUi(p,d)})}else{var c=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(c.type,!0),this.setConditionIntoUi(c,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.onUiChanged(),vt.resolve()},t.prototype.validateAndUpdateConditions=function(e){var r=e.length;return r>this.maxNumConditions&&(e.splice(this.maxNumConditions),B('Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.'),r=this.maxNumConditions),r},t.prototype.doesFilterPass=function(e){var r=this,i,o=this.getModel();if(o==null)return!0;var s=o.operator,a=[];if(s){var l=o;a.push.apply(a,bd([],Ad((i=l.conditions)!==null&&i!==void 0?i:[]),!1))}else a.push(o);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 Cl,this.optionsFactory.init(e,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators(),this.isReadOnly()&&this.eFilterBody.setAttribute("tabindex","-1")},t.prototype.setNumConditions=function(e){var r,i;e.suppressAndOrCondition!=null&&B('Since v29.2 "filterParams.suppressAndOrCondition" is deprecated. Use "filterParams.maxNumConditions = 1" instead.'),e.alwaysShowBothConditions!=null&&B('Since v29.2 "filterParams.alwaysShowBothConditions" is deprecated. Use "filterParams.numAlwaysVisibleConditions = 2" instead.'),this.maxNumConditions=(r=e.maxNumConditions)!==null&&r!==void 0?r:e.suppressAndOrCondition?1:2,this.maxNumConditions<1&&(B('"filterParams.maxNumConditions" must be greater than or equal to zero.'),this.maxNumConditions=1),this.numAlwaysVisibleConditions=(i=e.numAlwaysVisibleConditions)!==null&&i!==void 0?i:e.alwaysShowBothConditions?2:1,this.numAlwaysVisibleConditions<1&&(B('"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.'),this.numAlwaysVisibleConditions=1),this.numAlwaysVisibleConditions>this.maxNumConditions&&(B('"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".'),this.numAlwaysVisibleConditions=this.maxNumConditions)},t.prototype.createOption=function(){var e=this,r=this.createManagedBean(new eo);this.eTypes.push(r),r.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(r.getGui());var i=this.createValueElement();this.eConditionBodies.push(i),this.eFilterBody.appendChild(i),this.putOptionsIntoDropdown(r),this.resetType(r);var o=this.getNumConditions()-1;this.forEachPositionInput(o,function(s){return e.resetInput(s)}),this.addChangedListeners(r,o)},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"),i=this.createJoinOperator(this.eJoinOperatorsOr,e,"or");this.eFilterBody.appendChild(e);var o=this.eJoinOperatorPanels.length-1,s=this.joinOperatorId++;this.resetJoinOperatorAnd(r,o,s),this.resetJoinOperatorOr(i,o,s),this.isReadOnly()||(r.onValueChange(this.listener),i.onValueChange(this.listener))},t.prototype.createJoinOperator=function(e,r,i){var o=this.createManagedBean(new Pl);return e.push(o),o.addCssClass("ag-filter-condition-operator"),o.addCssClass("ag-filter-condition-operator-".concat(i)),r.appendChild(o.getGui()),o},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(i){return typeof i=="string"?e.createBoilerplateListOption(i):e.createCustomListOption(i)})},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,i=this.optionsFactory.getCustomOption(e.displayKey);return{value:r,text:i?this.localeService.getLocaleTextFunc()(i.displayKey,i.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,i=!0,o=0;o<this.getNumConditions();o++)this.isConditionUiComplete(o)?r=o:i=!1;if(this.shouldAddNewConditionAtEnd(i))this.createJoinOperatorPanel(),this.createOption();else{var s=(e=this.lastUiCompletePosition)!==null&&e!==void 0?e:this.getNumConditions()-2;if(r<s){this.removeConditionsAndOperators(s+1);var a=r+1,l=s-a;l>0&&this.removeConditionsAndOperators(a,l),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=r},t.prototype.updateConditionStatusesAndValues=function(e,r){var i=this;this.eTypes.forEach(function(s,a){var l=i.isConditionDisabled(a,e);s.setDisabled(l||i.filterListOptions.length<=1),a===1&&(Or(i.eJoinOperatorPanels[0],l),i.eJoinOperatorsAnd[0].setDisabled(l),i.eJoinOperatorsOr[0].setDisabled(l))}),this.eConditionBodies.forEach(function(s,a){q(s,i.isConditionBodyVisible(a))});var o=(r??this.getJoinOperator())==="OR";this.eJoinOperatorsAnd.forEach(function(s,a){s.setValue(!o,!0)}),this.eJoinOperatorsOr.forEach(function(s,a){s.setValue(o,!0)}),this.forEachInput(function(s,a,l,u){i.setElementDisplayed(s,a<u),i.setElementDisabled(s,i.isConditionDisabled(l,e))}),this.resetPlaceholder()},t.prototype.shouldAddNewConditionAtEnd=function(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()},t.prototype.removeConditionsAndOperators=function(e,r){if(!(e>=this.getNumConditions())){this.removeComponents(this.eTypes,e,r),this.removeElements(this.eConditionBodies,e,r),this.removeValueElements(e,r);var i=Math.max(e-1,0);this.removeElements(this.eJoinOperatorPanels,i,r),this.removeComponents(this.eJoinOperatorsAnd,i,r),this.removeComponents(this.eJoinOperatorsOr,i,r)}},t.prototype.removeElements=function(e,r,i){var o=this.removeItems(e,r,i);o.forEach(function(s){return Ot(s)})},t.prototype.removeComponents=function(e,r,i){var o=this,s=this.removeItems(e,r,i);s.forEach(function(a){Ot(a.getGui()),o.destroyBean(a)})},t.prototype.removeItems=function(e,r,i){return i==null?e.splice(r):e.splice(r,i)},t.prototype.afterGuiAttached=function(e){if(n.prototype.afterGuiAttached.call(this,e),this.resetPlaceholder(),!(e!=null&&e.suppressFocus))if(this.isReadOnly())this.eFilterBody.focus();else{var r=this.getInputs(0)[0];if(!r)return;r instanceof Ht&&r.getInputElement().focus()}},t.prototype.afterGuiDetached=function(){n.prototype.afterGuiDetached.call(this);var e=this.getModel();this.resetUiToActiveModel(e);for(var r=-1,i=-1,o=!1,s=this.getJoinOperator(),a=this.getNumConditions()-1;a>=0;a--)if(this.isConditionUiComplete(a))r===-1&&(r=a,i=a);else{var l=a>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(a-1),u=a<r;(l||u)&&(this.removeConditionsAndOperators(a,1),o=!0,u&&i--)}var c=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),c=!0),this.shouldAddNewConditionAtEnd(i===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),c=!0),c&&this.updateConditionStatusesAndValues(i,s),o&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=i},t.prototype.getPlaceholderText=function(e,r){var i=this.translate(e);if(Gi(this.filterPlaceholder)){var o=this.filterPlaceholder,s=this.eTypes[r].getValue(),a=this.translate(s);i=o({filterOptionKey:s,filterOption:a,placeholder:i})}else typeof this.filterPlaceholder=="string"&&(i=this.filterPlaceholder);return i},t.prototype.resetPlaceholder=function(){var e=this,r=this.localeService.getLocaleTextFunc();this.forEachInput(function(i,o,s,a){if(i instanceof Ht){var l=o===0&&a>1?"inRangeStart":o===0?"filterOoo":"inRangeEnd",u=o===0&&a>1?r("ariaFilterFromValue","Filter from value"):o===0?r("ariaFilterValue","Filter Value"):r("ariaFilterToValue","Filter to Value");i.setInputPlaceholder(e.getPlaceholderText(l,s)),i.setInputAriaLabel(u)}})},t.prototype.setElementValue=function(e,r,i){e instanceof Ht&&e.setValue(r!=null?String(r):null,!0)},t.prototype.setElementDisplayed=function(e,r){e instanceof W&&q(e.getGui(),r)},t.prototype.setElementDisabled=function(e,r){e instanceof W&&Or(e.getGui(),r)},t.prototype.attachElementOnChange=function(e,r){e instanceof Ht&&e.onValueChange(r)},t.prototype.forEachInput=function(e){var r=this;this.getConditionTypes().forEach(function(i,o){r.forEachPositionTypeInput(o,i,e)})},t.prototype.forEachPositionInput=function(e,r){var i=this.getConditionType(e);this.forEachPositionTypeInput(e,i,r)},t.prototype.forEachPositionTypeInput=function(e,r,i){for(var o=this.getNumberOfInputs(r),s=this.getInputs(e),a=0;a<s.length;a++){var l=s[a];l!=null&&i(l,a,e,o)}},t.prototype.isConditionDisabled=function(e,r){return this.isReadOnly()?!0:e===0?!1:e>r+1},t.prototype.isConditionBodyVisible=function(e){var r=this.getConditionType(e),i=this.getNumberOfInputs(r);return i>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(i){return i==null}))},t.prototype.getNumConditions=function(){return this.eTypes.length},t.prototype.getUiCompleteConditions=function(){for(var e=[],r=0;r<this.getNumConditions();r++)this.isConditionUiComplete(r)&&e.push(this.createCondition(r));return e},t.prototype.createMissingConditionsAndOperators=function(){if(!this.isReadOnly())for(var e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()},t.prototype.resetUiToDefaults=function(e){var r=this;return this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(function(i){return r.resetType(i)}),this.eJoinOperatorsAnd.forEach(function(i,o){return r.resetJoinOperatorAnd(i,o,r.joinOperatorId+o)}),this.eJoinOperatorsOr.forEach(function(i,o){return r.resetJoinOperatorOr(i,o,r.joinOperatorId+o)}),this.joinOperatorId++,this.forEachInput(function(i){return r.resetInput(i)}),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,e||this.onUiChanged(),vt.resolve()},t.prototype.resetType=function(e){var r=this.localeService.getLocaleTextFunc(),i=r("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.getDefaultOption(),!0).setAriaLabel(i).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)},t.prototype.resetJoinOperatorAnd=function(e,r,i){this.resetJoinOperator(e,r,this.isDefaultOperator("AND"),this.translate("andCondition"),i)},t.prototype.resetJoinOperatorOr=function(e,r,i){this.resetJoinOperator(e,r,this.isDefaultOperator("OR"),this.translate("orCondition"),i)},t.prototype.resetJoinOperator=function(e,r,i,o,s){this.updateJoinOperatorDisabled(e.setValue(i,!0).setName("ag-simple-filter-and-or-".concat(this.getCompId(),"-").concat(s)).setLabel(o),r)},t.prototype.updateJoinOperatorsDisabled=function(){var e=this;this.eJoinOperatorsAnd.forEach(function(r,i){return e.updateJoinOperatorDisabled(r,i)}),this.eJoinOperatorsOr.forEach(function(r,i){return e.updateJoinOperatorDisabled(r,i)})},t.prototype.updateJoinOperatorDisabled=function(e,r){e.setDisabled(this.isReadOnly()||r>0)},t.prototype.resetInput=function(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())},t.prototype.setConditionIntoUi=function(e,r){var i=this,o=this.mapValuesFromModel(e);this.forEachInput(function(s,a,l,u){l===r&&i.setElementValue(s,o[a]!=null?o[a]:null)})},t.prototype.setValueFromFloatingFilter=function(e){var r=this;this.forEachInput(function(i,o,s,a){r.setElementValue(i,o===0&&s===0?e:null,!0)})},t.prototype.isDefaultOperator=function(e){return e===this.defaultJoinOperator},t.prototype.addChangedListeners=function(e,r){var i=this;this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(r,function(o){i.attachElementOnChange(o,i.listener)}))},t.prototype.individualConditionPasses=function(e,r){var i=this.getCellValue(e.node),o=this.mapValuesFromModel(r),s=this.optionsFactory.getCustomOption(r.type),a=this.evaluateCustomFilter(s,o,i);return a??(i==null?this.evaluateNullValue(r.type):this.evaluateNonNullValue(o,i,r,e))},t.prototype.evaluateCustomFilter=function(e,r,i){if(e!=null){var o=e.predicate;if(o!=null&&!r.some(function(s){return s==null}))return o(r,i)}},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}(Zi),Fd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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){Fd(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,i){var o=this.comparator(),s=e[0]!=null?o(e[0],r):0;switch(i.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=o(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 "'+i.type+'", it looks like the filter was configured with incorrect Filter Options'),!0}},t}(re),Dl=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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(){return ts=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},ts.apply(this,arguments)},Ld=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Al=1e3,bl=1/0,Fl=function(n){Dl(t,n);function t(e,r,i){var o=n.call(this,r,i)||this;return o.dateFilterParams=e,o}return t.prototype.conditionToString=function(e,r){var i=e.type,o=(r||{}).numberOfInputs,s=i==re.IN_RANGE||o===2,a=Oe(e.dateFrom),l=Oe(e.dateTo),u=this.dateFilterParams.inRangeFloatingFilterDateFormat;if(s){var c=a!==null?Rr(a,u):"null",p=l!==null?Rr(l,u):"null";return"".concat(c,"-").concat(p)}return a!=null?Rr(a,u):"".concat(i)},t.prototype.updateParams=function(e){n.prototype.updateParams.call(this,e),this.dateFilterParams=e.dateFilterParams},t}(es),Ll=function(n){Dl(t,n);function t(){var e=n.call(this,"dateFilter")||this;return e.eConditionPanelsFrom=[],e.eConditionPanelsTo=[],e.dateConditionFromComps=[],e.dateConditionToComps=[],e.minValidYear=Al,e.maxValidYear=bl,e.minValidDate=null,e.maxValidDate=null,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||{},i=r.dateFrom,o=r.dateTo,s=r.type;return[i&&Oe(i)||null,o&&Oe(o)||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 i=r;return r==null||i<e?-1:i>e?1:0},t.prototype.setParams=function(e){this.dateFilterParams=e,n.prototype.setParams.call(this,e);var r=function(i,o){if(e[i]!=null)if(isNaN(e[i]))console.warn("AG Grid: DateFilter ".concat(i," is not a number"));else return e[i]==null?o:Number(e[i]);return o};this.minValidYear=r("minValidYear",Al),this.maxValidYear=r("maxValidYear",bl),this.minValidYear>this.maxValidYear&&console.warn("AG Grid: DateFilter minValidYear should be <= maxValidYear"),e.minValidDate?this.minValidDate=e.minValidDate instanceof Date?e.minValidDate:Oe(e.minValidDate):this.minValidDate=null,e.maxValidDate?this.maxValidDate=e.maxValidDate instanceof Date?e.maxValidDate:Oe(e.maxValidDate):this.maxValidDate=null,this.minValidDate&&this.maxValidDate&&this.minValidDate>this.maxValidDate&&console.warn("AG Grid: DateFilter minValidDate should be <= maxValidDate"),this.filterModelFormatter=new Fl(this.dateFilterParams,this.localeService,this.optionsFactory)},t.prototype.createDateCompWrapper=function(e){var r=this,i=new yl(this.getContext(),this.userComponentFactory,{onDateChanged:function(){return r.onUiChanged()},filterParams:this.dateFilterParams},e);return this.addDestroyFunc(function(){return i.destroy()}),i},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,i,o){var s=document.createElement("div");s.classList.add("ag-filter-".concat(o)),s.classList.add("ag-filter-date-".concat(o)),r.push(s),e.appendChild(s),i.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,i){var o=this.removeItems(e,r,i);o.forEach(function(s){return s.destroy()})},t.prototype.isValidDateValue=function(e){if(e===null)return!1;if(this.minValidDate){if(e<this.minValidDate)return!1}else if(e.getUTCFullYear()<this.minValidYear)return!1;if(this.maxValidDate){if(e>this.maxValidDate)return!1}else if(e.getUTCFullYear()>this.maxValidYear)return!1;return!0},t.prototype.isConditionUiComplete=function(e){var r=this;if(!n.prototype.isConditionUiComplete.call(this,e))return!1;var i=!0;return this.forEachInput(function(o,s,a,l){a!==e||!i||s>=l||(i=i&&r.isValidDateValue(o.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),i={},o=this.getValues(e);return o.length>0&&(i.dateFrom=Ye(o[0])),o.length>1&&(i.dateTo=Ye(o[1])),ts({dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:r},i)},t.prototype.resetPlaceholder=function(){var e=this.localeService.getLocaleTextFunc(),r=this.translate("dateFormatOoo"),i=e("ariaFilterValue","Filter Value");this.forEachInput(function(o){o.setInputPlaceholder(r),o.setInputAriaLabel(i)})},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(i,o,s,a){o<a&&r.push(i.getDate())}),r},t.prototype.translate=function(e){return e===le.LESS_THAN?n.prototype.translate.call(this,"before"):e===le.GREATER_THAN?n.prototype.translate.call(this,"after"):n.prototype.translate.call(this,e)},t.prototype.getModelAsString=function(e){var r;return(r=this.filterModelFormatter.getModelAsString(e))!==null&&r!==void 0?r:""},t.DEFAULT_FILTER_OPTIONS=[le.EQUALS,le.NOT_EQUAL,le.LESS_THAN,le.GREATER_THAN,le.IN_RANGE,le.BLANK,le.NOT_BLANK],Ld([f("userComponentFactory")],t.prototype,"userComponentFactory",void 0),t}(le),Id=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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){Id(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.getDefaultDebounceMs=function(){return 0},t.prototype.destroy=function(){n.prototype.destroy.call(this)},t.prototype.isEventFromFloatingFilter=function(e){return e&&e.afterFloatingFilter},t.prototype.isEventFromDataChange=function(e){return e==null?void 0:e.afterDataChange},t.prototype.getLastType=function(){return this.lastType},t.prototype.isReadOnly=function(){return this.readOnly},t.prototype.setLastTypeFromModel=function(e){if(!e){this.lastType=this.optionsFactory.getDefaultOption();return}var r=e.operator,i;if(r){var o=e;i=o.conditions[0]}else i=e;this.lastType=i.type},t.prototype.canWeEditAfterModelFromParentFilter=function(e){if(!e)return this.isTypeEditable(this.lastType);var r=e.operator;if(r)return!1;var i=e;return this.isTypeEditable(i.type)},t.prototype.init=function(e){this.setSimpleParams(e,!1)},t.prototype.setSimpleParams=function(e,r){r===void 0&&(r=!0),this.optionsFactory=new Cl,this.optionsFactory.init(e.filterParams,this.getDefaultFilterOptions()),r||(this.lastType=this.optionsFactory.getDefaultOption()),this.readOnly=!!e.filterParams.readOnly;var i=this.isTypeEditable(this.lastType);this.setEditable(i)},t.prototype.onParamsUpdated=function(e){this.setSimpleParams(e)},t.prototype.doesFilterHaveSingleInput=function(e){var r=this.optionsFactory.getCustomOption(e),i=(r||{}).numberOfInputs;return i==null||i==1},t.prototype.isTypeEditable=function(e){var r=[re.IN_RANGE,re.EMPTY,re.BLANK,re.NOT_BLANK];return!!e&&!this.isReadOnly()&&this.doesFilterHaveSingleInput(e)&&r.indexOf(e)<0},t}(W),xd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),rs=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Md=function(n){xd(t,n);function t(){return n.call(this,`
|
||
<div class="ag-floating-filter-input" role="presentation">
|
||
<ag-input-text-field ref="eReadOnlyText"></ag-input-text-field>
|
||
<div ref="eDateWrapper" style="display: flex;"></div>
|
||
</div>`)||this}return t.prototype.getDefaultFilterOptions=function(){return Ll.DEFAULT_FILTER_OPTIONS},t.prototype.init=function(e){n.prototype.init.call(this,e),this.params=e,this.filterParams=e.filterParams,this.createDateComponent(),this.filterModelFormatter=new Fl(this.filterParams,this.localeService,this.optionsFactory);var r=this.localeService.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(r("ariaDateFilterInput","Date Filter Input"))},t.prototype.onParamsUpdated=function(e){n.prototype.onParamsUpdated.call(this,e),this.params=e,this.filterParams=e.filterParams,this.updateDateComponent(),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory,dateFilterParams:this.filterParams}),this.updateCompOnModelChange(e.currentParentModel())},t.prototype.updateCompOnModelChange=function(e){var r=!this.isReadOnly()&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(r),r){if(e){var i=e;this.dateComp.setDate(Oe(i.dateFrom))}else this.dateComp.setDate(null);this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)},t.prototype.setEditable=function(e){q(this.eDateWrapper,e),q(this.eReadOnlyText.getGui(),!e)},t.prototype.onParentModelChanged=function(e,r){this.isEventFromFloatingFilter(r)||this.isEventFromDataChange(r)||(n.prototype.setLastTypeFromModel.call(this,e),this.updateCompOnModelChange(e))},t.prototype.onDateChanged=function(){var e=this,r=this.dateComp.getDate(),i=Ye(r);this.params.parentFilterInstance(function(o){if(o){var s=Oe(i);o.onFloatingFilterChanged(e.getLastType()||null,s)}})},t.prototype.getDateComponentParams=function(){var e=Zi.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs());return{onDateChanged:ze(this.onDateChanged.bind(this),e),filterParams:this.params.column.getColDef().filterParams}},t.prototype.createDateComponent=function(){var e=this;this.dateComp=new yl(this.getContext(),this.userComponentFactory,this.getDateComponentParams(),this.eDateWrapper),this.addDestroyFunc(function(){return e.dateComp.destroy()})},t.prototype.updateDateComponent=function(){var e=this.getDateComponentParams(),r=this.gridOptionsService,i=r.api,o=r.columnApi,s=r.context;e.api=i,e.columnApi=o,e.context=s,this.dateComp.updateParams(e)},t.prototype.getFilterModelFormatter=function(){return this.filterModelFormatter},rs([f("userComponentFactory")],t.prototype,"userComponentFactory",void 0),rs([L("eReadOnlyText")],t.prototype,"eReadOnlyText",void 0),rs([L("eDateWrapper")],t.prototype,"eDateWrapper",void 0),t}(Il),Nd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Gd=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Vd=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},Hd=function(n){Nd(t,n);function t(){return n.call(this,`
|
||
<div class="ag-filter-filter">
|
||
<ag-input-text-field class="ag-date-filter" ref="eDateInput"></ag-input-text-field>
|
||
</div>`)||this}return t.prototype.destroy=function(){n.prototype.destroy.call(this)},t.prototype.init=function(e){var r=this;this.params=e,this.setParams(e);var i=this.gridOptionsService.getDocument(),o=this.eDateInput.getInputElement();this.addManagedListener(o,"mousedown",function(){r.eDateInput.isDisabled()||r.usingSafariDatePicker||o.focus()}),this.addManagedListener(o,"input",function(s){s.target===i.activeElement&&(r.eDateInput.isDisabled()||r.params.onDateChanged())})},t.prototype.setParams=function(e){var r=this.eDateInput.getInputElement(),i=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=i&&nt(),r.type=i?"date":"text";var o=e.filterParams||{},s=o.minValidYear,a=o.maxValidYear,l=o.minValidDate,u=o.maxValidDate;if(l&&s&&B("DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored."),u&&a&&B("DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored."),l&&u){var c=Vd([l,u].map(function(h){return h instanceof Date?h:Oe(h)}),2),p=c[0],d=c[1];p&&d&&p.getTime()>d.getTime()&&B("DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.")}l?l instanceof Date?r.min=Rr(l):r.min=l:s&&(r.min="".concat(s,"-01-01")),u?u instanceof Date?r.max=Rr(u):r.max=u:a&&(r.max="".concat(a,"-12-31"))},t.prototype.onParamsUpdated=function(e){this.params=e,this.setParams(e)},t.prototype.getDate=function(){return Oe(this.eDateInput.getValue())},t.prototype.setDate=function(e){this.eDateInput.setValue(Ye(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:$i()||Tn()||nt()&&On()>=14.1},Gd([L("eDateInput")],t.prototype,"eDateInput",void 0),t}(W),Bd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),sr=function(n){Bd(t,n);function t(e,r,i){return r===void 0&&(r="ag-text-field"),i===void 0&&(i="text"),n.call(this,e,r,i)||this}return t.prototype.postConstruct=function(){n.prototype.postConstruct.call(this),this.config.allowedCharPattern&&this.preventDisallowedCharacters()},t.prototype.setValue=function(e,r){return this.eInput.value!==e&&(this.eInput.value=P(e)?e:""),n.prototype.setValue.call(this,e,r)},t.prototype.setStartValue=function(e){this.setValue(e,!0)},t.prototype.preventDisallowedCharacters=function(){var e=new RegExp("[".concat(this.config.allowedCharPattern,"]")),r=function(i){Xi(i)&&i.key&&!e.test(i.key)&&i.preventDefault()};this.addManagedListener(this.eInput,"keydown",r),this.addManagedListener(this.eInput,"paste",function(i){var o,s=(o=i.clipboardData)===null||o===void 0?void 0:o.getData("text");s&&s.split("").some(function(a){return!e.test(a)})&&i.preventDefault()})},t}(Ht),kd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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(n){kd(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),i=isNaN(r)?"":e.normalizeValue(r.toString());e.value!==i&&e.setValue(i)}),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&&r<this.min?e=this.min.toString():this.max!=null&&r>this.max&&(e=this.max.toString()),e},t.prototype.adjustPrecision=function(e,r){if(this.precision==null)return e;if(r){var i=parseFloat(e).toFixed(this.precision);return parseFloat(i).toString()}var o=String(e).split(".");if(o.length>1){if(o[1].length<=this.precision)return e;if(this.precision>0)return"".concat(o[0],".").concat(o[1].slice(0,this.precision))}return o[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 i=this;return this.setValueOrInputValue(function(o){return n.prototype.setValue.call(i,o,r)},function(){return i},e)},t.prototype.setStartValue=function(e){var r=this;return this.setValueOrInputValue(function(i){return n.prototype.setValue.call(r,i,!0)},function(i){r.eInput.value=i},e)},t.prototype.setValueOrInputValue=function(e,r,i){if(P(i)){var o=this.isScientificNotation(i);if(o&&this.eInput.validity.valid)return e(i);if(!o){i=this.adjustPrecision(i);var s=this.normalizeValue(i);o=i!=s}if(o)return r(i)}return e(i)},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}(sr),xl=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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){xl(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.conditionToString=function(e,r){var i=(r||{}).numberOfInputs,o=e.type==re.IN_RANGE||i===2;return o?"".concat(this.formatValue(e.filter),"-").concat(this.formatValue(e.filterTo)):e.filter!=null?this.formatValue(e.filter):"".concat(e.type)},t}(es);function os(n){var t=(n??{}).allowedCharPattern;return t??null}var Nl=function(n){xl(t,n);function t(){var e=n.call(this,"numberFilter")||this;return e.eValuesFrom=[],e.eValuesTo=[],e}return t.prototype.refresh=function(e){return this.numberFilterParams.allowedCharPattern!==e.allowedCharPattern?!1:n.prototype.refresh.call(this,e)},t.prototype.mapValuesFromModel=function(e){var r=e||{},i=r.filter,o=r.filterTo,s=r.type;return[this.processValue(i),this.processValue(o)].slice(0,this.getNumberOfInputs(s))},t.prototype.getDefaultDebounceMs=function(){return 500},t.prototype.comparator=function(){return function(e,r){return e===r?0:e<r?1:-1}},t.prototype.setParams=function(e){this.numberFilterParams=e,n.prototype.setParams.call(this,e),this.filterModelFormatter=new Ml(this.localeService,this.optionsFactory,this.numberFilterParams.numberFormatter)},t.prototype.getDefaultFilterOptions=function(){return t.DEFAULT_FILTER_OPTIONS},t.prototype.setElementValue=function(e,r,i){var o=!i&&this.numberFilterParams.numberFormatter?this.numberFilterParams.numberFormatter(r??null):r;n.prototype.setElementValue.call(this,e,o)},t.prototype.createValueElement=function(){var e=os(this.numberFilterParams),r=document.createElement("div");return r.classList.add("ag-filter-body"),pe(r,"presentation"),this.createFromToElement(r,this.eValuesFrom,"from",e),this.createFromToElement(r,this.eValuesTo,"to",e),r},t.prototype.createFromToElement=function(e,r,i,o){var s=this.createManagedBean(o?new sr({allowedCharPattern:o}):new is);s.addCssClass("ag-filter-".concat(i)),s.addCssClass("ag-filter-filter"),r.push(s),e.appendChild(s.getGui())},t.prototype.removeValueElements=function(e,r){this.removeComponents(this.eValuesFrom,e,r),this.removeComponents(this.eValuesTo,e,r)},t.prototype.getValues=function(e){var r=this,i=[];return this.forEachPositionInput(e,function(o,s,a,l){s<l&&i.push(r.processValue(r.stringToFloat(o.getValue())))}),i},t.prototype.areSimpleModelsEqual=function(e,r){return e.filter===r.filter&&e.filterTo===r.filterTo&&e.type===r.type},t.prototype.getFilterType=function(){return"number"},t.prototype.processValue=function(e){return e==null||isNaN(e)?null:e},t.prototype.stringToFloat=function(e){if(typeof e=="number")return e;var r=ct(e);return r!=null&&r.trim()===""&&(r=null),this.numberFilterParams.numberParser?this.numberFilterParams.numberParser(r):r==null||r.trim()==="-"?null:parseFloat(r)},t.prototype.createCondition=function(e){var r=this.getConditionType(e),i={filterType:this.getFilterType(),type:r},o=this.getValues(e);return o.length>0&&(i.filter=o[0]),o.length>1&&(i.filterTo=o[1]),i},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=[le.EQUALS,le.NOT_EQUAL,le.GREATER_THAN,le.GREATER_THAN_OR_EQUAL,le.LESS_THAN,le.LESS_THAN_OR_EQUAL,le.IN_RANGE,le.BLANK,le.NOT_BLANK],t}(le),Gl=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),ro=function(){return ro=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},ro.apply(this,arguments)},Vl=function(n){Gl(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.conditionToString=function(e,r){var i=(r||{}).numberOfInputs,o=e.type==re.IN_RANGE||i===2;return o?"".concat(e.filter,"-").concat(e.filterTo):e.filter!=null?"".concat(e.filter):"".concat(e.type)},t}(es),ns=function(n){Gl(t,n);function t(){var e=n.call(this,"textFilter")||this;return e.eValuesFrom=[],e.eValuesTo=[],e}return t.trimInput=function(e){var r=e&&e.trim();return r===""?e:r},t.prototype.getDefaultDebounceMs=function(){return 500},t.prototype.setParams=function(e){this.textFilterParams=e,n.prototype.setParams.call(this,e),this.matcher=this.getTextMatcher(),this.formatter=this.textFilterParams.textFormatter||(this.textFilterParams.caseSensitive?t.DEFAULT_FORMATTER:t.DEFAULT_LOWERCASE_FORMATTER),this.filterModelFormatter=new Vl(this.localeService,this.optionsFactory)},t.prototype.getTextMatcher=function(){var e=this.textFilterParams.textCustomComparator;return e?(z.warnOnce("textCustomComparator is deprecated, use textMatcher instead."),function(r){var i=r.filterOption,o=r.value,s=r.filterText;return e(i,o,s)}):this.textFilterParams.textMatcher||t.DEFAULT_MATCHER},t.prototype.createCondition=function(e){var r=this.getConditionType(e),i={filterType:this.getFilterType(),type:r},o=this.getValuesWithSideEffects(e,!0);return o.length>0&&(i.filter=o[0]),o.length>1&&(i.filterTo=o[1]),i},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){return this.getValuesWithSideEffects(e,!1)},t.prototype.getValuesWithSideEffects=function(e,r){var i=this,o=[];return this.forEachPositionInput(e,function(s,a,l,u){var c;if(a<u){var p=ct(s.getValue());r&&i.textFilterParams.trimInput&&(p=(c=t.trimInput(p))!==null&&c!==void 0?c:null,s.setValue(p,!0)),o.push(p)}}),o},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"),pe(e,"presentation"),this.createFromToElement(e,this.eValuesFrom,"from"),this.createFromToElement(e,this.eValuesTo,"to"),e},t.prototype.createFromToElement=function(e,r,i){var o=this.createManagedBean(new sr);o.addCssClass("ag-filter-".concat(i)),o.addCssClass("ag-filter-filter"),r.push(o),e.appendChild(o.getGui())},t.prototype.removeValueElements=function(e,r){this.removeComponents(this.eValuesFrom,e,r),this.removeComponents(this.eValuesTo,e,r)},t.prototype.mapValuesFromModel=function(e){var r=e||{},i=r.filter,o=r.filterTo,s=r.type;return[i||null,o||null].slice(0,this.getNumberOfInputs(s))},t.prototype.evaluateNullValue=function(e){var r=[re.NOT_EQUAL,re.NOT_CONTAINS,re.BLANK];return e?r.indexOf(e)>=0:!1},t.prototype.evaluateNonNullValue=function(e,r,i,o){var s=this,a=e.map(function(m){return s.formatter(m)})||[],l=this.formatter(r),u=this.textFilterParams,c=u.api,p=u.colDef,d=u.column,h=u.columnApi,v=u.context,y=u.textFormatter;if(i.type===re.BLANK)return this.isBlank(r);if(i.type===re.NOT_BLANK)return!this.isBlank(r);var C={api:c,colDef:p,column:d,columnApi:h,context:v,node:o.node,data:o.data,filterOption:i.type,value:l,textFormatter:y};return a.some(function(m){return s.matcher(ro(ro({},C),{filterText:m}))})},t.prototype.getModelAsString=function(e){var r;return(r=this.filterModelFormatter.getModelAsString(e))!==null&&r!==void 0?r:""},t.DEFAULT_FILTER_OPTIONS=[re.CONTAINS,re.NOT_CONTAINS,re.EQUALS,re.NOT_EQUAL,re.STARTS_WITH,re.ENDS_WITH,re.BLANK,re.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,i=e.value,o=e.filterText;if(o==null)return!1;switch(r){case t.CONTAINS:return i.indexOf(o)>=0;case t.NOT_CONTAINS:return i.indexOf(o)<0;case t.EQUALS:return i===o;case t.NOT_EQUAL:return i!=o;case t.STARTS_WITH:return i.indexOf(o)===0;case t.ENDS_WITH:var s=i.lastIndexOf(o);return s>=0&&s===i.length-o.length;default:return!1}},t}(re),Hl=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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 i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Bl=function(n){Hl(t,n);function t(e){var r=n.call(this)||this;return r.params=e,r.valueChangedListener=function(){},r}return t.prototype.setupGui=function(e){var r=this,i;this.eFloatingFilterTextInput=this.createManagedBean(new sr((i=this.params)===null||i===void 0?void 0:i.config));var o=this.eFloatingFilterTextInput.getGui();e.appendChild(o),this.addManagedListener(o,"input",function(s){return r.valueChangedListener(s)}),this.addManagedListener(o,"keydown",function(s){return r.valueChangedListener(s)})},t.prototype.setEditable=function(e){this.eFloatingFilterTextInput.setDisabled(!e)},t.prototype.setAutoComplete=function(e){this.eFloatingFilterTextInput.setAutoComplete(e)},t.prototype.getValue=function(){return this.eFloatingFilterTextInput.getValue()},t.prototype.setValue=function(e,r){this.eFloatingFilterTextInput.setValue(e,r)},t.prototype.setValueChangedListener=function(e){this.valueChangedListener=e},t.prototype.setParams=function(e){this.setAriaLabel(e.ariaLabel),e.autoComplete!==void 0&&this.setAutoComplete(e.autoComplete)},t.prototype.setAriaLabel=function(e){this.eFloatingFilterTextInput.setInputAriaLabel(e)},t}(D),kl=function(n){Hl(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.postConstruct=function(){this.setTemplate(`
|
||
<div class="ag-floating-filter-input" role="presentation" ref="eFloatingFilterInputContainer"></div>
|
||
`)},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.setupFloatingFilterInputService(e),n.prototype.init.call(this,e),this.setTextInputParams(e)},t.prototype.setupFloatingFilterInputService=function(e){this.floatingFilterInputService=this.createFloatingFilterInputService(e),this.floatingFilterInputService.setupGui(this.eFloatingFilterInputContainer)},t.prototype.setTextInputParams=function(e){var r;this.params=e;var i=(r=e.browserAutoComplete)!==null&&r!==void 0?r:!1;if(this.floatingFilterInputService.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:i}),this.applyActive=Zi.isUseApplyButton(this.params.filterParams),!this.isReadOnly()){var o=Zi.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs()),s=ze(this.syncUpWithParentFilter.bind(this),o);this.floatingFilterInputService.setValueChangedListener(s)}},t.prototype.onParamsUpdated=function(e){n.prototype.onParamsUpdated.call(this,e),this.setTextInputParams(e)},t.prototype.recreateFloatingFilterInputService=function(e){var r=this.floatingFilterInputService.getValue();he(this.eFloatingFilterInputContainer),this.destroyBean(this.floatingFilterInputService),this.setupFloatingFilterInputService(e),this.floatingFilterInputService.setValue(r,!0)},t.prototype.getAriaLabel=function(e){var r=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();return"".concat(r," ").concat(i("ariaFilterInput","Filter Input"))},t.prototype.syncUpWithParentFilter=function(e){var r=this,i=e.key===_.ENTER;if(!(this.applyActive&&!i)){var o=this.floatingFilterInputService.getValue();this.params.filterParams.trimInput&&(o=ns.trimInput(o),this.floatingFilterInputService.setValue(o,!0)),this.params.parentFilterInstance(function(s){s&&s.onFloatingFilterChanged(r.getLastType()||null,o||null)})}},t.prototype.setEditable=function(e){this.floatingFilterInputService.setEditable(e)},ss([f("columnModel")],t.prototype,"columnModel",void 0),ss([L("eFloatingFilterInputContainer")],t.prototype,"eFloatingFilterInputContainer",void 0),ss([b],t.prototype,"postConstruct",null),t}(Il),Wl=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Wd=function(n){Wl(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.valueChangedListener=function(){},e.numberInputActive=!0,e}return t.prototype.setupGui=function(e){var r=this;this.eFloatingFilterNumberInput=this.createManagedBean(new is),this.eFloatingFilterTextInput=this.createManagedBean(new sr),this.eFloatingFilterTextInput.setDisabled(!0);var i=this.eFloatingFilterNumberInput.getGui(),o=this.eFloatingFilterTextInput.getGui();e.appendChild(i),e.appendChild(o),this.setupListeners(i,function(s){return r.valueChangedListener(s)}),this.setupListeners(o,function(s){return r.valueChangedListener(s)})},t.prototype.setEditable=function(e){this.numberInputActive=e,this.eFloatingFilterNumberInput.setDisplayed(this.numberInputActive),this.eFloatingFilterTextInput.setDisplayed(!this.numberInputActive)},t.prototype.setAutoComplete=function(e){this.eFloatingFilterNumberInput.setAutoComplete(e),this.eFloatingFilterTextInput.setAutoComplete(e)},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.setValueChangedListener=function(e){this.valueChangedListener=e},t.prototype.setupListeners=function(e,r){this.addManagedListener(e,"input",r),this.addManagedListener(e,"keydown",r)},t.prototype.setParams=function(e){this.setAriaLabel(e.ariaLabel),e.autoComplete!==void 0&&this.setAutoComplete(e.autoComplete)},t.prototype.setAriaLabel=function(e){this.eFloatingFilterNumberInput.setInputAriaLabel(e),this.eFloatingFilterTextInput.setInputAriaLabel(e)},t}(D),jd=function(n){Wl(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.init=function(e){var r;n.prototype.init.call(this,e),this.filterModelFormatter=new Ml(this.localeService,this.optionsFactory,(r=e.filterParams)===null||r===void 0?void 0:r.numberFormatter)},t.prototype.onParamsUpdated=function(e){var r=os(e.filterParams);r!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),n.prototype.onParamsUpdated.call(this,e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})},t.prototype.getDefaultFilterOptions=function(){return Nl.DEFAULT_FILTER_OPTIONS},t.prototype.getFilterModelFormatter=function(){return this.filterModelFormatter},t.prototype.createFloatingFilterInputService=function(e){return this.allowedCharPattern=os(e.filterParams),this.allowedCharPattern?this.createManagedBean(new Bl({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new Wd)},t}(kl),Ud=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),zd=function(n){Ud(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 Vl(this.localeService,this.optionsFactory)},t.prototype.onParamsUpdated=function(e){n.prototype.onParamsUpdated.call(this,e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})},t.prototype.getDefaultFilterOptions=function(){return ns.DEFAULT_FILTER_OPTIONS},t.prototype.getFilterModelFormatter=function(){return this.filterModelFormatter},t.prototype.createFloatingFilterInputService=function(){return this.createManagedBean(new Bl)},t}(kl),Be=function(){function n(t,e){e===void 0&&(e=!1);var r=this;this.destroyFuncs=[],this.touching=!1,this.eventService=new Lt,this.eElement=t,this.preventMouseClick=e;var i=this.onTouchStart.bind(this),o=this.onTouchMove.bind(this),s=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",i,{passive:!0}),this.eElement.addEventListener("touchmove",o,{passive:!0}),this.eElement.addEventListener("touchend",s,{passive:!1}),this.destroyFuncs.push(function(){r.eElement.removeEventListener("touchstart",i,{passive:!0}),r.eElement.removeEventListener("touchmove",o,{passive:!0}),r.eElement.removeEventListener("touchend",s,{passive:!1})})}return n.prototype.getActiveTouch=function(t){for(var e=0;e<t.length;e++){var r=t[e].identifier===this.touchStart.identifier;if(r)return t[e]}return null},n.prototype.addEventListener=function(t,e){this.eventService.addEventListener(t,e)},n.prototype.removeEventListener=function(t,e){this.eventService.removeEventListener(t,e)},n.prototype.onTouchStart=function(t){var e=this;if(!this.touching){this.touchStart=t.touches[0],this.touching=!0,this.moved=!1;var r=this.touchStart;window.setTimeout(function(){var i=e.touchStart===r;if(e.touching&&i&&!e.moved){e.moved=!0;var o={type:n.EVENT_LONG_TAP,touchStart:e.touchStart,touchEvent:t};e.eventService.dispatchEvent(o)}},500)}},n.prototype.onTouchMove=function(t){if(this.touching){var e=this.getActiveTouch(t.touches);if(e){var r=!Un(e,this.touchStart,4);r&&(this.moved=!0)}}},n.prototype.onTouchEnd=function(t){if(this.touching){if(!this.moved){var e={type:n.EVENT_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(e),this.checkForDoubleTap()}this.preventMouseClick&&t.cancelable&&t.preventDefault(),this.touching=!1}},n.prototype.checkForDoubleTap=function(){var t=new Date().getTime();if(this.lastTapTime&&this.lastTapTime>0){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}(),$d=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),ar=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},as=function(n){$d(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,i,o,s){this.eSortOrder=e,this.eSortAsc=r,this.eSortDesc=i,this.eSortMixed=o,this.eSortNone=s},t.prototype.setupSort=function(e,r){var i=this;r===void 0&&(r=!1),this.column=e,this.suppressOrder=r,this.setupMultiSortIndicator(),this.column.isSortable()&&(this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addManagedPropertyListener("unSortIcon",function(){return i.updateIcons()}),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,function(){return i.updateIcons()}),this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,function(){return i.onSortChanged()}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,function(){return i.onSortChanged()}),this.onSortChanged())},t.prototype.addInIcon=function(e,r,i){if(r!=null){var o=ne(e,this.gridOptionsService,i);o&&r.appendChild(o)}},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";q(this.eSortAsc,r,{skipAriaHidden:!0})}if(this.eSortDesc){var i=e==="desc";q(this.eSortDesc,i,{skipAriaHidden:!0})}if(this.eSortNone){var o=!this.column.getColDef().unSortIcon&&!this.gridOptionsService.get("unSortIcon"),s=e==null;q(this.eSortNone,!o&&s,{skipAriaHidden:!0})}},t.prototype.setupMultiSortIndicator=function(){var e=this;this.addInIcon("sortUnSort",this.eSortMixed,this.column);var r=this.column.getColDef().showRowGroup,i=this.gridOptionsService.isColumnsSortingCoupledToGroup();i&&r&&(this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,function(){return e.updateMultiSortIndicator()}),this.addManagedListener(this.eventService,g.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";q(this.eSortMixed,e,{skipAriaHidden:!0})}},t.prototype.updateSortOrder=function(){var e=this,r;if(this.eSortOrder){var i=this.sortController.getColumnsWithSortingOrdered(),o=(r=this.sortController.getDisplaySortIndexForColumn(this.column))!==null&&r!==void 0?r:-1,s=i.some(function(l){var u;return(u=e.sortController.getDisplaySortIndexForColumn(l))!==null&&u!==void 0?u:-1>=1}),a=o>=0&&s;q(this.eSortOrder,a,{skipAriaHidden:!0}),o>=0?this.eSortOrder.innerHTML=(o+1).toString():he(this.eSortOrder)}},t.TEMPLATE=`<span class="ag-sort-indicator-container">
|
||
<span ref="eSortOrder" class="ag-sort-indicator-icon ag-sort-order ag-hidden" aria-hidden="true"></span>
|
||
<span ref="eSortAsc" class="ag-sort-indicator-icon ag-sort-ascending-icon ag-hidden" aria-hidden="true"></span>
|
||
<span ref="eSortDesc" class="ag-sort-indicator-icon ag-sort-descending-icon ag-hidden" aria-hidden="true"></span>
|
||
<span ref="eSortMixed" class="ag-sort-indicator-icon ag-sort-mixed-icon ag-hidden" aria-hidden="true"></span>
|
||
<span ref="eSortNone" class="ag-sort-indicator-icon ag-sort-none-icon ag-hidden" aria-hidden="true"></span>
|
||
</span>`,ar([L("eSortOrder")],t.prototype,"eSortOrder",void 0),ar([L("eSortAsc")],t.prototype,"eSortAsc",void 0),ar([L("eSortDesc")],t.prototype,"eSortDesc",void 0),ar([L("eSortMixed")],t.prototype,"eSortMixed",void 0),ar([L("eSortNone")],t.prototype,"eSortNone",void 0),ar([f("columnModel")],t.prototype,"columnModel",void 0),ar([f("sortController")],t.prototype,"sortController",void 0),t}(W),Kd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),ke=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Yd=function(n){Kd(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.lastMovingChanged=0,e}return t.prototype.destroy=function(){n.prototype.destroy.call(this)},t.prototype.refresh=function(e){return this.params=e,this.workOutTemplate()!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||this.workOutSort()!=this.currentSort||this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide?!1:(this.setDisplayName(e),!0)},t.prototype.workOutTemplate=function(){var e=Ea(this.params.template,t.TEMPLATE);return e=e&&e.trim?e.trim():e,e},t.prototype.init=function(e){this.params=e,this.currentTemplate=this.workOutTemplate(),this.setTemplate(this.currentTemplate),this.setupTap(),this.setupIcons(e.column),this.setMenu(),this.setupSort(),this.setupFilterIcon(),this.setDisplayName(e)},t.prototype.setDisplayName=function(e){if(this.currentDisplayName!=e.displayName){this.currentDisplayName=e.displayName;var r=se(this.currentDisplayName);this.eText&&(this.eText.innerHTML=r)}},t.prototype.setupIcons=function(e){this.addInIcon("menu",this.eMenu,e),this.addInIcon("filter",this.eFilter,e)},t.prototype.addInIcon=function(e,r,i){if(r!=null){var o=ne(e,this.gridOptionsService,i);o&&r.appendChild(o)}},t.prototype.setupTap=function(){var e=this,r=this.gridOptionsService;if(!r.get("suppressTouch")){var i=new Be(this.getGui(),!0),o=r.get("suppressMenuHide"),s=o&&P(this.eMenu),a=s?new Be(this.eMenu,!0):i;if(this.params.enableMenu){var l=s?"EVENT_TAP":"EVENT_LONG_TAP",u=function(p){r.api.showColumnMenuAfterMouseClick(e.params.column,p.touchStart)};this.addManagedListener(a,Be[l],u)}if(this.params.enableSorting){var c=function(p){var d=p.touchStart.target;o&&e.eMenu.contains(d)||e.sortController.progressSort(e.params.column,!1,"uiColumnSorted")};this.addManagedListener(i,Be.EVENT_TAP,c)}this.addDestroyFunc(function(){return i.destroy()}),s&&this.addDestroyFunc(function(){return a.destroy()})}},t.prototype.workOutShowMenu=function(){var e=!this.gridOptionsService.get("suppressMenuHide"),r=Nt()&&e,i=this.params.enableMenu&&!r;return i},t.prototype.shouldSuppressMenuHide=function(){return this.gridOptionsService.get("suppressMenuHide")},t.prototype.setMenu=function(){var e=this;if(this.eMenu){if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){Ot(this.eMenu);return}this.currentSuppressMenuHide=this.shouldSuppressMenuHide(),this.addManagedListener(this.eMenu,"click",function(){return e.showMenu(e.eMenu)}),this.eMenu.classList.toggle("ag-header-menu-always-show",this.currentSuppressMenuHide)}},t.prototype.showMenu=function(e){e||(e=this.eMenu),this.menuFactory.showMenuAfterButtonClick(this.params.column,e,"columnMenu")},t.prototype.workOutSort=function(){return this.params.enableSorting},t.prototype.setupSort=function(){var e=this;if(this.currentSort=this.params.enableSorting,this.eSortIndicator||(this.eSortIndicator=this.context.createBean(new as(!0)),this.eSortIndicator.attachCustomElements(this.eSortOrder,this.eSortAsc,this.eSortDesc,this.eSortMixed,this.eSortNone)),this.eSortIndicator.setupSort(this.params.column),!!this.currentSort){this.addManagedListener(this.params.column,Z.EVENT_MOVING_CHANGED,function(){e.lastMovingChanged=new Date().getTime()}),this.eLabel&&this.addManagedListener(this.eLabel,"click",function(i){var o=e.params.column.isMoving(),s=new Date().getTime(),a=s-e.lastMovingChanged<50,l=o||a;if(!l){var u=e.gridOptionsService.get("multiSortKey")==="ctrl",c=u?i.ctrlKey||i.metaKey:i.shiftKey;e.params.progressSort(c)}});var r=function(){if(e.addOrRemoveCssClass("ag-header-cell-sorted-asc",e.params.column.isSortAscending()),e.addOrRemoveCssClass("ag-header-cell-sorted-desc",e.params.column.isSortDescending()),e.addOrRemoveCssClass("ag-header-cell-sorted-none",e.params.column.isSortNone()),e.params.column.getColDef().showRowGroup){var i=e.columnModel.getSourceColumnsForGroupColumn(e.params.column),o=i==null?void 0:i.every(function(a){return e.params.column.getSort()==a.getSort()}),s=!o;e.addOrRemoveCssClass("ag-header-cell-sorted-mixed",s)}};this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,r),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,r)}},t.prototype.setupFilterIcon=function(){this.eFilter&&(this.addManagedListener(this.params.column,Z.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.onFilterChanged())},t.prototype.onFilterChanged=function(){var e=this.params.column.isFilterActive();q(this.eFilter,e,{skipAriaHidden:!0})},t.TEMPLATE=`<div class="ag-cell-label-container" role="presentation">
|
||
<span ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>
|
||
<div ref="eLabel" class="ag-header-cell-label" role="presentation">
|
||
<span ref="eText" class="ag-header-cell-text"></span>
|
||
<span ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>
|
||
<ag-sort-indicator ref="eSortIndicator"></ag-sort-indicator>
|
||
</div>
|
||
</div>`,ke([f("sortController")],t.prototype,"sortController",void 0),ke([f("menuFactory")],t.prototype,"menuFactory",void 0),ke([f("columnModel")],t.prototype,"columnModel",void 0),ke([L("eFilter")],t.prototype,"eFilter",void 0),ke([L("eSortIndicator")],t.prototype,"eSortIndicator",void 0),ke([L("eMenu")],t.prototype,"eMenu",void 0),ke([L("eLabel")],t.prototype,"eLabel",void 0),ke([L("eText")],t.prototype,"eText",void 0),ke([L("eSortOrder")],t.prototype,"eSortOrder",void 0),ke([L("eSortAsc")],t.prototype,"eSortAsc",void 0),ke([L("eSortDesc")],t.prototype,"eSortDesc",void 0),ke([L("eSortMixed")],t.prototype,"eSortMixed",void 0),ke([L("eSortNone")],t.prototype,"eSortNone",void 0),t}(W),qd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),ls=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Qd=function(n){qd(t,n);function t(){return n.call(this,t.TEMPLATE)||this}return t.prototype.destroy=function(){n.prototype.destroy.call(this)},t.prototype.init=function(e){this.params=e,this.checkWarnings(),this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()},t.prototype.checkWarnings=function(){var e=this.params;e.template&&B("A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)")},t.prototype.setupExpandIcons=function(){var e=this;this.addInIcon("columnGroupOpened","agOpened"),this.addInIcon("columnGroupClosed","agClosed");var r=function(s){if(!tt(s)){var a=!e.params.columnGroup.isExpanded();e.columnModel.setColumnGroupOpened(e.params.columnGroup.getProvidedColumnGroup(),a,"uiColumnExpanded")}};this.addTouchAndClickListeners(this.eCloseIcon,r),this.addTouchAndClickListeners(this.eOpenIcon,r);var i=function(s){dt(s)};this.addManagedListener(this.eCloseIcon,"dblclick",i),this.addManagedListener(this.eOpenIcon,"dblclick",i),this.addManagedListener(this.getGui(),"dblclick",r),this.updateIconVisibility();var o=this.params.columnGroup.getProvidedColumnGroup();this.addManagedListener(o,oe.EVENT_EXPANDED_CHANGED,this.updateIconVisibility.bind(this)),this.addManagedListener(o,oe.EVENT_EXPANDABLE_CHANGED,this.updateIconVisibility.bind(this))},t.prototype.addTouchAndClickListeners=function(e,r){var i=new Be(e,!0);this.addManagedListener(i,Be.EVENT_TAP,r),this.addDestroyFunc(function(){return i.destroy()}),this.addManagedListener(e,"click",r)},t.prototype.updateIconVisibility=function(){var e=this.params.columnGroup;if(e.isExpandable()){var r=this.params.columnGroup.isExpanded();q(this.eOpenIcon,r),q(this.eCloseIcon,!r)}else q(this.eOpenIcon,!1),q(this.eCloseIcon,!1)},t.prototype.addInIcon=function(e,r){var i=ne(e,this.gridOptionsService,null);i&&this.getRefElement(r).appendChild(i)},t.prototype.addGroupExpandIcon=function(){if(!this.params.columnGroup.isExpandable()){q(this.eOpenIcon,!1),q(this.eCloseIcon,!1);return}},t.prototype.setupLabel=function(){var e,r=this.params,i=r.displayName,o=r.columnGroup;if(P(i)){var s=se(i);this.getRefElement("agLabel").innerHTML=s}this.addOrRemoveCssClass("ag-sticky-label",!(!((e=o.getColGroupDef())===null||e===void 0)&&e.suppressStickyLabel))},t.TEMPLATE=`<div class="ag-header-group-cell-label" ref="agContainer" role="presentation">
|
||
<span ref="agLabel" class="ag-header-group-text" role="presentation"></span>
|
||
<span ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span>
|
||
<span ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span>
|
||
</div>`,ls([f("columnModel")],t.prototype,"columnModel",void 0),ls([L("agOpened")],t.prototype,"eOpenIcon",void 0),ls([L("agClosed")],t.prototype,"eCloseIcon",void 0),t}(W),Xd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),lr=function(n){Xd(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),Jd=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Zd=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},eh=function(n){Jd(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),P(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===_.LEFT||r===_.UP||r===_.RIGHT||r===_.DOWN||e.shiftKey&&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!P(e)&&!P(this.params.value)?this.params.value:this.params.parseValue(e)},t.TEMPLATE=`<div class="ag-large-text">
|
||
<ag-input-text-area ref="eTextArea" class="ag-large-text-input"></ag-input-text-area>
|
||
</div>`,Zd([L("eTextArea")],t.prototype,"eTextArea",void 0),t}(lr),th=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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 i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},rh=function(n){th(t,n);function t(){var e=n.call(this,`<div class="ag-cell-edit-wrapper">
|
||
<ag-select class="ag-cell-editor" ref="eSelect"></ag-select>
|
||
</div>`)||this;return e.startedByEnter=!1,e}return t.prototype.init=function(e){this.focusAfterAttached=e.cellStartedEdit;var r=this,i=r.eSelect,o=r.valueFormatterService,s=r.gridOptionsService,a=e.values,l=e.value,u=e.eventKey;if(V(a)){console.warn("AG Grid: no values found for select cellEditor");return}this.startedByEnter=u!=null?u===_.ENTER:!1;var c=!1;a.forEach(function(v){var y={value:v},C=o.formatValue(e.column,null,v),m=C!=null;y.text=m?C:v,i.addOption(y),c=c||l===v}),c?i.setValue(e.value,!0):e.values.length&&i.setValue(e.values[0],!0);var p=e.valueListGap,d=e.valueListMaxWidth,h=e.valueListMaxHeight;p!=null&&i.setPickerGap(p),h!=null&&i.setPickerMaxHeight(h),d!=null&&i.setPickerMaxWidth(d),s.get("editType")!=="fullRow"&&this.addManagedListener(this.eSelect,eo.EVENT_ITEM_SELECTED,function(){return e.stopEditing()})},t.prototype.afterGuiAttached=function(){var e=this;this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&setTimeout(function(){e.isAlive()&&e.eSelect.showPicker()})},t.prototype.focusIn=function(){this.eSelect.getFocusableElement().focus()},t.prototype.getValue=function(){return this.eSelect.getValue()},t.prototype.isPopup=function(){return!1},jl([f("valueFormatterService")],t.prototype,"valueFormatterService",void 0),jl([L("eSelect")],t.prototype,"eSelect",void 0),t}(lr),ih=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),oh=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},io=function(n){ih(t,n);function t(e){var r=n.call(this,`
|
||
<div class="ag-cell-edit-wrapper">
|
||
`.concat(e.getTemplate(),`
|
||
</div>`))||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 i;if(e.cellStartedEdit){this.focusAfterAttached=!0;var o=e.eventKey;o===_.BACKSPACE||e.eventKey===_.DELETE?i="":o&&o.length===1?i=o:(i=this.cellEditorInput.getStartValue(),o!==_.F2&&(this.highlightAllOnFocus=!0))}else this.focusAfterAttached=!1,i=this.cellEditorInput.getStartValue();i!=null&&r.setStartValue(i),this.addManagedListener(r.getGui(),"keydown",function(s){var a=s.key;(a===_.PAGE_UP||a===_.PAGE_DOWN)&&s.preventDefault()})},t.prototype.afterGuiAttached=function(){var e,r,i=this.localeService.getLocaleTextFunc(),o=this.eInput;if(o.setInputAriaLabel(i("ariaInputEditor","Input Editor")),!!this.focusAfterAttached){nt()||o.getFocusableElement().focus();var s=o.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(),i=e.getInputElement();r.focus(),i.select()},t.prototype.getValue=function(){return this.cellEditorInput.getValue()},t.prototype.isPopup=function(){return!1},oh([L("eInput")],t.prototype,"eInput",void 0),t}(lr),nh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),sh=function(){function n(){}return n.prototype.getTemplate=function(){return'<ag-input-text-field class="ag-cell-editor" ref="eInput"></ag-input-text-field>'},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!P(t)&&!P(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=P(t)&&t.length||0;e&&this.eInput.getInputElement().setSelectionRange(e,e)},n}(),Ul=function(n){nh(t,n);function t(){return n.call(this,new sh)||this}return t}(io),ah=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),lh=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},uh="↑",ch="↓",ph=function(n){ah(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 i=Math.abs(r),o=e.formatValue(i),s=P(o)?o:i,a=r>=0;a?this.eDelta.innerHTML=uh+s:this.eDelta.innerHTML=ch+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"),he(this.eDelta)},t.prototype.refresh=function(e){var r=e.value;if(r===this.lastValue||(P(e.valueFormatted)?this.eValue.innerHTML=e.valueFormatted:P(e.value)?this.eValue.innerHTML=r:he(this.eValue),this.filterManager.isSuppressFlashingCellsBecauseFiltering()))return!1;if(typeof r=="number"&&typeof this.lastValue=="number"){var i=r-this.lastValue;this.showDelta(e,i)}return this.lastValue&&this.eValue.classList.add("ag-value-change-value-highlight"),this.setTimerToRemoveDelta(),this.lastValue=r,!0},t.TEMPLATE='<span><span class="ag-value-change-delta"></span><span class="ag-value-change-value"></span></span>',lh([f("filterManager")],t.prototype,"filterManager",void 0),t}(W),dh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),hh=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},fh=function(n){dh(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=ge('<span class="ag-value-slide-previous ag-value-slide-out"></span>'),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 V(r)&&(r=""),r===this.lastValue||this.filterManager.isSuppressFlashingCellsBecauseFiltering()?!1:(this.addSlideAnimation(),this.lastValue=r,P(e.valueFormatted)?this.eCurrent.innerHTML=e.valueFormatted:P(e.value)?this.eCurrent.innerHTML=r:he(this.eCurrent),!0)},t.TEMPLATE=`<span>
|
||
<span class="ag-value-slide-current"></span>
|
||
</span>`,hh([f("filterManager")],t.prototype,"filterManager",void 0),t}(W),Dr=function(){return Dr=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Dr.apply(this,arguments)},U=function(){function n(t){this.rowIndex=null,this.key=null,this.childrenMapped={},this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=n.OBJECT_ID_SEQUENCE++,this.__autoHeights={},this.alreadyRendered=!1,this.highlighted=null,this.hovered=!1,this.selected=!1,this.beans=t}return n.prototype.setData=function(t){this.setDataCommon(t,!1)},n.prototype.updateData=function(t){this.setDataCommon(t,!0)},n.prototype.setDataCommon=function(t,e){var r=this.data;this.data=t,this.beans.valueCache.onDataChanged(),this.updateDataOnDetailNode(),this.checkRowSelectable(),this.resetQuickFilterAggregateText();var i=this.createDataChangedEvent(t,r,e);this.dispatchLocalEvent(i)},n.prototype.updateDataOnDetailNode=function(){this.detailNode&&(this.detailNode.data=this.data)},n.prototype.createDataChangedEvent=function(t,e,r){return{type:n.EVENT_DATA_CHANGED,node:this,oldData:e,newData:t,update:r}},n.prototype.createLocalRowEvent=function(t){return{type:t,node:this}},n.prototype.getRowIndexString=function(){return this.rowPinned==="top"?"t-"+this.rowIndex:this.rowPinned==="bottom"?"b-"+this.rowIndex:this.rowIndex.toString()},n.prototype.createDaemonNode=function(){var t=new n(this.beans);return t.id=this.id,t.data=this.data,t.__daemon=!0,t.selected=this.selected,t.level=this.level,t},n.prototype.setDataAndId=function(t,e){var r=P(this.id)?this.createDaemonNode():null,i=this.data;this.data=t,this.updateDataOnDetailNode(),this.setId(e),this.checkRowSelectable(),this.beans.selectionService.syncInRowNode(this,r);var o=this.createDataChangedEvent(t,i,!1);this.dispatchLocalEvent(o)},n.prototype.checkRowSelectable=function(){var t=this.beans.gridOptionsService.get("isRowSelectable");this.setRowSelectable(t?t(this):!0)},n.prototype.setRowSelectable=function(t,e){if(this.selectable!==t){if(this.selectable=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_SELECTABLE_CHANGED)),e)return;var r=this.beans.gridOptionsService.get("groupSelectsChildren");if(r){var i=this.calculateSelectedFromChildren();this.setSelectedParams({newValue:i??!1,source:"selectableChanged"});return}this.isSelected()&&!this.selectable&&this.setSelectedParams({newValue:!1,source:"selectableChanged"})}},n.prototype.setId=function(t){var e=this.beans.gridOptionsService.getCallback("getRowId");if(e)if(this.data){var r=this.getGroupKeys(!0);this.id=e({data:this.data,parentKeys:r.length>0?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 ".concat(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!P(this.rowTop)||!P(this.rowHeight)?!1:t>=this.rowTop&&t<this.rowTop+this.rowHeight},n.prototype.setFirstChild=function(t){this.firstChild!==t&&(this.firstChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_FIRST_CHILD_CHANGED)))},n.prototype.setLastChild=function(t){this.lastChild!==t&&(this.lastChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_LAST_CHILD_CHANGED)))},n.prototype.setChildIndex=function(t){this.childIndex!==t&&(this.childIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_CHILD_INDEX_CHANGED)))},n.prototype.setRowTop=function(t){this.oldRowTop=this.rowTop,this.rowTop!==t&&(this.rowTop=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_TOP_CHANGED)),this.setDisplayed(t!==null))},n.prototype.clearRowTopAndRowIndex=function(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)},n.prototype.setDisplayed=function(t){this.displayed!==t&&(this.displayed=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_DISPLAYED_CHANGED)))},n.prototype.setDragging=function(t){this.dragging!==t&&(this.dragging=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_DRAGGING_CHANGED)))},n.prototype.setHighlighted=function(t){t!==this.highlighted&&(this.highlighted=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_HIGHLIGHT_CHANGED)))},n.prototype.setHovered=function(t){this.hovered!==t&&(this.hovered=t)},n.prototype.isHovered=function(){return this.hovered},n.prototype.setAllChildrenCount=function(t){this.allChildrenCount!==t&&(this.allChildrenCount=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_ALL_CHILDREN_COUNT_CHANGED)))},n.prototype.setMaster=function(t){this.master!==t&&(this.master&&!t&&(this.expanded=!1),this.master=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_MASTER_CHANGED)))},n.prototype.setGroup=function(t){this.group!==t&&(this.group&&!t&&(this.expanded=!1),this.group=t,this.updateHasChildren(),this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_GROUP_CHANGED)))},n.prototype.setRowHeight=function(t,e){e===void 0&&(e=!1),this.rowHeight=t,this.rowHeightEstimated=e,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_HEIGHT_CHANGED))},n.prototype.setRowAutoHeight=function(t,e){this.__autoHeights||(this.__autoHeights={}),this.__autoHeights[e.getId()]=t,t!=null&&(this.checkAutoHeightsDebounced==null&&(this.checkAutoHeightsDebounced=ze(this.checkAutoHeights.bind(this),1)),this.checkAutoHeightsDebounced())},n.prototype.checkAutoHeights=function(){var t=this,e=!1,r=!0,i=0,o=this.__autoHeights;if(o!=null){var s=this.beans.columnModel.getAllDisplayedAutoHeightCols();if(s.forEach(function(l){var u=o[l.getId()];if(u==null)if(t.beans.columnModel.isColSpanActive()){var c=[];switch(l.getPinned()){case"left":c=t.beans.columnModel.getDisplayedLeftColumnsForRow(t);break;case"right":c=t.beans.columnModel.getDisplayedRightColumnsForRow(t);break;case null:c=t.beans.columnModel.getViewportCenterColumnsForRow(t);break}if(c.includes(l)){e=!0;return}u=-1}else{e=!0;return}else r=!1;u>i&&(i=u)}),!e&&((r||i<10)&&(i=this.beans.gridOptionsService.getRowHeightForNode(this).height),i!=this.rowHeight)){this.setRowHeight(i);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(g.EVENT_ROW_GROUP_OPENED),{expanded:t,event:e||null});this.beans.rowNodeEventThrottle.dispatchExpanded(r),this.sibling&&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 i=this,o=function(){var u;return typeof t!="string"?t:(u=i.beans.columnModel.getGridColumn(t))!==null&&u!==void 0?u:i.beans.columnModel.getPrimaryColumn(t)},s=o(),a=this.getValueFromValueService(s);if(this.beans.gridOptionsService.get("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,i=this.beans.gridOptionsService.getGroupIncludeFooter(),o=i({node:this}),s=this.beans.gridOptionsService.get("groupSuppressBlankHeader"),a=r&&o&&!s,l=this.beans.valueService.getValue(t,this,!1,a);return l},n.prototype.dispatchEventForSaveValueReadOnly=function(t,e,r,i){var o={type:g.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:i};this.beans.eventService.dispatchEvent(o)},n.prototype.setGroupValue=function(t,e){var r=this.beans.columnModel.getGridColumn(t);V(this.groupData)&&(this.groupData={});var i=r.getColId(),o=this.groupData[i];o!==e&&(this.groupData[i]=e,this.dispatchCellChangedEvent(r,e,o))},n.prototype.setAggData=function(t){var e=this,r=pa([this.aggData,t]),i=this.aggData;this.aggData=t,this.eventService&&r.forEach(function(o){var s=e.aggData?e.aggData[o]:void 0,a=i?i[o]:void 0;if(s!==a){var l=e.beans.columnModel.lookupGridColumn(o);l&&e.dispatchCellChangedEvent(l,s,a)}})},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.get("treeData"),i=this.beans.gridOptionsService.get("isServerSideGroup");t=!this.stub&&!this.footer&&(r?!!i&&i(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&&_e(this.childrenAfterGroup)},n.prototype.dispatchCellChangedEvent=function(t,e,r){var i={type:n.EVENT_CELL_CHANGED,node:this,column:t,newValue:e,oldValue:r};this.dispatchLocalEvent(i)},n.prototype.resetQuickFilterAggregateText=function(){this.quickFilterAggregateText=null},n.prototype.isExpandable=function(){return this.footer?!1:this.beans.columnModel.isPivotMode()?this.hasChildren()&&!this.leafGroup:this.hasChildren()||!!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,i=!1;if(!(!((t=this.childrenAfterGroup)===null||t===void 0)&&t.length))return this.selectable?this.selected:null;for(var o=0;o<this.childrenAfterGroup.length;o++){var s=this.childrenAfterGroup[o],a=s.isSelected();if(!s.selectable){var l=s.calculateSelectedFromChildren();if(l===null)continue;a=l}switch(a){case!0:e=!0;break;case!1:r=!0;break;default:i=!0;break}}if(!(i||e&&r))return e?!0:r?!1:this.selectable?this.selected:null},n.prototype.setSelectedInitialValue=function(t){this.selected=t},n.prototype.selectThisNode=function(t,e,r){r===void 0&&(r="api");var i=!this.selectable&&t,o=this.selected===t;if(i||o)return!1;if(this.selected=t,this.eventService){this.dispatchLocalEvent(this.createLocalRowEvent(n.EVENT_ROW_SELECTED));var s=this.sibling;s&&s.footer&&s.dispatchLocalEvent(s.createLocalRowEvent(n.EVENT_ROW_SELECTED))}var a=Dr(Dr({},this.createGlobalRowEvent(g.EVENT_ROW_SELECTED)),{event:e||null,source:r});return this.beans.eventService.dispatchEvent(a),!0},n.prototype.setSelected=function(t,e,r){if(e===void 0&&(e=!1),r===void 0&&(r="api"),typeof r=="boolean"){console.warn("AG Grid: since version v30, rowNode.setSelected() property `suppressFinishActions` has been removed, please use `gridApi.setNodesSelected()` for bulk actions, and the event `source` property for ignoring events instead.");return}this.setSelectedParams({newValue:t,clearSelection:e,rangeSelect:!1,source:r})},n.prototype.setSelectedParams=function(t){return this.rowPinned?(console.warn("AG Grid: cannot select pinned rows"),0):this.id===void 0?(console.warn("AG Grid: cannot select node until id for node is known"),0):this.beans.selectionService.setNodesSelected(Dr(Dr({},t),{nodes:[this.footer?this.sibling:this]}))},n.prototype.isRowPinned=function(){return this.rowPinned==="top"||this.rowPinned==="bottom"},n.prototype.isParentOfNode=function(t){for(var e=this.parent;e;){if(e===t)return!0;e=e.parent}return!1},n.prototype.addEventListener=function(t,e){this.eventService||(this.eventService=new Lt),this.eventService.addEventListener(t,e)},n.prototype.removeEventListener=function(t,e){this.eventService&&(this.eventService.removeEventListener(t,e),this.eventService.noRegisteredListenersExist()&&(this.eventService=null))},n.prototype.onMouseEnter=function(){this.dispatchLocalEvent(this.createLocalRowEvent(n.EVENT_MOUSE_ENTER))},n.prototype.onMouseLeave=function(){this.dispatchLocalEvent(this.createLocalRowEvent(n.EVENT_MOUSE_LEAVE))},n.prototype.getFirstChildOfFirstChild=function(t){for(var e=this,r=!0,i=!1,o=null;r&&!i;){var s=e.parent,a=P(s)&&e.firstChild;a?s.rowGroupColumn===t&&(i=!0,o=s):r=!1,e=s}return i?o:null},n.prototype.isFullWidthCell=function(){if(this.detail)return!0;var t=this.beans.gridOptionsService.getCallback("isFullWidthRow");return t?t({rowNode:this}):!1},n.prototype.getRoute=function(){if(this.key!=null){for(var t=[],e=this;e.key!=null;)t.push(e.key),e=e.parent;return t.reverse()}},n.prototype.createFooter=function(){var t=this;if(!this.sibling){var e=new Set(["eventService","__objectId","sticky"]),r=new n(this.beans);Object.keys(this).forEach(function(i){e.has(i)||(r[i]=t[i])}),r.footer=!0,r.setRowTop(null),r.setRowIndex(null),r.oldRowTop=null,r.id="rowGroupFooter_"+this.id,r.sibling=this,this.sibling=r}},n.prototype.destroyFooter=function(){this.sibling&&(this.sibling.setRowTop(null),this.sibling.setRowIndex(null),this.sibling=void 0)},n.ID_PREFIX_ROW_GROUP="row-group-",n.ID_PREFIX_TOP_PINNED="t-",n.ID_PREFIX_BOTTOM_PINNED="b-",n.OBJECT_ID_SEQUENCE=0,n.EVENT_ROW_SELECTED="rowSelected",n.EVENT_DATA_CHANGED="dataChanged",n.EVENT_CELL_CHANGED="cellChanged",n.EVENT_ALL_CHILDREN_COUNT_CHANGED="allChildrenCountChanged",n.EVENT_MASTER_CHANGED="masterChanged",n.EVENT_GROUP_CHANGED="groupChanged",n.EVENT_MOUSE_ENTER="mouseEnter",n.EVENT_MOUSE_LEAVE="mouseLeave",n.EVENT_HEIGHT_CHANGED="heightChanged",n.EVENT_TOP_CHANGED="topChanged",n.EVENT_DISPLAYED_CHANGED="displayedChanged",n.EVENT_FIRST_CHILD_CHANGED="firstChildChanged",n.EVENT_LAST_CHILD_CHANGED="lastChildChanged",n.EVENT_CHILD_INDEX_CHANGED="childIndexChanged",n.EVENT_ROW_INDEX_CHANGED="rowIndexChanged",n.EVENT_EXPANDED_CHANGED="expandedChanged",n.EVENT_HAS_CHILDREN_CHANGED="hasChildrenChanged",n.EVENT_SELECTABLE_CHANGED="selectableChanged",n.EVENT_UI_LEVEL_CHANGED="uiLevelChanged",n.EVENT_HIGHLIGHT_CHANGED="rowHighlightChanged",n.EVENT_DRAGGING_CHANGED="draggingChanged",n}(),vh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),oo=function(){return oo=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},oo.apply(this,arguments)},zl=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},$l=function(n){vh(t,n);function t(){return n.call(this,`
|
||
<div class="ag-selection-checkbox" role="presentation">
|
||
<ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>
|
||
</div>`)||this}return t.prototype.postConstruct=function(){this.eCheckbox.setPassive(!0),cn(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(),i=Ui(e,r),o=e("ariaRowToggleSelection","Press Space to toggle row selection");this.eCheckbox.setValue(r,!0),this.eCheckbox.setInputAriaLabel("".concat(o," (").concat(i,")"))},t.prototype.onClicked=function(e,r,i){return this.rowNode.setSelectedParams({newValue:e,rangeSelect:i.shiftKey,groupSelectsFiltered:r,event:i,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){dt(a)}),this.addManagedListener(this.eCheckbox.getInputElement(),"click",function(a){dt(a);var l=r.gridOptionsService.get("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,U.EVENT_ROW_SELECTED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.rowNode,U.EVENT_DATA_CHANGED,this.onDataChanged.bind(this)),this.addManagedListener(this.rowNode,U.EVENT_SELECTABLE_CHANGED,this.onSelectableChanged.bind(this));var i=this.gridOptionsService.get("isRowSelectable"),o=i||typeof this.getIsVisible()=="function";if(o){var s=this.showOrHideSelect.bind(this);this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,s),this.addManagedListener(this.rowNode,U.EVENT_DATA_CHANGED,s),this.addManagedListener(this.rowNode,U.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,i,o,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(oo(oo({},l),u)):!1}else s=a??!1;var c=(i=this.column)===null||i===void 0?void 0:i.getColDef().showDisabledCheckboxes;if(c){this.eCheckbox.setDisabled(!s),this.setVisible(!0),this.setDisplayed(!0);return}if(!((o=this.overrides)===null||o===void 0)&&o.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},zl([L("eCheckbox")],t.prototype,"eCheckbox",void 0),zl([b],t.prototype,"postConstruct",null),t}(W),Ar;(function(n){n[n.Up=0]="Up",n[n.Down=1]="Down"})(Ar||(Ar={}));var we;(function(n){n[n.Left=0]="Left",n[n.Right=1]="Right"})(we||(we={}));var gh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),ur=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},no=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.")},Pe;(function(n){n[n.ToolPanel=0]="ToolPanel",n[n.HeaderCell=1]="HeaderCell",n[n.RowDrag=2]="RowDrag",n[n.ChartPanel=3]="ChartPanel",n[n.AdvancedFilterBuilder=4]="AdvancedFilterBuilder"})(Pe||(Pe={}));var fe=function(n){gh(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=Qe("columnMovePin",this.gridOptionsService,null),this.eHideIcon=Qe("columnMoveHide",this.gridOptionsService,null),this.eMoveIcon=Qe("columnMoveMove",this.gridOptionsService,null),this.eLeftIcon=Qe("columnMoveLeft",this.gridOptionsService,null),this.eRightIcon=Qe("columnMoveRight",this.gridOptionsService,null),this.eGroupIcon=Qe("columnMoveGroup",this.gridOptionsService,null),this.eAggregateIcon=Qe("columnMoveValue",this.gridOptionsService,null),this.ePivotIcon=Qe("columnMovePivot",this.gridOptionsService,null),this.eDropNotAllowedIcon=Qe("dropNotAllowed",this.gridOptionsService,null)},t.prototype.addDragSource=function(r,i){i===void 0&&(i=!1);var o={eElement:r.eElement,dragStartPixels:r.dragStartPixels,onDragStart:this.onDragStart.bind(this,r),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),includeTouch:i};this.dragSourceAndParamsList.push({params:o,dragSource:r}),this.dragService.addDragSource(o)},t.prototype.removeDragSource=function(r){var i=this.dragSourceAndParamsList.find(function(o){return o.dragSource===r});i&&(this.dragService.removeDragSource(i.params),Ve(this.dragSourceAndParamsList,i))},t.prototype.clearDragSourceParamsList=function(){var r=this;this.dragSourceAndParamsList.forEach(function(i){return r.dragService.removeDragSource(i.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,i){this.dragging=!0,this.dragSource=r,this.eventLastTime=i,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 i=this.createDropTargetEvent(this.lastDropTarget,r,null,null,!1);this.lastDropTarget.onDragStop(i)}this.lastDropTarget=null,this.dragItem=null,this.removeGhost()},t.prototype.onDragging=function(r,i){var o=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 o.isMouseOnDropTarget(r,y)}),h=this.findCurrentDropTarget(r,d);if(h!==this.lastDropTarget)this.leaveLastTargetIfExists(r,c,p,i),this.lastDropTarget!==null&&h===null&&((a=(s=this.dragSource).onGridExit)===null||a===void 0||a.call(s,this.dragItem)),this.lastDropTarget===null&&h!==null&&((u=(l=this.dragSource).onGridEnter)===null||u===void 0||u.call(l,this.dragItem)),this.enterDragTargetIfExists(h,r,c,p,i),this.lastDropTarget=h;else if(h&&h.onDragging){var v=this.createDropTargetEvent(h,r,c,p,i);h.onDragging(v)}},t.prototype.getAllContainersFromDropTarget=function(r){var i=r.getSecondaryContainers?r.getSecondaryContainers():null,o=[[r.getContainer()]];return i?o.concat(i):o},t.prototype.allContainersIntersect=function(r,i){var o,s;try{for(var a=no(i),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.right,d=r.clientY>=c.top&&r.clientY<c.bottom;if(!p||!d)return!1}}catch(h){o={error:h}}finally{try{l&&!l.done&&(s=a.return)&&s.call(a)}finally{if(o)throw o.error}}return!0},t.prototype.isMouseOnDropTarget=function(r,i){var o,s,a=this.getAllContainersFromDropTarget(i),l=!1;try{for(var u=no(a),c=u.next();!c.done;c=u.next()){var p=c.value;if(this.allContainersIntersect(r,p)){l=!0;break}}}catch(d){o={error:d}}finally{try{c&&!c.done&&(s=u.return)&&s.call(u)}finally{if(o)throw o.error}}return i.targetContainsSource&&!i.getContainer().contains(this.dragSource.eElement)?!1:l&&i.isInterestedIn(this.dragSource.type,this.dragSource.eElement)},t.prototype.findCurrentDropTarget=function(r,i){var o,s,a,l,u=i.length;if(u===0)return null;if(u===1)return i[0];var c=this.gridOptionsService.getRootNode(),p=c.elementsFromPoint(r.clientX,r.clientY);try{for(var d=no(p),h=d.next();!h.done;h=d.next()){var v=h.value;try{for(var y=(a=void 0,no(i)),C=y.next();!C.done;C=y.next()){var m=C.value,w=Ta(this.getAllContainersFromDropTarget(m));if(w.indexOf(v)!==-1)return m}}catch(E){a={error:E}}finally{try{C&&!C.done&&(l=y.return)&&l.call(y)}finally{if(a)throw a.error}}}}catch(E){o={error:E}}finally{try{h&&!h.done&&(s=d.return)&&s.call(d)}finally{if(o)throw o.error}}return null},t.prototype.enterDragTargetIfExists=function(r,i,o,s,a){if(r){if(r.onDragEnter){var l=this.createDropTargetEvent(r,i,o,s,a);r.onDragEnter(l)}this.setGhostIcon(r.getIconName?r.getIconName():null)}},t.prototype.leaveLastTargetIfExists=function(r,i,o,s){if(this.lastDropTarget){if(this.lastDropTarget.onDragLeave){var a=this.createDropTargetEvent(this.lastDropTarget,r,i,o,s);this.lastDropTarget.onDragLeave(a)}this.setGhostIcon(null)}},t.prototype.addDropTarget=function(r){this.dropTargets.push(r)},t.prototype.removeDropTarget=function(r){this.dropTargets=this.dropTargets.filter(function(i){return i.getContainer()!==r.getContainer()})},t.prototype.hasExternalDropZones=function(){return this.dropTargets.some(function(r){return r.external})},t.prototype.findExternalZone=function(r){var i=this.dropTargets.filter(function(o){return o.external});return i.find(function(o){return o.getContainer()===r.getContainer()})||null},t.prototype.getHorizontalDirection=function(r){var i=this.eventLastTime&&this.eventLastTime.clientX,o=r.clientX;return i===o?null:i>o?we.Left:we.Right},t.prototype.getVerticalDirection=function(r){var i=this.eventLastTime&&this.eventLastTime.clientY,o=r.clientY;return i===o?null:i>o?Ar.Up:Ar.Down},t.prototype.createDropTargetEvent=function(r,i,o,s,a){var l=r.getContainer(),u=l.getBoundingClientRect(),c=this,p=c.gridApi,d=c.columnApi,h=c.dragItem,v=c.dragSource,y=i.clientX-u.left,C=i.clientY-u.top;return{event:i,x:y,y:C,vDirection:s,hDirection:o,dragSource:v,fromNudge:a,dragItem:h,api:p,columnApi:d,dropZoneTarget:l}},t.prototype.positionGhost=function(r){var i=this.eGhost;if(i){var o=i.getBoundingClientRect(),s=o.height,a=Za()-2,l=el()-2,u=Nn(i.offsetParent),c=r.clientY,p=r.clientX,d=c-u.top-s/2,h=p-u.left-10,v=this.gridOptionsService.getDocument(),y=v.defaultView||window,C=y.pageYOffset||v.documentElement.scrollTop,m=y.pageXOffset||v.documentElement.scrollLeft;a>0&&h+i.clientWidth>a+m&&(h=a+m-i.clientWidth),h<0&&(h=0),l>0&&d+i.clientHeight>l+C&&(d=l+C-i.clientHeight),d<0&&(d=0),i.style.left="".concat(h,"px"),i.style.top="".concat(d,"px")}},t.prototype.removeGhost=function(){this.eGhost&&this.eGhostParent&&this.eGhostParent.removeChild(this.eGhost),this.eGhost=null},t.prototype.createGhost=function(){this.eGhost=ge(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 i=this.eGhost.querySelector(".ag-dnd-ghost-label"),o=this.dragSource.dragItemName;Gi(o)&&(o=o()),i.innerHTML=se(o)||"",this.eGhost.style.height="25px",this.eGhost.style.top="20px",this.eGhost.style.left="20px";var s=this.gridOptionsService.getDocument(),a=null,l=null;try{a=s.fullscreenElement}catch{}finally{a||(a=this.gridOptionsService.getRootNode());var u=a.querySelector("body");u?l=u:a instanceof ShadowRoot?l=a:a instanceof Document?l=a==null?void 0:a.documentElement:l=a}this.eGhostParent=l,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,i){i===void 0&&(i=!1),he(this.eGhostIcon);var o=null;switch(r||(r=this.dragSource.getDefaultIconName?this.dragSource.getDefaultIconName():e.ICON_NOT_ALLOWED),r){case e.ICON_PINNED:o=this.ePinnedIcon;break;case e.ICON_MOVE:o=this.eMoveIcon;break;case e.ICON_LEFT:o=this.eLeftIcon;break;case e.ICON_RIGHT:o=this.eRightIcon;break;case e.ICON_GROUP:o=this.eGroupIcon;break;case e.ICON_AGGREGATE:o=this.eAggregateIcon;break;case e.ICON_PIVOT:o=this.ePivotIcon;break;case e.ICON_NOT_ALLOWED:o=this.eDropNotAllowedIcon;break;case e.ICON_HIDE:o=this.eHideIcon;break}this.eGhostIcon.classList.toggle("ag-shake-left-to-right",i),!(o===this.eHideIcon&&this.gridOptionsService.get("suppressDragLeaveHidesColumns"))&&o&&this.eGhostIcon.appendChild(o)};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=`<div class="ag-dnd-ghost ag-unselectable">
|
||
<span class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>
|
||
<div class="ag-dnd-ghost-label"></div>
|
||
</div>`,ur([f("dragService")],t.prototype,"dragService",void 0),ur([f("mouseEventService")],t.prototype,"mouseEventService",void 0),ur([f("columnApi")],t.prototype,"columnApi",void 0),ur([f("gridApi")],t.prototype,"gridApi",void 0),ur([b],t.prototype,"init",null),ur([Se],t.prototype,"clearDragSourceParamsList",null),t=e=ur([I("dragAndDropService")],t),t}(D),so=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),ei=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},ao=function(n){so(t,n);function t(e,r,i,o,s,a){var l=n.call(this)||this;return l.cellValueFn=e,l.rowNode=r,l.column=i,l.customGui=o,l.dragStartPixels=s,l.suppressVisibilityChange=a,l.dragSource=null,l}return t.prototype.isCustomGui=function(){return this.customGui!=null},t.prototype.postConstruct=function(){if(this.customGui?this.setDragElement(this.customGui,this.dragStartPixels):(this.setTemplate('<div class="ag-drag-handle ag-row-drag" aria-hidden="true"></div>'),this.getGui().appendChild(ne("rowDrag",this.gridOptionsService,null)),this.addDragSource()),this.checkCompatibility(),!this.suppressVisibilityChange){var e=this.gridOptionsService.get("rowDragManaged")?new Ch(this,this.beans,this.rowNode,this.column):new yh(this,this.beans,this.rowNode,this.column);this.createManagedBean(e,this.beans.context)}},t.prototype.setDragElement=function(e,r){this.setTemplateFromElement(e),this.addDragSource(r)},t.prototype.getSelectedNodes=function(){var e=this.gridOptionsService.get("rowDragMultiRow");if(!e)return[this.rowNode];var r=this.beans.selectionService.getSelectedNodes();return r.indexOf(this.rowNode)!==-1?r:[this.rowNode]},t.prototype.checkCompatibility=function(){var e=this.gridOptionsService.get("rowDragManaged"),r=this.gridOptionsService.get("treeData");r&&e&&B("If using row drag with tree data, you cannot have rowDragManaged=true")},t.prototype.getDragItem=function(){return{rowNode:this.rowNode,rowNodes:this.getSelectedNodes(),columns:this.column?[this.column]:void 0,defaultTextValue:this.cellValueFn()}},t.prototype.getRowDragText=function(e){if(e){var r=e.getColDef();if(r.rowDragText)return r.rowDragText}return this.gridOptionsService.get("rowDragText")},t.prototype.addDragSource=function(e){var r=this;e===void 0&&(e=4),this.dragSource&&this.removeDragSource();var i=this.localeService.getLocaleTextFunc();this.dragSource={type:Pe.RowDrag,eElement:this.getGui(),dragItemName:function(){var o,s=r.getDragItem(),a=((o=s.rowNodes)===null||o===void 0?void 0:o.length)||1,l=r.getRowDragText(r.column);return l?l(s,a):a===1?r.cellValueFn():"".concat(a," ").concat(i("rowDragRows","rows"))},getDragItem:function(){return r.getDragItem()},dragStartPixels:e,dragSourceDomDataKey:this.gridOptionsService.getDomDataKey()},this.beans.dragAndDropService.addDragSource(this.dragSource,!0)},t.prototype.removeDragSource=function(){this.dragSource&&this.beans.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null},ei([f("beans")],t.prototype,"beans",void 0),ei([b],t.prototype,"postConstruct",null),ei([Se],t.prototype,"removeDragSource",null),t}(W),Kl=function(n){so(t,n);function t(e,r,i){var o=n.call(this)||this;return o.parent=e,o.rowNode=r,o.column=i,o}return t.prototype.setDisplayedOrVisible=function(e){var r={skipAriaHidden:!0};if(e)this.parent.setDisplayed(!1,r);else{var i=!0,o=!1;this.column&&(i=this.column.isRowDrag(this.rowNode)||this.parent.isCustomGui(),o=Gi(this.column.getColDef().rowDrag)),o?(this.parent.setDisplayed(!0,r),this.parent.setVisible(i,r)):(this.parent.setDisplayed(i,r),this.parent.setVisible(!0,r))}},t}(D),yh=function(n){so(t,n);function t(e,r,i,o){var s=n.call(this,e,i,o)||this;return s.beans=r,s}return t.prototype.postConstruct=function(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.addManagedListener(this.rowNode,U.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,U.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,U.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.workOutVisibility()},t.prototype.onSuppressRowDrag=function(){this.workOutVisibility()},t.prototype.workOutVisibility=function(){var e=this.gridOptionsService.get("suppressRowDrag");this.setDisplayedOrVisible(e)},ei([b],t.prototype,"postConstruct",null),t}(Kl),Ch=function(n){so(t,n);function t(e,r,i,o){var s=n.call(this,e,i,o)||this;return s.beans=r,s}return t.prototype.postConstruct=function(){this.addManagedListener(this.beans.eventService,g.EVENT_SORT_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,g.EVENT_FILTER_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,U.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,U.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()},t.prototype.onSuppressRowDrag=function(){this.workOutVisibility()},t.prototype.workOutVisibility=function(){var e=this.beans.ctrlsService.getGridBodyCtrl(),r=e.getRowDragFeature(),i=r&&r.shouldPreventRowMove(),o=this.gridOptionsService.get("suppressRowDrag"),s=this.beans.dragAndDropService.hasExternalDropZones(),a=i&&!s||o;this.setDisplayedOrVisible(a)},ei([b],t.prototype,"postConstruct",null),t}(Kl),mh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),lo=function(){return lo=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},lo.apply(this,arguments)},ti=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Sh=function(n){mh(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.init=function(e,r,i,o,s,a,l){var u,c,p,d;this.params=l,this.eGui=r,this.eCheckbox=i,this.eExpanded=o,this.eContracted=s,this.comp=e,this.compClass=a;var h=l.node;l.value;var v=l.colDef,y=this.isTopLevelFooter();if(!y){var C=this.isEmbeddedRowMismatch();if(C)return;if(h.footer&&this.gridOptionsService.get("groupHideOpenParents")){var m=v&&v.showRowGroup,w=h.rowGroupColumn&&h.rowGroupColumn.getColId();if(m!==w)return}}if(this.setupShowingValueForOpenedParent(),this.findDisplayedGroupNode(),!y){var E=l.node.footer&&l.node.rowGroupIndex===this.columnModel.getRowGroupColumns().findIndex(function(G){var N;return G.getColId()===((N=l.colDef)===null||N===void 0?void 0:N.showRowGroup)}),S=this.gridOptionsService.get("groupDisplayType")!="multipleColumns"||this.gridOptionsService.get("treeData"),R=S||this.gridOptionsService.get("showOpenedGroup")&&!l.node.footer&&(!l.node.group||l.node.rowGroupIndex!=null&&l.node.rowGroupIndex>this.columnModel.getRowGroupColumns().findIndex(function(G){var N;return G.getColId()===((N=l.colDef)===null||N===void 0?void 0:N.showRowGroup)})),T=!h.group&&(((u=this.params.colDef)===null||u===void 0?void 0:u.field)||((c=this.params.colDef)===null||c===void 0?void 0:c.valueGetter)),F=this.isExpandable(),A=this.columnModel.isPivotMode()&&h.leafGroup&&((p=h.rowGroupColumn)===null||p===void 0?void 0:p.getColId())===((d=l.column)===null||d===void 0?void 0:d.getColDef().showRowGroup),x=!this.showingValueForOpenedParent&&!F&&!T&&!R&&!E&&!A;if(x)return}this.addExpandAndContract(),this.addFullWidthRowDraggerIfNeeded(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent(),this.refreshAriaExpanded()},t.prototype.getCellAriaRole=function(){var e,r,i=(e=this.params.colDef)===null||e===void 0?void 0:e.cellAriaRole,o=(r=this.params.column)===null||r===void 0?void 0:r.getColDef().cellAriaRole;return i||o||"gridcell"},t.prototype.destroy=function(){n.prototype.destroy.call(this),this.expandListener=null},t.prototype.refreshAriaExpanded=function(){var e=this.params,r=e.node,i=e.eParentOfValue;if(this.expandListener&&(this.expandListener=this.expandListener()),!this.isExpandable()){za(i);return}var o=function(){ot(i,!!r.expanded)};this.expandListener=this.addManagedListener(r,U.EVENT_EXPANDED_CHANGED,o)||null,o()},t.prototype.isTopLevelFooter=function(){if(!this.gridOptionsService.get("groupIncludeTotalFooter")||this.params.value!=null||this.params.node.level!=-1)return!1;var e=this.params.colDef,r=e==null;if(r||e.showRowGroup===!0)return!0;var i=this.columnModel.getRowGroupColumns();if(!i||i.length===0)return!0;var o=i[0];return o.getId()===e.showRowGroup},t.prototype.isEmbeddedRowMismatch=function(){if(!this.params.fullWidth||!this.gridOptionsService.get("embedFullWidthRows"))return!1;var e=this.params.pinned==="left",r=this.params.pinned==="right",i=!e&&!r;return this.gridOptionsService.get("enableRtl")?this.columnModel.isPinningLeft()?!r:!i:this.columnModel.isPinningLeft()?!e:!i},t.prototype.findDisplayedGroupNode=function(){var e=this.params.column,r=this.params.node;if(this.showingValueForOpenedParent)for(var i=r.parent;i!=null;){if(i.rowGroupColumn&&e.isRowGroupDisplayed(i.rowGroupColumn.getId())){this.displayedGroupNode=i;break}i=i.parent}V(this.displayedGroupNode)&&(this.displayedGroupNode=r)},t.prototype.setupShowingValueForOpenedParent=function(){var e=this.params.node,r=this.params.column;if(!this.gridOptionsService.get("groupHideOpenParents")){this.showingValueForOpenedParent=!1;return}if(!e.groupData){this.showingValueForOpenedParent=!1;return}var i=e.rowGroupColumn!=null;if(i){var o=e.rowGroupColumn.getId(),s=r.isRowGroupDisplayed(o);if(s){this.showingValueForOpenedParent=!1;return}}var a=e.groupData[r.getId()]!=null;this.showingValueForOpenedParent=a},t.prototype.addValueElement=function(){this.displayedGroupNode.footer?this.addFooterValue():(this.addGroupValue(),this.addChildCount())},t.prototype.addGroupValue=function(){var e,r=this.adjustParamsWithDetailsFromRelatedColumn(),i=this.getInnerCompDetails(r),o=r.valueFormatted,s=r.value,a=o;if(a==null){var l=this.displayedGroupNode.rowGroupColumn&&((e=this.params.column)===null||e===void 0?void 0:e.isRowGroupDisplayed(this.displayedGroupNode.rowGroupColumn.getId()));if(this.displayedGroupNode.key===""&&this.displayedGroupNode.group&&l){var u=this.localeService.getLocaleTextFunc();a=u("blanks","(Blanks)")}else a=s??null}this.comp.setInnerRenderer(i,a)},t.prototype.adjustParamsWithDetailsFromRelatedColumn=function(){var e=this.displayedGroupNode.rowGroupColumn,r=this.params.column;if(!e)return this.params;var i=r!=null;if(i){var o=r.isRowGroupDisplayed(e.getId());if(!o)return this.params}var s=this.params,a=this.params,l=a.value,u=a.node,c=this.valueFormatterService.formatValue(e,u,l),p=lo(lo({},s),{valueFormatted:c});return p},t.prototype.addFooterValue=function(){var e=this.params.footerValueGetter,r="";if(e){var i=qo(this.params);i.value=this.params.value,typeof e=="function"?r=e(i):typeof e=="string"?r=this.expressionService.evaluate(e,i):console.warn("AG Grid: footerValueGetter should be either a function or a string (expression)")}else r="Total "+(this.params.value!=null?this.params.value:"");var o=this.getInnerCompDetails(this.params);this.comp.setInnerRenderer(o,r)},t.prototype.getInnerCompDetails=function(e){var r=this;if(e.fullWidth)return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gridOptionsService.get("groupRowRendererParams"),e);var i=this.userComponentFactory.getInnerRendererDetails(e,e),o=function(c){return c&&c.componentClass==r.compClass};if(i&&!o(i))return i;var s=this.displayedGroupNode.rowGroupColumn,a=s?s.getColDef():void 0;if(a){var l=this.userComponentFactory.getCellRendererDetails(a,e);if(l&&!o(l))return l;if(o(l)&&a.cellRendererParams&&a.cellRendererParams.innerRenderer){var u=this.userComponentFactory.getInnerRendererDetails(a.cellRendererParams,e);return u}}},t.prototype.addChildCount=function(){this.params.suppressCount||(this.addManagedListener(this.displayedGroupNode,U.EVENT_ALL_CHILDREN_COUNT_CHANGED,this.updateChildCount.bind(this)),this.updateChildCount())},t.prototype.updateChildCount=function(){var e=this.displayedGroupNode.allChildrenCount,r=this.isShowRowGroupForThisRow(),i=r&&e!=null&&e>=0,o=i?"(".concat(e,")"):"";this.comp.setChildCount(o)},t.prototype.isShowRowGroupForThisRow=function(){if(this.gridOptionsService.get("treeData"))return!0;var e=this.displayedGroupNode.rowGroupColumn;if(!e)return!1;var r=this.params.column,i=r==null||r.isRowGroupDisplayed(e.getId());return i},t.prototype.addExpandAndContract=function(){var e,r=this.params,i=ne("groupExpanded",this.gridOptionsService,null),o=ne("groupContracted",this.gridOptionsService,null);i&&this.eExpanded.appendChild(i),o&&this.eContracted.appendChild(o);var s=r.eGridCell,a=((e=this.params.column)===null||e===void 0?void 0:e.isCellEditable(r.node))&&this.gridOptionsService.get("enableGroupEdit");!a&&this.isExpandable()&&!r.suppressDoubleClickExpand&&this.addManagedListener(s,"dblclick",this.onCellDblClicked.bind(this)),this.addManagedListener(this.eExpanded,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eContracted,"click",this.onExpandClicked.bind(this)),this.addManagedListener(s,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(r.node,U.EVENT_EXPANDED_CHANGED,this.showExpandAndContractIcons.bind(this)),this.showExpandAndContractIcons();var l=this.onRowNodeIsExpandableChanged.bind(this);this.addManagedListener(this.displayedGroupNode,U.EVENT_ALL_CHILDREN_COUNT_CHANGED,l),this.addManagedListener(this.displayedGroupNode,U.EVENT_MASTER_CHANGED,l),this.addManagedListener(this.displayedGroupNode,U.EVENT_GROUP_CHANGED,l),this.addManagedListener(this.displayedGroupNode,U.EVENT_HAS_CHILDREN_CHANGED,l)},t.prototype.onExpandClicked=function(e){tt(e)||(dt(e),this.onExpandOrContract(e))},t.prototype.onExpandOrContract=function(e){var r=this.displayedGroupNode,i=!r.expanded;!i&&r.sticky&&this.scrollToStickyNode(r),r.setExpanded(i,e)},t.prototype.scrollToStickyNode=function(e){var r=this.ctrlsService.getGridBodyCtrl(),i=r.getScrollFeature();i.setVerticalScrollPosition(e.rowTop-e.stickyRowTop)},t.prototype.isExpandable=function(){if(this.showingValueForOpenedParent)return!0;var e=this.displayedGroupNode,r=this.columnModel.isPivotMode()&&e.leafGroup,i=e.isExpandable()&&!e.footer&&!r;if(!i)return!1;var o=this.params.column,s=o!=null&&typeof o.getColDef().showRowGroup=="string";if(s){var a=this.isShowRowGroupForThisRow();return a}return!0},t.prototype.showExpandAndContractIcons=function(){var e=this,r=e.params,i=e.displayedGroupNode,o=e.columnModel,s=r.node,a=this.isExpandable();if(a){var l=this.showingValueForOpenedParent?!0:s.expanded;this.comp.setExpandedDisplayed(l),this.comp.setContractedDisplayed(!l)}else this.comp.setExpandedDisplayed(!1),this.comp.setContractedDisplayed(!1);var u=o.isPivotMode(),c=u&&i.leafGroup,p=a&&!c,d=s.footer&&s.level===-1;this.comp.addOrRemoveCssClass("ag-cell-expandable",p),this.comp.addOrRemoveCssClass("ag-row-group",p),u?this.comp.addOrRemoveCssClass("ag-pivot-leaf-group",c):d||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!p)},t.prototype.onRowNodeIsExpandableChanged=function(){this.showExpandAndContractIcons(),this.setIndent(),this.refreshAriaExpanded()},t.prototype.setupIndent=function(){var e=this.params.node,r=this.params.suppressPadding;r||(this.addManagedListener(e,U.EVENT_UI_LEVEL_CHANGED,this.setIndent.bind(this)),this.setIndent())},t.prototype.setIndent=function(){if(!this.gridOptionsService.get("groupHideOpenParents")){var e=this.params,r=e.node,i=!!e.colDef,o=this.gridOptionsService.get("treeData"),s=!i||o||e.colDef.showRowGroup===!0,a=s?r.uiLevel:0;this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass="ag-row-group-indent-"+a,this.comp.addOrRemoveCssClass(this.indentClass,!0)}},t.prototype.addFullWidthRowDraggerIfNeeded=function(){var e=this;if(!(!this.params.fullWidth||!this.params.rowDrag)){var r=new ao(function(){return e.params.value},this.params.node);this.createManagedBean(r,this.context),this.eGui.insertAdjacentElement("afterbegin",r.getGui())}},t.prototype.isUserWantsSelected=function(){var e=this.params.checkbox;return typeof e=="function"||e===!0},t.prototype.addCheckboxIfNeeded=function(){var e=this,r=this.displayedGroupNode,i=this.isUserWantsSelected()&&!r.footer&&!r.rowPinned&&!r.detail;if(i){var o=new $l;this.getContext().createBean(o),o.init({rowNode:this.params.node,column:this.params.column,overrides:{isVisible:this.params.checkbox,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(o.getGui()),this.addDestroyFunc(function(){return e.getContext().destroyBean(o)})}this.comp.setCheckboxVisible(i)},t.prototype.onKeyDown=function(e){var r=e.key===_.ENTER;if(!(!r||this.params.suppressEnterExpand)){var i=this.params.column&&this.params.column.isCellEditable(this.params.node);i||this.onExpandOrContract(e)}},t.prototype.onCellDblClicked=function(e){if(!tt(e)){var r=Bi(this.eExpanded,e)||Bi(this.eContracted,e);r||this.onExpandOrContract(e)}},ti([f("expressionService")],t.prototype,"expressionService",void 0),ti([f("valueFormatterService")],t.prototype,"valueFormatterService",void 0),ti([f("columnModel")],t.prototype,"columnModel",void 0),ti([f("userComponentFactory")],t.prototype,"userComponentFactory",void 0),ti([f("ctrlsService")],t.prototype,"ctrlsService",void 0),t}(D),wh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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 i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Yl=function(n){wh(t,n);function t(){return n.call(this,t.TEMPLATE)||this}return t.prototype.init=function(e){var r=this,i={setInnerRenderer:function(l,u){return r.setRenderDetails(l,u)},setChildCount:function(l){return r.eChildCount.innerHTML=l},addOrRemoveCssClass:function(l,u){return r.addOrRemoveCssClass(l,u)},setContractedDisplayed:function(l){return q(r.eContracted,l)},setExpandedDisplayed:function(l){return q(r.eExpanded,l)},setCheckboxVisible:function(l){return r.eCheckbox.classList.toggle("ag-invisible",!l)}},o=this.createManagedBean(new Sh),s=!e.colDef,a=this.getGui();o.init(i,a,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,e),s&&pe(a,o.getCellAriaRole())},t.prototype.setRenderDetails=function(e,r){var i=this;if(e){var o=e.newAgStackInstance();if(!o)return;o.then(function(s){if(s){var a=function(){return i.context.destroyBean(s)};i.isAlive()?(i.eValue.appendChild(s.getGui()),i.addDestroyFunc(a)):a()}})}else this.eValue.innerText=r},t.prototype.destroy=function(){this.getContext().destroyBean(this.innerCellRenderer),n.prototype.destroy.call(this)},t.prototype.refresh=function(){return!1},t.TEMPLATE=`<span class="ag-cell-wrapper">
|
||
<span class="ag-group-expanded" ref="eExpanded"></span>
|
||
<span class="ag-group-contracted" ref="eContracted"></span>
|
||
<span class="ag-group-checkbox ag-invisible" ref="eCheckbox"></span>
|
||
<span class="ag-group-value" ref="eValue"></span>
|
||
<span class="ag-group-child-count" ref="eChildCount"></span>
|
||
</span>`,ri([L("eExpanded")],t.prototype,"eExpanded",void 0),ri([L("eContracted")],t.prototype,"eContracted",void 0),ri([L("eCheckbox")],t.prototype,"eCheckbox",void 0),ri([L("eValue")],t.prototype,"eValue",void 0),ri([L("eChildCount")],t.prototype,"eChildCount",void 0),t}(W),Eh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),ql=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},_h=function(n){Eh(t,n);function t(){return n.call(this,t.TEMPLATE)||this}return t.prototype.init=function(e){e.node.failedLoad?this.setupFailed():this.setupLoading()},t.prototype.setupFailed=function(){var e=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=e("loadingError","ERR")},t.prototype.setupLoading=function(){var e=ne("groupLoading",this.gridOptionsService,null);e&&this.eLoadingIcon.appendChild(e);var r=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=r("loadingOoo","Loading")},t.prototype.refresh=function(e){return!1},t.prototype.destroy=function(){n.prototype.destroy.call(this)},t.TEMPLATE=`<div class="ag-loading">
|
||
<span class="ag-loading-icon" ref="eLoadingIcon"></span>
|
||
<span class="ag-loading-text" ref="eLoadingText"></span>
|
||
</div>`,ql([L("eLoadingIcon")],t.prototype,"eLoadingIcon",void 0),ql([L("eLoadingText")],t.prototype,"eLoadingText",void 0),t}(W),Rh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Oh=function(n){Rh(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,i=(r=this.gridOptionsService.get("overlayLoadingTemplate"))!==null&&r!==void 0?r:t.DEFAULT_LOADING_OVERLAY_TEMPLATE,o=this.localeService.getLocaleTextFunc(),s=i.replace("[LOADING...]",o("loadingOoo","Loading..."));this.setTemplate(s)},t.DEFAULT_LOADING_OVERLAY_TEMPLATE='<span class="ag-overlay-loading-center">[LOADING...]</span>',t}(W),Th=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Ph=function(n){Th(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,i=(r=this.gridOptionsService.get("overlayNoRowsTemplate"))!==null&&r!==void 0?r:t.DEFAULT_NO_ROWS_TEMPLATE,o=this.localeService.getLocaleTextFunc(),s=i.replace("[NO_ROWS_TO_SHOW]",o("noRowsToShow","No Rows To Show"));this.setTemplate(s)},t.DEFAULT_NO_ROWS_TEMPLATE='<span class="ag-overlay-no-rows-center">[NO_ROWS_TO_SHOW]</span>',t}(W),Dh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Ah=function(n){Dh(t,n);function t(){return n.call(this,'<div class="ag-tooltip"></div>')||this}return t.prototype.init=function(e){var r=e.value;this.getGui().innerHTML=se(r)},t}(lr),bh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Fh=function(){function n(){}return n.prototype.getTemplate=function(){return'<ag-input-number-field class="ag-cell-editor" ref="eInput"></ag-input-number-field>'},n.prototype.init=function(t,e){this.eInput=t,this.params=e,e.max!=null&&t.setMax(e.max),e.min!=null&&t.setMin(e.min),e.precision!=null&&t.setPrecision(e.precision),e.step!=null&&t.setStep(e.step);var r=t.getInputElement();e.preventStepping?t.addManagedListener(r,"keydown",this.preventStepping):e.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")},n.prototype.preventStepping=function(t){(t.key===_.UP||t.key===_.DOWN)&&t.preventDefault()},n.prototype.getValue=function(){var t=this.eInput.getValue();if(!P(t)&&!P(this.params.value))return this.params.value;var e=this.params.parseValue(t);if(e==null)return e;if(typeof e=="string"){if(e==="")return null;e=Number(e)}return isNaN(e)?null:e},n.prototype.getStartValue=function(){return this.params.value},n}(),Lh=function(n){bh(t,n);function t(){return n.call(this,new Fh)||this}return t}(io),Ih=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),xh=function(){function n(){}return n.prototype.getTemplate=function(){return'<ag-input-date-field class="ag-cell-editor" ref="eInput"></ag-input-date-field>'},n.prototype.init=function(t,e){this.eInput=t,this.params=e,e.min!=null&&t.setMin(e.min),e.max!=null&&t.setMax(e.max),e.step!=null&&t.setStep(e.step)},n.prototype.getValue=function(){var t=this.eInput.getDate();return!P(t)&&!P(this.params.value)?this.params.value:t??null},n.prototype.getStartValue=function(){var t=this.params.value;if(t instanceof Date)return Ye(t,!1)},n}(),Mh=function(n){Ih(t,n);function t(){return n.call(this,new xh)||this}return t}(io),Nh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Gh=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Vh=function(){function n(t){this.getDataTypeService=t}return n.prototype.getTemplate=function(){return'<ag-input-date-field class="ag-cell-editor" ref="eInput"></ag-input-date-field>'},n.prototype.init=function(t,e){this.eInput=t,this.params=e,e.min!=null&&t.setMin(e.min),e.max!=null&&t.setMax(e.max),e.step!=null&&t.setStep(e.step)},n.prototype.getValue=function(){var t=this.formatDate(this.eInput.getDate());return!P(t)&&!P(this.params.value)?this.params.value:this.params.parseValue(t??"")},n.prototype.getStartValue=function(){var t,e;return Ye((e=this.parseDate((t=this.params.value)!==null&&t!==void 0?t:void 0))!==null&&e!==void 0?e:null,!1)},n.prototype.parseDate=function(t){return this.getDataTypeService().getDateParserFunction()(t)},n.prototype.formatDate=function(t){return this.getDataTypeService().getDateFormatterFunction()(t)},n}(),Hh=function(n){Nh(t,n);function t(){var e=n.call(this,new Vh(function(){return e.dataTypeService}))||this;return e}return Gh([f("dataTypeService")],t.prototype,"dataTypeService",void 0),t}(io),Bh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),kh=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Wh=function(n){Bh(t,n);function t(){return n.call(this,t.TEMPLATE)||this}return t.prototype.init=function(e){var r=this;this.params=e,this.updateCheckbox(e);var i=this.eCheckbox.getInputElement();i.setAttribute("tabindex","-1"),cn(i,"polite"),this.addManagedListener(i,"click",function(s){if(dt(s),!r.eCheckbox.isDisabled()){var a=r.eCheckbox.getValue();r.onCheckboxChanged(a)}}),this.addManagedListener(i,"dblclick",function(s){dt(s)});var o=this.gridOptionsService.getDocument();this.addManagedListener(this.params.eGridCell,"keydown",function(s){if(s.key===_.SPACE&&!r.eCheckbox.isDisabled()){r.params.eGridCell===o.activeElement&&r.eCheckbox.toggle();var a=r.eCheckbox.getValue();r.onCheckboxChanged(a),s.preventDefault()}})},t.prototype.refresh=function(e){return this.params=e,this.updateCheckbox(e),!0},t.prototype.updateCheckbox=function(e){var r,i,o,s,a=!0;if(e.node.group&&e.column){var l=e.column.getColId();l.startsWith(tr)?s=e.value==null||e.value===""?void 0:e.value==="true":e.node.aggData&&e.node.aggData[l]!==void 0?s=(r=e.value)!==null&&r!==void 0?r:void 0:a=!1}else s=(i=e.value)!==null&&i!==void 0?i:void 0;if(!a){this.eCheckbox.setDisplayed(!1);return}this.eCheckbox.setValue(s);var u=e.disabled!=null?e.disabled:!(!((o=e.column)===null||o===void 0)&&o.isCellEditable(e.node));this.eCheckbox.setDisabled(u);var c=this.localeService.getLocaleTextFunc(),p=Ui(c,s),d=u?p:"".concat(c("ariaToggleCellValue","Press SPACE to toggle cell value")," (").concat(p,")");this.eCheckbox.setInputAriaLabel(d)},t.prototype.onCheckboxChanged=function(e){var r=this.params,i=r.column,o=r.node,s=r.rowIndex,a=r.value,l={type:g.EVENT_CELL_EDITING_STARTED,column:i,colDef:i==null?void 0:i.getColDef(),data:o.data,node:o,rowIndex:s,rowPinned:o.rowPinned,value:a};this.eventService.dispatchEvent(l);var u=this.params.node.setDataValue(this.params.column,e,"edit"),c={type:g.EVENT_CELL_EDITING_STOPPED,column:i,colDef:i==null?void 0:i.getColDef(),data:o.data,node:o,rowIndex:s,rowPinned:o.rowPinned,value:a,oldValue:a,newValue:e,valueChanged:u};this.eventService.dispatchEvent(c)},t.TEMPLATE=`
|
||
<div class="ag-cell-wrapper ag-checkbox-cell" role="presentation">
|
||
<ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>
|
||
</div>`,kh([L("eCheckbox")],t.prototype,"eCheckbox",void 0),t}(W),jh=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Uh=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},zh=function(n){jh(t,n);function t(){return n.call(this,`
|
||
<div class="ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit">
|
||
<ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>
|
||
</div>`)||this}return t.prototype.init=function(e){var r=this,i;this.params=e;var o=(i=e.value)!==null&&i!==void 0?i:void 0;this.eCheckbox.setValue(o);var s=this.eCheckbox.getInputElement();s.setAttribute("tabindex","-1"),this.setAriaLabel(o),this.addManagedListener(this.eCheckbox,g.EVENT_FIELD_VALUE_CHANGED,function(a){return r.setAriaLabel(a.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(),i=Ui(r,e),o=r("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel("".concat(o," (").concat(i,")"))},Uh([L("eCheckbox")],t.prototype,"eCheckbox",void 0),t}(lr),$h=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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 i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Ql=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},Xl=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},Kh=function(n){$h(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.agGridDefaults={agDateInput:Hd,agColumnHeader:Yd,agColumnGroupHeader:Qd,agSortIndicator:as,agTextColumnFloatingFilter:zd,agNumberColumnFloatingFilter:jd,agDateColumnFloatingFilter:Md,agReadOnlyFloatingFilter:dd,agAnimateShowChangeCellRenderer:ph,agAnimateSlideCellRenderer:fh,agGroupCellRenderer:Yl,agGroupRowRenderer:Yl,agLoadingCellRenderer:_h,agCheckboxCellRenderer:Wh,agCellEditor:Ul,agTextCellEditor:Ul,agNumberCellEditor:Lh,agDateCellEditor:Mh,agDateStringCellEditor:Hh,agSelectCellEditor:rh,agLargeTextCellEditor:eh,agCheckboxCellEditor:zh,agTextColumnFilter:ns,agNumberColumnFilter:Nl,agDateColumnFilter:Ll,agLoadingOverlay:Oh,agNoRowsOverlay:Ph,agTooltipComponent:Ah},e.enterpriseAgDefaultCompsModule={agSetColumnFilter:M.SetFilterModule,agSetColumnFloatingFilter:M.SetFilterModule,agMultiColumnFilter:M.MultiFilterModule,agMultiColumnFloatingFilter:M.MultiFilterModule,agGroupColumnFilter:M.RowGroupingModule,agGroupColumnFloatingFilter:M.RowGroupingModule,agRichSelect:M.RichSelectModule,agRichSelectCellEditor:M.RichSelectModule,agDetailCellRenderer:M.MasterDetailModule,agSparklineCellRenderer:M.SparklinesModule},e.jsComps={},e}return t.prototype.init=function(){var e=this;this.gridOptions.components!=null&&Ce(this.gridOptions.components,function(r,i){return e.registerJsComponent(r,i)})},t.prototype.registerDefaultComponent=function(e,r){if(this.agGridDefaults[e]){console.error("Trying to overwrite a default component. You should call registerComponent");return}this.agGridDefaults[e]=r},t.prototype.registerJsComponent=function(e,r){this.jsComps[e]=r},t.prototype.retrieve=function(e,r){var i=this,o=function(p,d){return{componentFromFramework:d,component:p}},s=this.getFrameworkOverrides().frameworkComponent(r,this.gridOptions.components);if(s!=null)return o(s,!0);var a=this.jsComps[r];if(a){var l=this.getFrameworkOverrides().isFrameworkComponent(a);return o(a,l)}var u=this.agGridDefaults[r];if(u)return o(u,!1);var c=this.enterpriseAgDefaultCompsModule[r];return c?k.__assertRegistered(c,"AG Grid '".concat(e,"' component: ").concat(r),this.context.getGridId()):wr(function(){i.warnAboutMissingComponent(e,r)},"MissingComp"+r),null},t.prototype.warnAboutMissingComponent=function(e,r){var i=Xl(Xl([],Ql(Object.keys(this.agGridDefaults).filter(function(s){return!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(s)})),!1),Ql(Object.keys(this.jsComps)),!1),o=Jr(r,i,!0,.8).values;console.warn("AG Grid: Could not find '".concat(r,`' component. It was configured as "`).concat(e,": '").concat(r,`'" but it wasn't found in the list of registered components.`)),o.length>0&&console.warn(" Did you mean: [".concat(o.slice(0,3),"]?")),console.warn("If using a custom component check it has been registered as described in: ".concat(this.getFrameworkOverrides().getDocLink("components/")))},us([f("gridOptions")],t.prototype,"gridOptions",void 0),us([b],t.prototype,"init",null),t=us([I("userComponentRegistry")],t),t}(D),Yh={propertyName:"dateComponent",cellRenderer:!1},qh={propertyName:"headerComponent",cellRenderer:!1},Qh={propertyName:"headerGroupComponent",cellRenderer:!1},Jl={propertyName:"cellRenderer",cellRenderer:!0},Xh={propertyName:"cellEditor",cellRenderer:!1},Zl={propertyName:"innerRenderer",cellRenderer:!0},Jh={propertyName:"loadingOverlayComponent",cellRenderer:!1},Zh={propertyName:"noRowsOverlayComponent",cellRenderer:!1},ef={propertyName:"tooltipComponent",cellRenderer:!1},cs={propertyName:"filter",cellRenderer:!1},tf={propertyName:"floatingFilterComponent",cellRenderer:!1},rf={propertyName:"toolPanel",cellRenderer:!1},of={propertyName:"statusPanel",cellRenderer:!1},nf={propertyName:"fullWidthCellRenderer",cellRenderer:!0},sf={propertyName:"loadingCellRenderer",cellRenderer:!0},af={propertyName:"groupRowRenderer",cellRenderer:!0},lf={propertyName:"detailCellRenderer",cellRenderer:!0},uf=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}(),cf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),br=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},pf=function(n){cf(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.getHeaderCompDetails=function(e,r){return this.getCompDetails(e,qh,"agColumnHeader",r)},t.prototype.getHeaderGroupCompDetails=function(e){var r=e.columnGroup.getColGroupDef();return this.getCompDetails(r,Qh,"agColumnGroupHeader",e)},t.prototype.getFullWidthCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,nf,null,e,!0)},t.prototype.getFullWidthLoadingCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,sf,"agLoadingCellRenderer",e,!0)},t.prototype.getFullWidthGroupCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,af,"agGroupRowRenderer",e,!0)},t.prototype.getFullWidthDetailCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,lf,"agDetailCellRenderer",e,!0)},t.prototype.getInnerRendererDetails=function(e,r){return this.getCompDetails(e,Zl,null,r)},t.prototype.getFullWidthGroupRowInnerCellRenderer=function(e,r){return this.getCompDetails(e,Zl,null,r)},t.prototype.getCellRendererDetails=function(e,r){return this.getCompDetails(e,Jl,null,r)},t.prototype.getCellEditorDetails=function(e,r){return this.getCompDetails(e,Xh,"agCellEditor",r,!0)},t.prototype.getFilterDetails=function(e,r,i){return this.getCompDetails(e,cs,i,r,!0)},t.prototype.getDateCompDetails=function(e){return this.getCompDetails(this.gridOptions,Yh,"agDateInput",e,!0)},t.prototype.getLoadingOverlayCompDetails=function(e){return this.getCompDetails(this.gridOptions,Jh,"agLoadingOverlay",e,!0)},t.prototype.getNoRowsOverlayCompDetails=function(e){return this.getCompDetails(this.gridOptions,Zh,"agNoRowsOverlay",e,!0)},t.prototype.getTooltipCompDetails=function(e){return this.getCompDetails(e.colDef,ef,"agTooltipComponent",e,!0)},t.prototype.getSetFilterCellRendererDetails=function(e,r){return this.getCompDetails(e,Jl,null,r)},t.prototype.getFloatingFilterCompDetails=function(e,r,i){return this.getCompDetails(e,tf,i,r)},t.prototype.getToolPanelCompDetails=function(e,r){return this.getCompDetails(e,rf,null,r,!0)},t.prototype.getStatusPanelCompDetails=function(e,r){return this.getCompDetails(e,of,null,r,!0)},t.prototype.getCompDetails=function(e,r,i,o,s){var a=this;s===void 0&&(s=!1);var l=r.propertyName,u=r.cellRenderer,c=this.getCompKeys(e,r,o),p=c.compName,d=c.jsComp,h=c.fwComp,v=c.paramsFromSelector,y=c.popupFromSelector,C=c.popupPositionFromSelector,m=function(R){var T=a.userComponentRegistry.retrieve(l,R);T&&(d=T.componentFromFramework?void 0:T.component,h=T.componentFromFramework?T.component:void 0)};if(p!=null&&m(p),d==null&&h==null&&i!=null&&m(i),d&&u&&!this.agComponentUtils.doesImplementIComponent(d)&&(d=this.agComponentUtils.adaptFunction(l,d)),!d&&!h){s&&console.error("AG Grid: Could not find component ".concat(p,", did you forget to configure this component?"));return}var w=this.mergeParamsWithApplicationProvidedParams(e,r,o,v),E=d==null,S=d||h;return{componentFromFramework:E,componentClass:S,params:w,type:r,popupFromSelector:y,popupPositionFromSelector:C,newAgStackInstance:function(){return a.newAgStackInstance(S,E,w,r)}}},t.prototype.getCompKeys=function(e,r,i){var o=this,s=r.propertyName,a,l,u,c,p,d;if(e){var h=e,v=h[s+"Selector"],y=v?v(i):null,C=function(m){if(typeof m=="string")a=m;else if(m!=null&&m!==!0){var w=o.getFrameworkOverrides().isFrameworkComponent(m);w?u=m:l=m}};y?(C(y.component),c=y.params,p=y.popup,d=y.popupPosition):C(h[s])}return{compName:a,jsComp:l,fwComp:u,paramsFromSelector:c,popupFromSelector:p,popupPositionFromSelector:d}},t.prototype.newAgStackInstance=function(e,r,i,o){var s=o.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,o)}var c=this.initComponent(l,i);return c==null?vt.resolve(l):c.then(function(){return l})},t.prototype.mergeParamsWithApplicationProvidedParams=function(e,r,i,o){o===void 0&&(o=null);var s={context:this.gridOptionsService.context,columnApi:this.gridOptionsService.columnApi,api:this.gridOptionsService.api};Ge(s,i);var a=e,l=a&&a[r.propertyName+"Params"];if(typeof l=="function"){var u=l(i);Ge(s,u)}else typeof l=="object"&&Ge(s,l);return Ge(s,o),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 i=null,o=this.getCompKeys(e,cs),s=o.compName,a=o.jsComp,l=o.fwComp;if(s)i=uf.getFloatingFilterType(s);else{var u=a==null&&l==null&&e.filter===!0;u&&(i=r())}return i},br([f("gridOptions")],t.prototype,"gridOptions",void 0),br([f("agComponentUtils")],t.prototype,"agComponentUtils",void 0),br([f("componentMetadataProvider")],t.prototype,"componentMetadataProvider",void 0),br([f("userComponentRegistry")],t.prototype,"userComponentRegistry",void 0),br([Y("frameworkComponentWrapper")],t.prototype,"frameworkComponentWrapper",void 0),t=br([I("userComponentFactory")],t),t}(D),df=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,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,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}(),uo;(function(n){n[n.SINGLE_SHEET=0]="SINGLE_SHEET",n[n.MULTI_SHEET=1]="MULTI_SHEET"})(uo||(uo={}));var hf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),ps=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},ff=function(n){hf(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,i=e.mouseDownListener;if(r.removeEventListener("mousedown",i),e.touchEnabled){var o=e.touchStartListener;r.removeEventListener("touchstart",o,{passive:!0})}},t.prototype.removeDragSource=function(e){var r=this.dragSources.find(function(i){return i.dragSource===e});r&&(this.removeListener(r),Ve(this.dragSources,r))},t.prototype.isDragging=function(){return this.dragging},t.prototype.addDragSource=function(e){var r=this,i=this.onMouseDown.bind(this,e),o=e.eElement,s=e.includeTouch,a=e.stopPropagationForTouch;o.addEventListener("mousedown",i);var l=null,u=this.gridOptionsService.get("suppressTouch");s&&!u&&(l=function(c){xn(c.target)||(c.cancelable&&(c.preventDefault(),a&&c.stopPropagation()),r.onTouchStart(e,c))},o.addEventListener("touchstart",l,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:i,touchStartListener:l,touchEnabled:!!s})},t.prototype.getStartTarget=function(){return this.startTarget},t.prototype.onTouchStart=function(e,r){var i=this;this.currentDragParams=e,this.dragging=!1;var o=r.touches[0];this.touchLastTime=o,this.touchStart=o;var s=function(p){return i.onTouchMove(p,e.eElement)},a=function(p){return i.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(o,this.touchStart,e.eElement)},t.prototype.onMouseDown=function(e,r){var i=this,o=r;if(!(e.skipMouseEvent&&e.skipMouseEvent(r))&&!o._alreadyProcessedByDragService&&(o._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 i.onMouseMove(p,e.eElement)},a=function(p){return i.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 i=r.target,o=r.type,s=r.listener,a=r.options;i.addEventListener(o,s,a)}),this.dragEndFunctions.push(function(){e.forEach(function(r){var i=r.target,o=r.type,s=r.listener,a=r.options;i.removeEventListener(o,s,a)})})},t.prototype.isEventNearStartEvent=function(e,r){var i=this.currentDragParams.dragStartPixels,o=P(i)?i:4;return Un(e,r,o)},t.prototype.getFirstActiveTouch=function(e){for(var r=0;r<e.length;r++)if(e[r].identifier===this.touchStart.identifier)return e[r];return null},t.prototype.onCommonMove=function(e,r,i){if(!this.dragging){if(!this.dragging&&this.isEventNearStartEvent(e,r))return;this.dragging=!0;var o={type:g.EVENT_DRAG_STARTED,target:i};this.eventService.dispatchEvent(o),this.currentDragParams.onDragStart(r),this.currentDragParams.onDragging(r)}this.currentDragParams.onDragging(e)},t.prototype.onTouchMove=function(e,r){var i=this.getFirstActiveTouch(e.touches);i&&this.onCommonMove(i,this.touchStart,r)},t.prototype.onMouseMove=function(e,r){var i;if(nt()){var o=this.gridOptionsService.getDocument();(i=o.getSelection())===null||i===void 0||i.removeAllRanges()}this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,r)},t.prototype.shouldPreventMouseEvent=function(e){var r=this.gridOptionsService.get("enableCellTextSelection"),i=e.type==="mousemove";return r&&i&&e.cancelable&&this.mouseEventService.isEventFromThisGrid(e)&&!this.isOverFormFieldElement(e)},t.prototype.isOverFormFieldElement=function(e){var r=e.target,i=r==null?void 0:r.tagName.toLocaleLowerCase();return!!(i!=null&&i.match("^a$|textarea|input|select|button"))},t.prototype.onTouchUp=function(e,r){var i=this.getFirstActiveTouch(e.changedTouches);i||(i=this.touchLastTime),this.onUpCommon(i,r)},t.prototype.onMouseUp=function(e,r){this.onUpCommon(e,r)},t.prototype.onUpCommon=function(e,r){if(this.dragging){this.dragging=!1,this.currentDragParams.onDragStop(e);var i={type:g.EVENT_DRAG_STOPPED,target:r};this.eventService.dispatchEvent(i)}this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null,this.dragEndFunctions.forEach(function(o){return o()}),this.dragEndFunctions.length=0},ps([f("mouseEventService")],t.prototype,"mouseEventService",void 0),ps([Se],t.prototype,"removeAllListeners",null),t=ps([I("dragService")],t),t}(D),eu=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 i=this.scrollContainer.getBoundingClientRect(),o=this.scrollByTick;this.tickLeft=t.clientX<i.left+o,this.tickRight=t.clientX>i.right-o,this.tickUp=t.clientY<i.top+o&&!r,this.tickDown=t.clientY>i.bottom-o&&!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}(),vf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),tu=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},ds="ag-list-item-hovered";(function(n){vf(t,n);function t(e,r,i){var o=n.call(this)||this;return o.comp=e,o.virtualList=r,o.params=i,o.currentDragValue=null,o.lastHoveredListItem=null,o}return t.prototype.postConstruct=function(){this.addManagedListener(this.params.eventSource,this.params.listItemDragStartEvent,this.listItemDragStart.bind(this)),this.addManagedListener(this.params.eventSource,this.params.listItemDragEndEvent,this.listItemDragEnd.bind(this)),this.createDropTarget(),this.createAutoScrollService()},t.prototype.listItemDragStart=function(e){this.currentDragValue=this.params.getCurrentDragValue(e),this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue)},t.prototype.listItemDragEnd=function(){var e=this;window.setTimeout(function(){e.currentDragValue=null,e.moveBlocked=!1},10)},t.prototype.createDropTarget=function(){var e=this,r={isInterestedIn:function(i){return i===e.params.dragSourceType},getIconName:function(){return fe[e.moveBlocked?"ICON_NOT_ALLOWED":"ICON_MOVE"]},getContainer:function(){return e.comp.getGui()},onDragging:function(i){return e.onDragging(i)},onDragStop:function(){return e.onDragStop()},onDragLeave:function(){return e.onDragLeave()}};this.dragAndDropService.addDropTarget(r)},t.prototype.createAutoScrollService=function(){var e=this.virtualList.getGui();this.autoScrollService=new eu({scrollContainer:e,scrollAxis:"y",getVerticalPosition:function(){return e.scrollTop},setVerticalPosition:function(r){return e.scrollTop=r}})},t.prototype.onDragging=function(e){if(!(!this.currentDragValue||this.moveBlocked)){var r=this.getListDragItem(e),i=this.virtualList.getComponentAt(r.rowIndex);if(i){var o=i.getGui().parentElement;this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===r.rowIndex&&this.lastHoveredListItem.position===r.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredListItem=r,Ln(o,ds),Ln(o,"ag-item-highlight-".concat(r.position)))}}},t.prototype.getListDragItem=function(e){var r=this.virtualList.getGui(),i=parseFloat(window.getComputedStyle(r).paddingTop),o=this.virtualList.getRowHeight(),s=this.virtualList.getScrollTop(),a=Math.max(0,(e.y-i+s)/o),l=this.params.getNumRows(this.comp)-1,u=Math.min(l,a)|0;return{rowIndex:u,position:Math.round(a)>a||a>l?"bottom":"top",component:this.virtualList.getComponentAt(u)}},t.prototype.onDragStop=function(){this.moveBlocked||(this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearHoveredItems(),this.autoScrollService.ensureCleared())},t.prototype.onDragLeave=function(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()},t.prototype.clearHoveredItems=function(){var e=this.virtualList.getGui();e.querySelectorAll(".".concat(ds)).forEach(function(r){[ds,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach(function(i){r.classList.remove(i)})}),this.lastHoveredListItem=null},tu([f("dragAndDropService")],t.prototype,"dragAndDropService",void 0),tu([b],t.prototype,"postConstruct",null),t})(D);var Xe;(function(n){n[n.Above=0]="Above",n[n.Below=1]="Below"})(Xe||(Xe={}));var $=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o};function cr(n){var t=n,e=t!=null&&t.getFrameworkComponentInstance!=null;return e?t.getFrameworkComponentInstance():n}var ru=function(){function n(){this.detailGridInfoMap={},this.destroyCalled=!1}return 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.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;Ce(this.detailGridInfoMap,function(r,i){P(i)&&(t(i,e),e++)})},n.prototype.getDataAsCsv=function(t){if(k.__assertRegistered(M.CsvExportModule,"api.getDataAsCsv",this.context.getGridId()))return this.csvCreator.getDataAsCsv(t)},n.prototype.exportDataAsCsv=function(t){k.__assertRegistered(M.CsvExportModule,"api.exportDataAsCSv",this.context.getGridId())&&this.csvCreator.exportDataAsCsv(t)},n.prototype.assertNotExcelMultiSheet=function(t,e){return k.__assertRegistered(M.ExcelExportModule,"api."+t,this.context.getGridId())?this.excelCreator.getFactoryMode()===uo.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:!1},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(k.__assertRegistered(M.ExcelExportModule,"api.getSheetDataForExcel",this.context.getGridId()))return this.excelCreator.setFactoryMode(uo.MULTI_SHEET),this.excelCreator.getSheetDataForExcel(t)},n.prototype.getMultipleSheetsAsExcel=function(t){if(k.__assertRegistered(M.ExcelExportModule,"api.getMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.getMultipleSheetsAsExcel(t)},n.prototype.exportMultipleSheetsAsExcel=function(t){if(k.__assertRegistered(M.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(),i="aria-".concat(t);e===null?r.removeAttribute(i):r.setAttribute(i,e)}},n.prototype.logMissingRowModel=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];console.error("AG Grid: api.".concat(t," can only be called when gridOptions.rowModelType is ").concat(e.join(" or ")))},n.prototype.getPinnedTopRowCount=function(){return this.pinnedRowModel.getPinnedTopRowCount()},n.prototype.getPinnedBottomRowCount=function(){return this.pinnedRowModel.getPinnedBottomRowCount()},n.prototype.getPinnedTopRow=function(t){return this.pinnedRowModel.getPinnedTopRow(t)},n.prototype.getPinnedBottomRow=function(t){return this.pinnedRowModel.getPinnedBottomRow(t)},n.prototype.expireValueCache=function(){this.valueCache.expire()},n.prototype.getVerticalPixelRange=function(){return this.gridBodyCtrl.getScrollFeature().getVScrollPosition()},n.prototype.getHorizontalPixelRange=function(){return this.gridBodyCtrl.getScrollFeature().getHScrollPosition()},n.prototype.refreshCells=function(t){t===void 0&&(t={}),this.rowRenderer.refreshCells(t)},n.prototype.flashCells=function(t){t===void 0&&(t={}),this.rowRenderer.flashCells(t)},n.prototype.redrawRows=function(t){t===void 0&&(t={});var e=t?t.rowNodes:void 0;this.rowRenderer.redrawRows(e)},n.prototype.refreshHeader=function(){this.ctrlsService.getHeaderRowContainerCtrls().forEach(function(t){return t.refresh()})},n.prototype.isAnyFilterPresent=function(){return this.filterManager.isAnyFilterPresent()},n.prototype.isColumnFilterPresent=function(){return this.filterManager.isColumnFilterPresent()||this.filterManager.isAggregateFilterPresent()},n.prototype.isQuickFilterPresent=function(){return this.filterManager.isQuickFilterPresent()},n.prototype.getModel=function(){return this.rowModel},n.prototype.setRowNodeExpanded=function(t,e,r){this.expansionService.setRowNodeExpanded(t,e,r)},n.prototype.onGroupExpandedOrCollapsed=function(){if(V(this.clientSideRowModel)){this.logMissingRowModel("onGroupExpandedOrCollapsed","clientSide");return}this.expansionService.onGroupExpandedOrCollapsed()},n.prototype.refreshClientSideRowModel=function(t){if(V(this.clientSideRowModel)){this.logMissingRowModel("refreshClientSideRowModel","clientSide");return}this.clientSideRowModel.refreshModel(t)},n.prototype.isAnimationFrameQueueEmpty=function(){return this.animationFrameService.isQueueEmpty()},n.prototype.flushAllAnimationFrames=function(){this.animationFrameService.flushAllFrames()},n.prototype.getRowNode=function(t){return this.rowModel.getRowNode(t)},n.prototype.getSizesForCurrentTheme=function(){return{rowHeight:this.gos.getRowHeightAsNumber(),headerHeight:this.columnModel.getHeaderHeight()}},n.prototype.expandAll=function(){this.clientSideRowModel||this.serverSideRowModel?this.expansionService.expandAll(!0):this.logMissingRowModel("expandAll","clientSide","serverSide")},n.prototype.collapseAll=function(){this.clientSideRowModel||this.serverSideRowModel?this.expansionService.expandAll(!1):this.logMissingRowModel("collapseAll","clientSide","serverSide")},n.prototype.addRenderedRowListener=function(t,e,r){this.rowRenderer.addRenderedRowListener(t,e,r)},n.prototype.getQuickFilter=function(){return this.gos.get("quickFilterText")},n.prototype.getAdvancedFilterModel=function(){return k.__assertRegistered(M.AdvancedFilterModule,"api.getAdvancedFilterModel",this.context.getGridId())?this.filterManager.getAdvancedFilterModel():null},n.prototype.setAdvancedFilterModel=function(t){this.filterManager.setAdvancedFilterModel(t)},n.prototype.showAdvancedFilterBuilder=function(){k.__assertRegistered(M.AdvancedFilterModule,"api.setAdvancedFilterModel",this.context.getGridId())&&this.filterManager.showAdvancedFilterBuilder("api")},n.prototype.setNodesSelected=function(t){var e=t.nodes.every(function(a){return a.rowPinned?(console.warn("AG Grid: cannot select pinned rows"),!1):a.id===void 0?(console.warn("AG Grid: cannot select node until id for node is known"),!1):!0});if(e){var r=t.nodes,i=t.source,o=t.newValue,s=r;this.selectionService.setNodesSelected({nodes:s,source:i??"api",newValue:o})}},n.prototype.selectAll=function(t){t===void 0&&(t="apiSelectAll"),this.selectionService.selectAllRowNodes({source:t})},n.prototype.deselectAll=function(t){t===void 0&&(t="apiSelectAll"),this.selectionService.deselectAllRowNodes({source:t})},n.prototype.selectAllFiltered=function(t){t===void 0&&(t="apiSelectAllFiltered"),this.selectionService.selectAllRowNodes({source:t,justFiltered:!0})},n.prototype.deselectAllFiltered=function(t){t===void 0&&(t="apiSelectAllFiltered"),this.selectionService.deselectAllRowNodes({source:t,justFiltered:!0})},n.prototype.getServerSideSelectionState=function(){return V(this.serverSideRowModel)?(this.logMissingRowModel("getServerSideSelectionState","serverSide"),null):this.selectionService.getSelectionState()},n.prototype.setServerSideSelectionState=function(t){if(V(this.serverSideRowModel)){this.logMissingRowModel("setServerSideSelectionState","serverSide");return}this.selectionService.setSelectionState(t,"api")},n.prototype.selectAllOnCurrentPage=function(t){t===void 0&&(t="apiSelectAllCurrentPage"),this.selectionService.selectAllRowNodes({source:t,justCurrentPage:!0})},n.prototype.deselectAllOnCurrentPage=function(t){t===void 0&&(t="apiSelectAllCurrentPage"),this.selectionService.deselectAllRowNodes({source:t,justCurrentPage:!0})},n.prototype.showLoadingOverlay=function(){this.overlayService.showLoadingOverlay()},n.prototype.showNoRowsOverlay=function(){this.overlayService.showNoRowsOverlay()},n.prototype.hideOverlay=function(){this.overlayService.hideOverlay()},n.prototype.getSelectedNodes=function(){return this.selectionService.getSelectedNodes()},n.prototype.getSelectedRows=function(){return this.selectionService.getSelectedRows()},n.prototype.getBestCostNodeSelection=function(){if(V(this.clientSideRowModel)){this.logMissingRowModel("getBestCostNodeSelection","clientSide");return}return this.selectionService.getBestCostNodeSelection()},n.prototype.getRenderedNodes=function(){return this.rowRenderer.getRenderedNodes()},n.prototype.ensureColumnVisible=function(t,e){e===void 0&&(e="auto"),this.gridBodyCtrl.getScrollFeature().ensureColumnVisible(t,e)},n.prototype.ensureIndexVisible=function(t,e){this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(t,e)},n.prototype.ensureNodeVisible=function(t,e){e===void 0&&(e=null),this.gridBodyCtrl.getScrollFeature().ensureNodeVisible(t,e)},n.prototype.forEachLeafNode=function(t){if(V(this.clientSideRowModel)){this.logMissingRowModel("forEachLeafNode","clientSide");return}this.clientSideRowModel.forEachLeafNode(t)},n.prototype.forEachNode=function(t,e){this.rowModel.forEachNode(t,e)},n.prototype.forEachNodeAfterFilter=function(t){if(V(this.clientSideRowModel)){this.logMissingRowModel("forEachNodeAfterFilter","clientSide");return}this.clientSideRowModel.forEachNodeAfterFilter(t)},n.prototype.forEachNodeAfterFilterAndSort=function(t){if(V(this.clientSideRowModel)){this.logMissingRowModel("forEachNodeAfterFilterAndSort","clientSide");return}this.clientSideRowModel.forEachNodeAfterFilterAndSort(t)},n.prototype.getFilterInstance=function(t,e){return this.filterManager.getFilterInstance(t,e)},n.prototype.destroyFilter=function(t){var e=this.columnModel.getPrimaryColumn(t);if(e)return this.filterManager.destroyFilter(e,"api")},n.prototype.getStatusPanel=function(t){if(k.__assertRegistered(M.StatusBarModule,"api.getStatusPanel",this.context.getGridId())){var e=this.statusBarService.getStatusPanel(t);return cr(e)}},n.prototype.getColumnDef=function(t){var e=this.columnModel.getPrimaryColumn(t);return e?e.getColDef():null},n.prototype.getColumnDefs=function(){return this.columnModel.getColumnDefs()},n.prototype.onFilterChanged=function(t){t===void 0&&(t="api"),this.filterManager.onFilterChanged({source:t})},n.prototype.onSortChanged=function(){this.sortController.onSortChanged("api")},n.prototype.setFilterModel=function(t){this.filterManager.setFilterModel(t)},n.prototype.getFilterModel=function(){return this.filterManager.getFilterModel()},n.prototype.getFocusedCell=function(){return this.focusService.getFocusedCell()},n.prototype.clearFocusedCell=function(){return this.focusService.clearFocusedCell()},n.prototype.setFocusedCell=function(t,e,r){this.focusService.setFocusedCell({rowIndex:t,column:e,rowPinned:r,forceBrowserFocus:!0})},n.prototype.addRowDropZone=function(t){this.gridBodyCtrl.getRowDragFeature().addRowDropZone(t)},n.prototype.removeRowDropZone=function(t){var e=this.dragAndDropService.findExternalZone(t);e&&this.dragAndDropService.removeDropTarget(e)},n.prototype.getRowDropZoneParams=function(t){return this.gridBodyCtrl.getRowDragFeature().getRowDropZone(t)},n.prototype.assertSideBarLoaded=function(t){return k.__assertRegistered(M.SideBarModule,"api."+t,this.context.getGridId())},n.prototype.isSideBarVisible=function(){return this.assertSideBarLoaded("isSideBarVisible")&&this.sideBarService.getSideBarComp().isDisplayed()},n.prototype.setSideBarVisible=function(t){this.assertSideBarLoaded("setSideBarVisible")&&this.sideBarService.getSideBarComp().setDisplayed(t)},n.prototype.setSideBarPosition=function(t){this.assertSideBarLoaded("setSideBarPosition")&&this.sideBarService.getSideBarComp().setSideBarPosition(t)},n.prototype.openToolPanel=function(t){this.assertSideBarLoaded("openToolPanel")&&this.sideBarService.getSideBarComp().openToolPanel(t,"api")},n.prototype.closeToolPanel=function(){this.assertSideBarLoaded("closeToolPanel")&&this.sideBarService.getSideBarComp().close("api")},n.prototype.getOpenedToolPanel=function(){return this.assertSideBarLoaded("getOpenedToolPanel")?this.sideBarService.getSideBarComp().openedItem():null},n.prototype.refreshToolPanel=function(){this.assertSideBarLoaded("refreshToolPanel")&&this.sideBarService.getSideBarComp().refresh()},n.prototype.isToolPanelShowing=function(){return this.assertSideBarLoaded("isToolPanelShowing")&&this.sideBarService.getSideBarComp().isToolPanelShowing()},n.prototype.getToolPanelInstance=function(t){if(this.assertSideBarLoaded("getToolPanelInstance")){var e=this.sideBarService.getSideBarComp().getToolPanelInstance(t);return cr(e)}},n.prototype.getSideBar=function(){if(this.assertSideBarLoaded("getSideBar"))return this.sideBarService.getSideBarComp().getDef()},n.prototype.resetRowHeights=function(){if(P(this.clientSideRowModel)){if(this.columnModel.isAutoRowHeightActive()){console.warn("AG Grid: calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.");return}this.clientSideRowModel.resetRowHeights()}},n.prototype.setRowCount=function(t,e){if(this.serverSideRowModel){if(this.columnModel.isRowGroupEmpty()){this.serverSideRowModel.setRowCount(t,e);return}console.error("AG Grid: setRowCount cannot be used while using row grouping.");return}if(this.infiniteRowModel){this.infiniteRowModel.setRowCount(t,e);return}this.logMissingRowModel("setRowCount","infinite","serverSide")},n.prototype.onRowHeightChanged=function(){this.clientSideRowModel?this.clientSideRowModel.onRowHeightChanged():this.serverSideRowModel&&this.serverSideRowModel.onRowHeightChanged()},n.prototype.getValue=function(t,e){var r=this.columnModel.getPrimaryColumn(t);return V(r)&&(r=this.columnModel.getGridColumn(t)),V(r)?null:this.valueService.getValue(r,e)},n.prototype.addEventListener=function(t,e){this.apiEventService.addEventListener(t,e)},n.prototype.addGlobalListener=function(t){this.apiEventService.addGlobalListener(t)},n.prototype.removeEventListener=function(t,e){this.apiEventService.removeEventListener(t,e)},n.prototype.removeGlobalListener=function(t){this.apiEventService.removeGlobalListener(t)},n.prototype.dispatchEvent=function(t){this.eventService.dispatchEvent(t)},n.prototype.destroy=function(){var t="See ".concat(this.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed"));if(!this.destroyCalled){var e={type:g.EVENT_GRID_PRE_DESTROYED,state:this.getState()};this.dispatchEvent(e),this.destroyCalled=!0;var r=this.ctrlsService.getGridCtrl();r&&r.destroyGridUi(),this.context.destroy(),da(this,["isDestroyed"],t)}},n.prototype.isDestroyed=function(){return this.destroyCalled},n.prototype.resetQuickFilter=function(){this.filterManager.resetQuickFilterCache()},n.prototype.getCellRanges=function(){return this.rangeService?this.rangeService.getCellRanges():(k.__assertRegistered(M.RangeSelectionModule,"api.getCellRanges",this.context.getGridId()),null)},n.prototype.addCellRange=function(t){if(this.rangeService){this.rangeService.addCellRange(t);return}k.__assertRegistered(M.RangeSelectionModule,"api.addCellRange",this.context.getGridId())},n.prototype.clearRangeSelection=function(){this.rangeService&&this.rangeService.removeAllCellRanges(),k.__assertRegistered(M.RangeSelectionModule,"gridApi.clearRangeSelection",this.context.getGridId())},n.prototype.undoCellEditing=function(){this.undoRedoService.undo("api")},n.prototype.redoCellEditing=function(){this.undoRedoService.redo("api")},n.prototype.getCurrentUndoSize=function(){return this.undoRedoService.getCurrentUndoStackSize()},n.prototype.getCurrentRedoSize=function(){return this.undoRedoService.getCurrentRedoStackSize()},n.prototype.getChartModels=function(){if(k.__assertRegistered(M.GridChartsModule,"api.getChartModels",this.context.getGridId()))return this.chartService.getChartModels()},n.prototype.getChartRef=function(t){if(k.__assertRegistered(M.GridChartsModule,"api.getChartRef",this.context.getGridId()))return this.chartService.getChartRef(t)},n.prototype.getChartImageDataURL=function(t){if(k.__assertRegistered(M.GridChartsModule,"api.getChartImageDataURL",this.context.getGridId()))return this.chartService.getChartImageDataURL(t)},n.prototype.downloadChart=function(t){if(k.__assertRegistered(M.GridChartsModule,"api.downloadChart",this.context.getGridId()))return this.chartService.downloadChart(t)},n.prototype.openChartToolPanel=function(t){if(k.__assertRegistered(M.GridChartsModule,"api.openChartToolPanel",this.context.getGridId()))return this.chartService.openChartToolPanel(t)},n.prototype.closeChartToolPanel=function(t){if(k.__assertRegistered(M.GridChartsModule,"api.closeChartToolPanel",this.context.getGridId()))return this.chartService.closeChartToolPanel(t.chartId)},n.prototype.createRangeChart=function(t){if(k.__assertRegistered(M.GridChartsModule,"api.createRangeChart",this.context.getGridId()))return this.chartService.createRangeChart(t)},n.prototype.createPivotChart=function(t){if(k.__assertRegistered(M.GridChartsModule,"api.createPivotChart",this.context.getGridId()))return this.chartService.createPivotChart(t)},n.prototype.createCrossFilterChart=function(t){if(k.__assertRegistered(M.GridChartsModule,"api.createCrossFilterChart",this.context.getGridId()))return this.chartService.createCrossFilterChart(t)},n.prototype.updateChart=function(t){k.__assertRegistered(M.GridChartsModule,"api.updateChart",this.context.getGridId())&&this.chartService.updateChart(t)},n.prototype.restoreChart=function(t,e){if(k.__assertRegistered(M.GridChartsModule,"api.restoreChart",this.context.getGridId()))return this.chartService.restoreChart(t,e)},n.prototype.copyToClipboard=function(t){k.__assertRegistered(M.ClipboardModule,"api.copyToClipboard",this.context.getGridId())&&this.clipboardService.copyToClipboard(t)},n.prototype.cutToClipboard=function(t){k.__assertRegistered(M.ClipboardModule,"api.cutToClipboard",this.context.getGridId())&&this.clipboardService.cutToClipboard(t,"api")},n.prototype.copySelectedRowsToClipboard=function(t){k.__assertRegistered(M.ClipboardModule,"api.copySelectedRowsToClipboard",this.context.getGridId())&&this.clipboardService.copySelectedRowsToClipboard(t)},n.prototype.copySelectedRangeToClipboard=function(t){k.__assertRegistered(M.ClipboardModule,"api.copySelectedRangeToClipboard",this.context.getGridId())&&this.clipboardService.copySelectedRangeToClipboard(t)},n.prototype.copySelectedRangeDown=function(){k.__assertRegistered(M.ClipboardModule,"api.copySelectedRangeDown",this.context.getGridId())&&this.clipboardService.copyRangeDown()},n.prototype.pasteFromClipboard=function(){k.__assertRegistered(M.ClipboardModule,"api.pasteFromClipboard",this.context.getGridId())&&this.clipboardService.pasteFromClipboard()},n.prototype.showColumnMenuAfterButtonClick=function(t,e){var r=this.columnModel.getGridColumn(t);this.menuFactory.showMenuAfterButtonClick(r,e,"columnMenu")},n.prototype.showColumnMenuAfterMouseClick=function(t,e){var r=this.columnModel.getGridColumn(t);if(r||(r=this.columnModel.getPrimaryColumn(t)),!r){console.error("AG Grid: column '".concat(t,"' not found"));return}this.menuFactory.showMenuAfterMouseEvent(r,e)},n.prototype.hidePopupMenu=function(){this.contextMenuFactory&&this.contextMenuFactory.hideActiveMenu(),this.menuFactory.hideActiveMenu()},n.prototype.tabToNextCell=function(t){return this.navigationService.tabToNextCell(!1,t)},n.prototype.tabToPreviousCell=function(t){return this.navigationService.tabToNextCell(!0,t)},n.prototype.getCellRendererInstances=function(t){t===void 0&&(t={});var e=this.rowRenderer.getCellRendererInstances(t),r=e.map(cr);return r},n.prototype.getCellEditorInstances=function(t){t===void 0&&(t={});var e=this.rowRenderer.getCellEditorInstances(t),r=e.map(cr);return r},n.prototype.getEditingCells=function(){return this.rowRenderer.getEditingCells()},n.prototype.stopEditing=function(t){t===void 0&&(t=!1),this.rowRenderer.stopEditing(t)},n.prototype.startEditingCell=function(t){var e=this.columnModel.getGridColumn(t.colKey);if(!e){console.warn("AG Grid: no column found for ".concat(t.colKey));return}var r={rowIndex:t.rowIndex,rowPinned:t.rowPinned||null,column:e},i=t.rowPinned==null;i&&this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(t.rowIndex);var o=this.navigationService.getCellByPosition(r);o&&(this.focusService.isCellFocused(r)||this.focusService.setFocusedCell(r),o.startRowOrCellEdit(t.key))},n.prototype.addAggFunc=function(t,e){this.aggFuncService&&this.aggFuncService.addAggFunc(t,e)},n.prototype.addAggFuncs=function(t){this.aggFuncService&&this.aggFuncService.addAggFuncs(t)},n.prototype.clearAggFuncs=function(){this.aggFuncService&&this.aggFuncService.clear()},n.prototype.applyServerSideTransaction=function(t){if(!this.serverSideTransactionManager){this.logMissingRowModel("applyServerSideTransaction","serverSide");return}return this.serverSideTransactionManager.applyTransaction(t)},n.prototype.applyServerSideTransactionAsync=function(t,e){if(!this.serverSideTransactionManager){this.logMissingRowModel("applyServerSideTransactionAsync","serverSide");return}return this.serverSideTransactionManager.applyTransactionAsync(t,e)},n.prototype.applyServerSideRowData=function(t){var e,r,i=(e=t.startRow)!==null&&e!==void 0?e:0,o=(r=t.route)!==null&&r!==void 0?r:[];if(i<0){console.warn("AG Grid: invalid value ".concat(t.startRow," for startRow, the value should be >= 0"));return}this.serverSideRowModel?this.serverSideRowModel.applyRowData(t.successParams,i,o):this.logMissingRowModel("setServerSideDatasource","serverSide")},n.prototype.retryServerSideLoads=function(){if(!this.serverSideRowModel){this.logMissingRowModel("retryServerSideLoads","serverSide");return}this.serverSideRowModel.retryLoads()},n.prototype.flushServerSideAsyncTransactions=function(){if(!this.serverSideTransactionManager){this.logMissingRowModel("flushServerSideAsyncTransactions","serverSide");return}return this.serverSideTransactionManager.flushAsyncTransactions()},n.prototype.applyTransaction=function(t){if(!this.clientSideRowModel){this.logMissingRowModel("applyTransaction","clientSide");return}return this.clientSideRowModel.updateRowData(t)},n.prototype.applyTransactionAsync=function(t,e){if(!this.clientSideRowModel){this.logMissingRowModel("applyTransactionAsync","clientSide");return}this.clientSideRowModel.batchUpdateRowData(t,e)},n.prototype.flushAsyncTransactions=function(){if(!this.clientSideRowModel){this.logMissingRowModel("flushAsyncTransactions","clientSide");return}this.clientSideRowModel.flushAsyncTransactions()},n.prototype.refreshInfiniteCache=function(){this.infiniteRowModel?this.infiniteRowModel.refreshCache():this.logMissingRowModel("refreshInfiniteCache","infinite")},n.prototype.purgeInfiniteCache=function(){this.infiniteRowModel?this.infiniteRowModel.purgeCache():this.logMissingRowModel("purgeInfiniteCache","infinite")},n.prototype.refreshServerSide=function(t){if(!this.serverSideRowModel){this.logMissingRowModel("refreshServerSide","serverSide");return}this.serverSideRowModel.refreshStore(t)},n.prototype.getServerSideGroupLevelState=function(){return this.serverSideRowModel?this.serverSideRowModel.getStoreState():(this.logMissingRowModel("getServerSideGroupLevelState","serverSide"),[])},n.prototype.getInfiniteRowCount=function(){if(this.infiniteRowModel)return this.infiniteRowModel.getRowCount();this.logMissingRowModel("getInfiniteRowCount","infinite")},n.prototype.isLastRowIndexKnown=function(){if(this.infiniteRowModel)return this.infiniteRowModel.isLastRowIndexKnown();this.logMissingRowModel("isLastRowIndexKnown","infinite")},n.prototype.getCacheBlockState=function(){return this.rowNodeBlockLoader.getBlockState()},n.prototype.getFirstDisplayedRow=function(){return this.rowRenderer.getFirstVirtualRenderedRow()},n.prototype.getLastDisplayedRow=function(){return this.rowRenderer.getLastVirtualRenderedRow()},n.prototype.getDisplayedRowAtIndex=function(t){return this.rowModel.getRow(t)},n.prototype.getDisplayedRowCount=function(){return this.rowModel.getRowCount()},n.prototype.paginationIsLastPageFound=function(){return this.paginationProxy.isLastPageFound()},n.prototype.paginationGetPageSize=function(){return this.paginationProxy.getPageSize()},n.prototype.paginationGetCurrentPage=function(){return this.paginationProxy.getCurrentPage()},n.prototype.paginationGetTotalPages=function(){return this.paginationProxy.getTotalPages()},n.prototype.paginationGetRowCount=function(){return this.paginationProxy.getMasterRowCount()},n.prototype.paginationGoToNextPage=function(){this.paginationProxy.goToNextPage()},n.prototype.paginationGoToPreviousPage=function(){this.paginationProxy.goToPreviousPage()},n.prototype.paginationGoToFirstPage=function(){this.paginationProxy.goToFirstPage()},n.prototype.paginationGoToLastPage=function(){this.paginationProxy.goToLastPage()},n.prototype.paginationGoToPage=function(t){this.paginationProxy.goToPage(t)},n.prototype.sizeColumnsToFit=function(t){typeof t=="number"?this.columnModel.sizeColumnsToFit(t,"api"):this.gridBodyCtrl.sizeColumnsToFit(t)},n.prototype.setColumnGroupOpened=function(t,e){this.columnModel.setColumnGroupOpened(t,e,"api")},n.prototype.getColumnGroup=function(t,e){return this.columnModel.getColumnGroup(t,e)},n.prototype.getProvidedColumnGroup=function(t){return this.columnModel.getProvidedColumnGroup(t)},n.prototype.getDisplayNameForColumn=function(t,e){return this.columnModel.getDisplayNameForColumn(t,e)||""},n.prototype.getDisplayNameForColumnGroup=function(t,e){return this.columnModel.getDisplayNameForColumnGroup(t,e)||""},n.prototype.getColumn=function(t){return this.columnModel.getPrimaryColumn(t)},n.prototype.getColumns=function(){return this.columnModel.getAllPrimaryColumns()},n.prototype.applyColumnState=function(t){return this.columnModel.applyColumnState(t,"api")},n.prototype.getColumnState=function(){return this.columnModel.getColumnState()},n.prototype.resetColumnState=function(){this.columnModel.resetColumnState("api")},n.prototype.getColumnGroupState=function(){return this.columnModel.getColumnGroupState()},n.prototype.setColumnGroupState=function(t){this.columnModel.setColumnGroupState(t,"api")},n.prototype.resetColumnGroupState=function(){this.columnModel.resetColumnGroupState("api")},n.prototype.isPinning=function(){return this.columnModel.isPinningLeft()||this.columnModel.isPinningRight()},n.prototype.isPinningLeft=function(){return this.columnModel.isPinningLeft()},n.prototype.isPinningRight=function(){return this.columnModel.isPinningRight()},n.prototype.getDisplayedColAfter=function(t){return this.columnModel.getDisplayedColAfter(t)},n.prototype.getDisplayedColBefore=function(t){return this.columnModel.getDisplayedColBefore(t)},n.prototype.setColumnVisible=function(t,e){this.columnModel.setColumnVisible(t,e,"api")},n.prototype.setColumnsVisible=function(t,e){this.columnModel.setColumnsVisible(t,e,"api")},n.prototype.setColumnPinned=function(t,e){this.columnModel.setColumnPinned(t,e,"api")},n.prototype.setColumnsPinned=function(t,e){this.columnModel.setColumnsPinned(t,e,"api")},n.prototype.getAllGridColumns=function(){return this.columnModel.getAllGridColumns()},n.prototype.getDisplayedLeftColumns=function(){return this.columnModel.getDisplayedLeftColumns()},n.prototype.getDisplayedCenterColumns=function(){return this.columnModel.getDisplayedCenterColumns()},n.prototype.getDisplayedRightColumns=function(){return this.columnModel.getDisplayedRightColumns()},n.prototype.getAllDisplayedColumns=function(){return this.columnModel.getAllDisplayedColumns()},n.prototype.getAllDisplayedVirtualColumns=function(){return this.columnModel.getViewportColumns()},n.prototype.moveColumn=function(t,e){this.columnModel.moveColumn(t,e,"api")},n.prototype.moveColumnByIndex=function(t,e){this.columnModel.moveColumnByIndex(t,e,"api")},n.prototype.moveColumns=function(t,e){this.columnModel.moveColumns(t,e,"api")},n.prototype.moveRowGroupColumn=function(t,e){this.columnModel.moveRowGroupColumn(t,e)},n.prototype.setColumnAggFunc=function(t,e){this.columnModel.setColumnAggFunc(t,e)},n.prototype.setColumnWidth=function(t,e,r,i){r===void 0&&(r=!0),this.columnModel.setColumnWidths([{key:t,newWidth:e}],!1,r,i)},n.prototype.setColumnWidths=function(t,e,r){e===void 0&&(e=!0),this.columnModel.setColumnWidths(t,!1,e,r)},n.prototype.isPivotMode=function(){return this.columnModel.isPivotMode()},n.prototype.getPivotResultColumn=function(t,e){return this.columnModel.getSecondaryPivotColumn(t,e)},n.prototype.setValueColumns=function(t){this.columnModel.setValueColumns(t,"api")},n.prototype.getValueColumns=function(){return this.columnModel.getValueColumns()},n.prototype.removeValueColumn=function(t){this.columnModel.removeValueColumn(t,"api")},n.prototype.removeValueColumns=function(t){this.columnModel.removeValueColumns(t,"api")},n.prototype.addValueColumn=function(t){this.columnModel.addValueColumn(t,"api")},n.prototype.addValueColumns=function(t){this.columnModel.addValueColumns(t,"api")},n.prototype.setRowGroupColumns=function(t){this.columnModel.setRowGroupColumns(t,"api")},n.prototype.removeRowGroupColumn=function(t){this.columnModel.removeRowGroupColumn(t,"api")},n.prototype.removeRowGroupColumns=function(t){this.columnModel.removeRowGroupColumns(t,"api")},n.prototype.addRowGroupColumn=function(t){this.columnModel.addRowGroupColumn(t,"api")},n.prototype.addRowGroupColumns=function(t){this.columnModel.addRowGroupColumns(t,"api")},n.prototype.getRowGroupColumns=function(){return this.columnModel.getRowGroupColumns()},n.prototype.setPivotColumns=function(t){this.columnModel.setPivotColumns(t,"api")},n.prototype.removePivotColumn=function(t){this.columnModel.removePivotColumn(t,"api")},n.prototype.removePivotColumns=function(t){this.columnModel.removePivotColumns(t,"api")},n.prototype.addPivotColumn=function(t){this.columnModel.addPivotColumn(t,"api")},n.prototype.addPivotColumns=function(t){this.columnModel.addPivotColumns(t,"api")},n.prototype.getPivotColumns=function(){return this.columnModel.getPivotColumns()},n.prototype.getLeftDisplayedColumnGroups=function(){return this.columnModel.getDisplayedTreeLeft()},n.prototype.getCenterDisplayedColumnGroups=function(){return this.columnModel.getDisplayedTreeCentre()},n.prototype.getRightDisplayedColumnGroups=function(){return this.columnModel.getDisplayedTreeRight()},n.prototype.getAllDisplayedColumnGroups=function(){return this.columnModel.getAllDisplayedTrees()},n.prototype.autoSizeColumn=function(t,e){return this.columnModel.autoSizeColumn(t,e,"api")},n.prototype.autoSizeColumns=function(t,e){this.columnModel.autoSizeColumns({columns:t,skipHeader:e})},n.prototype.autoSizeAllColumns=function(t){this.columnModel.autoSizeAllColumns(t,"api")},n.prototype.setPivotResultColumns=function(t){this.columnModel.setSecondaryColumns(t,"api")},n.prototype.getPivotResultColumns=function(){return this.columnModel.getSecondaryColumns()},n.prototype.getState=function(){return this.stateService.getState()},n.prototype.getGridOption=function(t){return this.gos.get(t)},n.prototype.setGridOption=function(t,e){var r;this.updateGridOptions((r={},r[t]=e,r))},n.prototype.updateGridOptions=function(t){this.gos.updateGridOptions({options:t})},n.prototype.__internalUpdateGridOptions=function(t){this.gos.updateGridOptions({options:t,source:"gridOptionsUpdated"})},n.prototype.deprecatedUpdateGridOption=function(t,e){B("set".concat(t.charAt(0).toUpperCase()).concat(t.slice(1,t.length)," is deprecated. Please use 'api.setGridOption('").concat(t,"', newValue)' or 'api.updateGridOptions({ ").concat(t,": newValue })' instead.")),this.setGridOption(t,e)},n.prototype.setPivotMode=function(t){this.deprecatedUpdateGridOption("pivotMode",t)},n.prototype.setPinnedTopRowData=function(t){this.deprecatedUpdateGridOption("pinnedTopRowData",t)},n.prototype.setPinnedBottomRowData=function(t){this.deprecatedUpdateGridOption("pinnedBottomRowData",t)},n.prototype.setPopupParent=function(t){this.deprecatedUpdateGridOption("popupParent",t)},n.prototype.setSuppressModelUpdateAfterUpdateTransaction=function(t){this.deprecatedUpdateGridOption("suppressModelUpdateAfterUpdateTransaction",t)},n.prototype.setDataTypeDefinitions=function(t){this.deprecatedUpdateGridOption("dataTypeDefinitions",t)},n.prototype.setPagination=function(t){this.deprecatedUpdateGridOption("pagination",t)},n.prototype.paginationSetPageSize=function(t){this.deprecatedUpdateGridOption("paginationPageSize",t)},n.prototype.setSideBar=function(t){this.deprecatedUpdateGridOption("sideBar",t)},n.prototype.setSuppressClipboardPaste=function(t){this.deprecatedUpdateGridOption("suppressClipboardPaste",t)},n.prototype.setGroupRemoveSingleChildren=function(t){this.deprecatedUpdateGridOption("groupRemoveSingleChildren",t)},n.prototype.setGroupRemoveLowestSingleChildren=function(t){this.deprecatedUpdateGridOption("groupRemoveLowestSingleChildren",t)},n.prototype.setGroupDisplayType=function(t){this.deprecatedUpdateGridOption("groupDisplayType",t)},n.prototype.setGroupIncludeFooter=function(t){this.deprecatedUpdateGridOption("groupIncludeFooter",t)},n.prototype.setGroupIncludeTotalFooter=function(t){this.deprecatedUpdateGridOption("groupIncludeTotalFooter",t)},n.prototype.setRowClass=function(t){this.deprecatedUpdateGridOption("rowClass",t)},n.prototype.setDeltaSort=function(t){this.deprecatedUpdateGridOption("deltaSort",t)},n.prototype.setSuppressRowDrag=function(t){this.deprecatedUpdateGridOption("suppressRowDrag",t)},n.prototype.setSuppressMoveWhenRowDragging=function(t){this.deprecatedUpdateGridOption("suppressMoveWhenRowDragging",t)},n.prototype.setSuppressRowClickSelection=function(t){this.deprecatedUpdateGridOption("suppressRowClickSelection",t)},n.prototype.setEnableAdvancedFilter=function(t){this.deprecatedUpdateGridOption("enableAdvancedFilter",t)},n.prototype.setIncludeHiddenColumnsInAdvancedFilter=function(t){this.deprecatedUpdateGridOption("includeHiddenColumnsInAdvancedFilter",t)},n.prototype.setAdvancedFilterParent=function(t){this.deprecatedUpdateGridOption("advancedFilterParent",t)},n.prototype.setAdvancedFilterBuilderParams=function(t){this.deprecatedUpdateGridOption("advancedFilterBuilderParams",t)},n.prototype.setQuickFilter=function(t){B("setQuickFilter is deprecated. Please use 'api.setGridOption('quickFilterText', newValue)' or 'api.updateGridOptions({ quickFilterText: newValue })' instead."),this.gos.updateGridOptions({options:{quickFilterText:t}})},n.prototype.setExcludeHiddenColumnsFromQuickFilter=function(t){this.deprecatedUpdateGridOption("includeHiddenColumnsInQuickFilter",!t)},n.prototype.setIncludeHiddenColumnsInQuickFilter=function(t){this.deprecatedUpdateGridOption("includeHiddenColumnsInQuickFilter",t)},n.prototype.setQuickFilterParser=function(t){this.deprecatedUpdateGridOption("quickFilterParser",t)},n.prototype.setQuickFilterMatcher=function(t){this.deprecatedUpdateGridOption("quickFilterMatcher",t)},n.prototype.setAlwaysShowHorizontalScroll=function(t){this.deprecatedUpdateGridOption("alwaysShowHorizontalScroll",t)},n.prototype.setAlwaysShowVerticalScroll=function(t){this.deprecatedUpdateGridOption("alwaysShowVerticalScroll",t)},n.prototype.setFunctionsReadOnly=function(t){this.deprecatedUpdateGridOption("functionsReadOnly",t)},n.prototype.setColumnDefs=function(t,e){e===void 0&&(e="api"),B("setColumnDefs is deprecated. Please use 'api.setGridOption('columnDefs', newValue)' or 'api.updateGridOptions({ columnDefs: newValue })' instead."),this.gos.updateGridOptions({options:{columnDefs:t},source:e})},n.prototype.setAutoGroupColumnDef=function(t,e){e===void 0&&(e="api"),B("setAutoGroupColumnDef is deprecated. Please use 'api.setGridOption('autoGroupColumnDef', newValue)' or 'api.updateGridOptions({ autoGroupColumnDef: newValue })' instead."),this.gos.updateGridOptions({options:{autoGroupColumnDef:t},source:e})},n.prototype.setDefaultColDef=function(t,e){e===void 0&&(e="api"),B("setDefaultColDef is deprecated. Please use 'api.setGridOption('defaultColDef', newValue)' or 'api.updateGridOptions({ defaultColDef: newValue })' instead."),this.gos.updateGridOptions({options:{defaultColDef:t},source:e})},n.prototype.setColumnTypes=function(t,e){e===void 0&&(e="api"),B("setColumnTypes is deprecated. Please use 'api.setGridOption('columnTypes', newValue)' or 'api.updateGridOptions({ columnTypes: newValue })' instead."),this.gos.updateGridOptions({options:{columnTypes:t},source:e})},n.prototype.setTreeData=function(t){this.deprecatedUpdateGridOption("treeData",t)},n.prototype.setServerSideDatasource=function(t){this.deprecatedUpdateGridOption("serverSideDatasource",t)},n.prototype.setCacheBlockSize=function(t){this.deprecatedUpdateGridOption("cacheBlockSize",t)},n.prototype.setDatasource=function(t){this.deprecatedUpdateGridOption("datasource",t)},n.prototype.setViewportDatasource=function(t){this.deprecatedUpdateGridOption("viewportDatasource",t)},n.prototype.setRowData=function(t){this.deprecatedUpdateGridOption("rowData",t)},n.prototype.setEnableCellTextSelection=function(t){this.deprecatedUpdateGridOption("enableCellTextSelection",t)},n.prototype.setHeaderHeight=function(t){this.deprecatedUpdateGridOption("headerHeight",t)},n.prototype.setDomLayout=function(t){this.deprecatedUpdateGridOption("domLayout",t)},n.prototype.setFillHandleDirection=function(t){this.deprecatedUpdateGridOption("fillHandleDirection",t)},n.prototype.setGroupHeaderHeight=function(t){this.deprecatedUpdateGridOption("groupHeaderHeight",t)},n.prototype.setFloatingFiltersHeight=function(t){this.deprecatedUpdateGridOption("floatingFiltersHeight",t)},n.prototype.setPivotHeaderHeight=function(t){this.deprecatedUpdateGridOption("pivotHeaderHeight",t)},n.prototype.setPivotGroupHeaderHeight=function(t){this.deprecatedUpdateGridOption("pivotGroupHeaderHeight",t)},n.prototype.setAnimateRows=function(t){this.deprecatedUpdateGridOption("animateRows",t)},n.prototype.setIsExternalFilterPresent=function(t){this.deprecatedUpdateGridOption("isExternalFilterPresent",t)},n.prototype.setDoesExternalFilterPass=function(t){this.deprecatedUpdateGridOption("doesExternalFilterPass",t)},n.prototype.setNavigateToNextCell=function(t){this.deprecatedUpdateGridOption("navigateToNextCell",t)},n.prototype.setTabToNextCell=function(t){this.deprecatedUpdateGridOption("tabToNextCell",t)},n.prototype.setTabToNextHeader=function(t){this.deprecatedUpdateGridOption("tabToNextHeader",t)},n.prototype.setNavigateToNextHeader=function(t){this.deprecatedUpdateGridOption("navigateToNextHeader",t)},n.prototype.setRowGroupPanelShow=function(t){this.deprecatedUpdateGridOption("rowGroupPanelShow",t)},n.prototype.setGetGroupRowAgg=function(t){this.deprecatedUpdateGridOption("getGroupRowAgg",t)},n.prototype.setGetBusinessKeyForNode=function(t){this.deprecatedUpdateGridOption("getBusinessKeyForNode",t)},n.prototype.setGetChildCount=function(t){this.deprecatedUpdateGridOption("getChildCount",t)},n.prototype.setProcessRowPostCreate=function(t){this.deprecatedUpdateGridOption("processRowPostCreate",t)},n.prototype.setGetRowId=function(t){B("getRowId is a static property and can no longer be updated.")},n.prototype.setGetRowClass=function(t){this.deprecatedUpdateGridOption("getRowClass",t)},n.prototype.setIsFullWidthRow=function(t){this.deprecatedUpdateGridOption("isFullWidthRow",t)},n.prototype.setIsRowSelectable=function(t){this.deprecatedUpdateGridOption("isRowSelectable",t)},n.prototype.setIsRowMaster=function(t){this.deprecatedUpdateGridOption("isRowMaster",t)},n.prototype.setPostSortRows=function(t){this.deprecatedUpdateGridOption("postSortRows",t)},n.prototype.setGetDocument=function(t){this.deprecatedUpdateGridOption("getDocument",t)},n.prototype.setGetContextMenuItems=function(t){this.deprecatedUpdateGridOption("getContextMenuItems",t)},n.prototype.setGetMainMenuItems=function(t){this.deprecatedUpdateGridOption("getMainMenuItems",t)},n.prototype.setProcessCellForClipboard=function(t){this.deprecatedUpdateGridOption("processCellForClipboard",t)},n.prototype.setSendToClipboard=function(t){this.deprecatedUpdateGridOption("sendToClipboard",t)},n.prototype.setProcessCellFromClipboard=function(t){this.deprecatedUpdateGridOption("processCellFromClipboard",t)},n.prototype.setProcessPivotResultColDef=function(t){this.deprecatedUpdateGridOption("processPivotResultColDef",t)},n.prototype.setProcessPivotResultColGroupDef=function(t){this.deprecatedUpdateGridOption("processPivotResultColGroupDef",t)},n.prototype.setPostProcessPopup=function(t){this.deprecatedUpdateGridOption("postProcessPopup",t)},n.prototype.setInitialGroupOrderComparator=function(t){this.deprecatedUpdateGridOption("initialGroupOrderComparator",t)},n.prototype.setGetChartToolbarItems=function(t){this.deprecatedUpdateGridOption("getChartToolbarItems",t)},n.prototype.setPaginationNumberFormatter=function(t){this.deprecatedUpdateGridOption("paginationNumberFormatter",t)},n.prototype.setGetServerSideGroupLevelParams=function(t){this.deprecatedUpdateGridOption("getServerSideGroupLevelParams",t)},n.prototype.setIsServerSideGroupOpenByDefault=function(t){this.deprecatedUpdateGridOption("isServerSideGroupOpenByDefault",t)},n.prototype.setIsApplyServerSideTransaction=function(t){this.deprecatedUpdateGridOption("isApplyServerSideTransaction",t)},n.prototype.setIsServerSideGroup=function(t){this.deprecatedUpdateGridOption("isServerSideGroup",t)},n.prototype.setGetServerSideGroupKey=function(t){this.deprecatedUpdateGridOption("getServerSideGroupKey",t)},n.prototype.setGetRowStyle=function(t){this.deprecatedUpdateGridOption("getRowStyle",t)},n.prototype.setGetRowHeight=function(t){this.deprecatedUpdateGridOption("getRowHeight",t)},$([Y("csvCreator")],n.prototype,"csvCreator",void 0),$([Y("excelCreator")],n.prototype,"excelCreator",void 0),$([f("rowRenderer")],n.prototype,"rowRenderer",void 0),$([f("navigationService")],n.prototype,"navigationService",void 0),$([f("filterManager")],n.prototype,"filterManager",void 0),$([f("columnModel")],n.prototype,"columnModel",void 0),$([f("selectionService")],n.prototype,"selectionService",void 0),$([f("gridOptionsService")],n.prototype,"gos",void 0),$([f("valueService")],n.prototype,"valueService",void 0),$([f("alignedGridsService")],n.prototype,"alignedGridsService",void 0),$([f("eventService")],n.prototype,"eventService",void 0),$([f("pinnedRowModel")],n.prototype,"pinnedRowModel",void 0),$([f("context")],n.prototype,"context",void 0),$([f("rowModel")],n.prototype,"rowModel",void 0),$([f("sortController")],n.prototype,"sortController",void 0),$([f("paginationProxy")],n.prototype,"paginationProxy",void 0),$([f("focusService")],n.prototype,"focusService",void 0),$([f("dragAndDropService")],n.prototype,"dragAndDropService",void 0),$([Y("rangeService")],n.prototype,"rangeService",void 0),$([Y("clipboardService")],n.prototype,"clipboardService",void 0),$([Y("aggFuncService")],n.prototype,"aggFuncService",void 0),$([f("menuFactory")],n.prototype,"menuFactory",void 0),$([Y("contextMenuFactory")],n.prototype,"contextMenuFactory",void 0),$([f("valueCache")],n.prototype,"valueCache",void 0),$([f("animationFrameService")],n.prototype,"animationFrameService",void 0),$([Y("statusBarService")],n.prototype,"statusBarService",void 0),$([Y("chartService")],n.prototype,"chartService",void 0),$([Y("undoRedoService")],n.prototype,"undoRedoService",void 0),$([Y("rowNodeBlockLoader")],n.prototype,"rowNodeBlockLoader",void 0),$([Y("ssrmTransactionManager")],n.prototype,"serverSideTransactionManager",void 0),$([f("ctrlsService")],n.prototype,"ctrlsService",void 0),$([f("overlayService")],n.prototype,"overlayService",void 0),$([Y("sideBarService")],n.prototype,"sideBarService",void 0),$([f("stateService")],n.prototype,"stateService",void 0),$([f("expansionService")],n.prototype,"expansionService",void 0),$([f("apiEventService")],n.prototype,"apiEventService",void 0),$([f("frameworkOverrides")],n.prototype,"frameworkOverrides",void 0),$([b],n.prototype,"init",null),n=$([I("gridApi")],n),n}(),gf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),ii=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},iu=function(n){gf(t,n);function t(){var r=n!==null&&n.apply(this,arguments)||this;return r.quickFilter=null,r.quickFilterParts=null,r}e=t,t.prototype.postConstruct=function(){var r=this;this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,function(){return r.resetQuickFilterCache()}),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,function(){return r.resetQuickFilterCache()}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,function(){return r.resetQuickFilterCache()}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VISIBLE,function(){r.gridOptionsService.get("includeHiddenColumnsInQuickFilter")||r.resetQuickFilterCache()}),this.addManagedPropertyListener("quickFilterText",function(i){return r.setQuickFilter(i.currentValue)}),this.addManagedPropertyListener("includeHiddenColumnsInQuickFilter",function(){return r.onIncludeHiddenColumnsInQuickFilterChanged()}),this.quickFilter=this.parseQuickFilter(this.gridOptionsService.get("quickFilterText")),this.parser=this.gridOptionsService.get("quickFilterParser"),this.matcher=this.gridOptionsService.get("quickFilterMatcher"),this.setQuickFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],function(){return r.setQuickFilterParserAndMatcher()})},t.prototype.isQuickFilterPresent=function(){return this.quickFilter!==null},t.prototype.doesRowPassQuickFilter=function(r){var i=this,o=this.gridOptionsService.get("cacheQuickFilter");return this.matcher?this.doesRowPassQuickFilterMatcher(o,r):this.quickFilterParts.every(function(s){return o?i.doesRowPassQuickFilterCache(r,s):i.doesRowPassQuickFilterNoCache(r,s)})},t.prototype.resetQuickFilterCache=function(){this.rowModel.forEachNode(function(r){return r.quickFilterAggregateText=null})},t.prototype.setQuickFilterParts=function(){var r=this,i=r.quickFilter,o=r.parser;i?this.quickFilterParts=o?o(i):i.split(" "):this.quickFilterParts=null},t.prototype.parseQuickFilter=function(r){return P(r)?this.gridOptionsService.isRowModelType("clientSide")?r.toUpperCase():(console.warn("AG Grid - Quick filtering only works with the Client-Side Row Model"),null):null},t.prototype.setQuickFilter=function(r){if(r!=null&&typeof r!="string"){console.warn("AG Grid - Grid option quickFilterText only supports string inputs, received: ".concat(typeof r));return}var i=this.parseQuickFilter(r);this.quickFilter!==i&&(this.quickFilter=i,this.setQuickFilterParts(),this.dispatchEvent({type:e.EVENT_QUICK_FILTER_CHANGED}))},t.prototype.setQuickFilterParserAndMatcher=function(){var r=this.gridOptionsService.get("quickFilterParser"),i=this.gridOptionsService.get("quickFilterMatcher"),o=r!==this.parser||i!==this.matcher;this.parser=r,this.matcher=i,o&&(this.setQuickFilterParts(),this.dispatchEvent({type:e.EVENT_QUICK_FILTER_CHANGED}))},t.prototype.onIncludeHiddenColumnsInQuickFilterChanged=function(){this.columnModel.refreshQuickFilterColumns(),this.resetQuickFilterCache(),this.isQuickFilterPresent()&&this.dispatchEvent({type:e.EVENT_QUICK_FILTER_CHANGED})},t.prototype.doesRowPassQuickFilterNoCache=function(r,i){var o=this,s=this.columnModel.getAllColumnsForQuickFilter();return s.some(function(a){var l=o.getQuickFilterTextForColumn(a,r);return P(l)&&l.indexOf(i)>=0})},t.prototype.doesRowPassQuickFilterCache=function(r,i){return this.checkGenerateQuickFilterAggregateText(r),r.quickFilterAggregateText.indexOf(i)>=0},t.prototype.doesRowPassQuickFilterMatcher=function(r,i){var o;r?(this.checkGenerateQuickFilterAggregateText(i),o=i.quickFilterAggregateText):o=this.getQuickFilterAggregateText(i);var s=this,a=s.quickFilterParts,l=s.matcher;return l(a,o)},t.prototype.checkGenerateQuickFilterAggregateText=function(r){r.quickFilterAggregateText||(r.quickFilterAggregateText=this.getQuickFilterAggregateText(r))},t.prototype.getQuickFilterTextForColumn=function(r,i){var o=this.valueService.getValue(r,i,!0),s=r.getColDef();if(s.getQuickFilterText){var a={value:o,node:i,data:i.data,column:r,colDef:s,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};o=s.getQuickFilterText(a)}return P(o)?o.toString().toUpperCase():null},t.prototype.getQuickFilterAggregateText=function(r){var i=this,o=[],s=this.columnModel.getAllColumnsForQuickFilter();return s.forEach(function(a){var l=i.getQuickFilterTextForColumn(a,r);P(l)&&o.push(l)}),o.join(e.QUICK_FILTER_SEPARATOR)};var e;return t.EVENT_QUICK_FILTER_CHANGED="quickFilterChanged",t.QUICK_FILTER_SEPARATOR=`
|
||
`,ii([f("valueService")],t.prototype,"valueService",void 0),ii([f("columnModel")],t.prototype,"columnModel",void 0),ii([f("rowModel")],t.prototype,"rowModel",void 0),ii([b],t.prototype,"postConstruct",null),t=e=ii([I("quickFilterService")],t),t}(D),yf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),pr=function(){return pr=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},pr.apply(this,arguments)},yt=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Cf=function(n){yf(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.allColumnFilters=new Map,e.allColumnListeners=new Map,e.activeAggregateFilters=[],e.activeColumnFilters=[],e.processingFilterChange=!1,e.filterModelUpdateQueue=[],e.advancedFilterModelUpdateQueue=[],e}return t.prototype.init=function(){var e=this;this.addManagedListener(this.eventService,g.EVENT_GRID_COLUMNS_CHANGED,function(){return e.onColumnsChanged()}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VALUE_CHANGED,function(){return e.refreshFiltersForAggregations()}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_CHANGED,function(){return e.refreshFiltersForAggregations()}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,function(){return e.refreshFiltersForAggregations()}),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,function(){return e.updateAdvancedFilterColumns()}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VISIBLE,function(){return e.updateAdvancedFilterColumns()}),this.addManagedListener(this.eventService,g.EVENT_ROW_DATA_UPDATED,function(){return e.onNewRowsLoaded("rowDataUpdated")}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],function(){e.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",function(){e.updateAggFiltering(),e.onFilterChanged()}),this.addManagedPropertyListener("advancedFilterModel",function(r){return e.setAdvancedFilterModel(r.currentValue)}),this.addManagedListener(this.eventService,g.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,function(r){var i=r.enabled;return e.onAdvancedFilterEnabledChanged(i)}),this.addManagedListener(this.eventService,g.EVENT_DATA_TYPES_INFERRED,function(){return e.processFilterModelUpdateQueue()}),this.addManagedListener(this.quickFilterService,iu.EVENT_QUICK_FILTER_CHANGED,function(){return e.onFilterChanged({source:"quickFilter"})})},t.prototype.isExternalFilterPresentCallback=function(){var e=this.gridOptionsService.getCallback("isExternalFilterPresent");return typeof e=="function"?e({}):!1},t.prototype.doesExternalFilterPass=function(e){var r=this.gridOptionsService.get("doesExternalFilterPass");return typeof r=="function"?r(e):!1},t.prototype.setFilterModel=function(e,r){var i=this;if(r===void 0&&(r="api"),this.isAdvancedFilterEnabled()){this.warnAdvancedFilters();return}if(this.dataTypeService.isPendingInference()){this.filterModelUpdateQueue.push({model:e,source:r});return}var o=[],s=this.getFilterModel();if(e){var a=zn(Object.keys(e));this.allColumnFilters.forEach(function(l,u){var c=e[u];o.push(i.setModelOnFilterWrapper(l.filterPromise,c)),a.delete(u)}),a.forEach(function(l){var u=i.columnModel.getPrimaryColumn(l)||i.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=i.getOrCreateFilterWrapper(u,"NO_UI");if(!c){console.warn("AG-Grid: setFilterModel() - unable to fully apply model, unable to create filter for colId: "+l);return}o.push(i.setModelOnFilterWrapper(c.filterPromise,e[l]))})}else this.allColumnFilters.forEach(function(l){o.push(i.setModelOnFilterWrapper(l.filterPromise,null))});vt.all(o).then(function(){var l=i.getFilterModel(),u=[];i.allColumnFilters.forEach(function(c,p){var d=s?s[p]:null,h=l?l[p]:null;z.jsonEquals(d,h)||u.push(c.column)}),u.length>0&&i.onFilterChanged({columns:u,source:r})})},t.prototype.setModelOnFilterWrapper=function(e,r){return new vt(function(i){e.then(function(o){typeof o.setModel!="function"&&(console.warn("AG Grid: filter missing setModel method, which is needed for setFilterModel"),i()),(o.setModel(r)||vt.resolve()).then(function(){return i()})})})},t.prototype.getFilterModel=function(){var e={};return this.allColumnFilters.forEach(function(r,i){var o=r.filterPromise,s=o.resolveNow(null,function(l){return l});if(s==null)return null;if(typeof s.getModel!="function"){console.warn("AG Grid: filter API missing getModel method, which is needed for getFilterModel");return}var a=s.getModel();P(a)&&(e[i]=a)}),e},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.isChildFilterPresent=function(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()},t.prototype.isAdvancedFilterPresent=function(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isFilterPresent()},t.prototype.onAdvancedFilterEnabledChanged=function(e){var r=this,i;e?this.allColumnFilters.size&&(this.allColumnFilters.forEach(function(o){return r.disposeFilterWrapper(o,"advancedFilterEnabled")}),this.onFilterChanged({source:"advancedFilter"})):!((i=this.advancedFilterService)===null||i===void 0)&&i.isFilterPresent()&&(this.advancedFilterService.setModel(null),this.onFilterChanged({source:"advancedFilter"}))},t.prototype.isAdvancedFilterEnabled=function(){var e;return(e=this.advancedFilterService)===null||e===void 0?void 0:e.isEnabled()},t.prototype.isAdvancedFilterHeaderActive=function(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isHeaderActive()},t.prototype.doAggregateFiltersPass=function(e,r){return this.doColumnFiltersPass(e,r,!0)},t.prototype.updateActiveFilters=function(){var e=this;this.activeColumnFilters.length=0,this.activeAggregateFilters.length=0;var r=function(s){return s?s.isFilterActive?s.isFilterActive():(console.warn("AG Grid: Filter is missing isFilterActive() method"),!1):!1},i=!!this.gridOptionsService.getGroupAggFiltering(),o=function(s){var a=!s.isPrimary();if(a)return!0;var l=!e.columnModel.isPivotActive(),u=s.isValueActive();return!u||!l?!1:e.columnModel.isPivotMode()?!0:i};this.allColumnFilters.forEach(function(s){if(s.filterPromise.resolveNow(!1,r)){var a=s.filterPromise.resolveNow(null,function(l){return l});o(s.column)?e.activeAggregateFilters.push(a):e.activeColumnFilters.push(a)}})},t.prototype.updateFilterFlagInColumns=function(e,r){this.allColumnFilters.forEach(function(i){var o=i.filterPromise.resolveNow(!1,function(s){return s.isFilterActive()});i.column.setFilterActive(o,e,r)})},t.prototype.isAnyFilterPresent=function(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()},t.prototype.doColumnFiltersPass=function(e,r,i){for(var o=e.data,s=e.aggData,a=i?this.activeAggregateFilters:this.activeColumnFilters,l=i?s:o,u=0;u<a.length;u++){var c=a[u];if(!(c==null||c===r)){if(typeof c.doesFilterPass!="function")throw new Error("Filter is missing method doesFilterPass");if(!c.doesFilterPass({node:e,data:l}))return!1}}return!0},t.prototype.resetQuickFilterCache=function(){this.quickFilterService.resetQuickFilterCache()},t.prototype.refreshFiltersForAggregations=function(){var e=this.gridOptionsService.getGroupAggFiltering();e&&this.onFilterChanged()},t.prototype.callOnFilterChangedOutsideRenderCycle=function(e){var r=this,i=function(){return r.onFilterChanged(e)};this.rowRenderer.isRefreshInProgress()?setTimeout(i,0):i()},t.prototype.onFilterChanged=function(e){e===void 0&&(e={});var r=e.source,i=e.filterInstance,o=e.additionalEventAttributes,s=e.columns;this.updateDependantFilters(),this.updateActiveFilters(),this.updateFilterFlagInColumns("filterChanged",o),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.allColumnFilters.forEach(function(l){l.filterPromise&&l.filterPromise.then(function(u){u&&u!==i&&u.onAnyFilterChanged&&u.onAnyFilterChanged()})});var a={source:r,type:g.EVENT_FILTER_CHANGED,columns:s||[]};o&&Ge(a,o),this.processingFilterChange=!0,this.eventService.dispatchEvent(a),this.processingFilterChange=!1},t.prototype.isSuppressFlashingCellsBecauseFiltering=function(){var e,r=(e=this.gridOptionsService.get("allowShowChangeAfterFilter"))!==null&&e!==void 0?e:!1;return!r&&this.processingFilterChange},t.prototype.isQuickFilterPresent=function(){return this.quickFilterService.isQuickFilterPresent()},t.prototype.updateAggFiltering=function(){this.aggFiltering=!!this.gridOptionsService.getGroupAggFiltering()},t.prototype.isAggregateQuickFilterPresent=function(){return this.isQuickFilterPresent()&&(this.aggFiltering||this.columnModel.isPivotMode())},t.prototype.isNonAggregateQuickFilterPresent=function(){return this.isQuickFilterPresent()&&!(this.aggFiltering||this.columnModel.isPivotMode())},t.prototype.doesRowPassOtherFilters=function(e,r){return this.doesRowPassFilter({rowNode:r,filterInstanceToSkip:e})},t.prototype.doesRowPassAggregateFilters=function(e){return!(this.isAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode)||this.isAggregateFilterPresent()&&!this.doAggregateFiltersPass(e.rowNode,e.filterInstanceToSkip))},t.prototype.doesRowPassFilter=function(e){return!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode)||this.isExternalFilterPresent()&&!this.doesExternalFilterPass(e.rowNode)||this.isColumnFilterPresent()&&!this.doColumnFiltersPass(e.rowNode,e.filterInstanceToSkip)||this.isAdvancedFilterPresent()&&!this.advancedFilterService.doesFilterPass(e.rowNode))},t.prototype.onNewRowsLoaded=function(e){this.allColumnFilters.forEach(function(r){r.filterPromise.then(function(i){i.onNewRowsLoaded&&i.onNewRowsLoaded()})}),this.updateFilterFlagInColumns(e,{afterDataChange:!0}),this.updateActiveFilters()},t.prototype.createValueGetter=function(e){var r=this;return function(i){var o=i.node;return r.valueService.getValue(e,o,!0)}},t.prototype.createGetValue=function(e){var r=this;return function(i,o){var s=o?r.columnModel.getGridColumn(o):e;return s?r.valueService.getValue(s,i,!0):void 0}},t.prototype.getFilterComponent=function(e,r,i){var o;if(i===void 0&&(i=!0),i)return((o=this.getOrCreateFilterWrapper(e,r))===null||o===void 0?void 0:o.filterPromise)||null;var s=this.cachedFilter(e);return s?s.filterPromise:null},t.prototype.isFilterActive=function(e){var r=this.cachedFilter(e);return!!r&&r.filterPromise.resolveNow(!1,function(i){return i.isFilterActive()})},t.prototype.getOrCreateFilterWrapper=function(e,r){if(!e.isFilterAllowed())return null;var i=this.cachedFilter(e);return i?r!=="NO_UI"&&this.putIntoGui(i,r):(i=this.createFilterWrapper(e,r),this.setColumnFilterWrapper(e,i)),i},t.prototype.cachedFilter=function(e){return this.allColumnFilters.get(e.getColId())},t.prototype.getDefaultFilter=function(e){var r;if(k.__isRegistered(M.SetFilterModule,this.context.getGridId()))r="agSetColumnFilter";else{var i=e.getColDef().cellDataType;i==="number"?r="agNumberColumnFilter":i==="date"||i==="dateString"?r="agDateColumnFilter":r="agTextColumnFilter"}return r},t.prototype.getDefaultFloatingFilter=function(e){var r;if(k.__isRegistered(M.SetFilterModule,this.context.getGridId()))r="agSetColumnFloatingFilter";else{var i=e.getColDef().cellDataType;i==="number"?r="agNumberColumnFloatingFilter":i==="date"||i==="dateString"?r="agDateColumnFloatingFilter":r="agTextColumnFloatingFilter"}return r},t.prototype.createFilterInstance=function(e){var r=this,i=this.getDefaultFilter(e),o=e.getColDef(),s,a=pr(pr({},this.createFilterParams(e,o)),{filterModifiedCallback:function(){return r.filterModifiedCallbackFactory(s,e)()},filterChangedCallback:function(u){return r.filterChangedCallbackFactory(s,e)(u)},doesRowPassOtherFilter:function(u){return r.doesRowPassOtherFilters(s,u)}}),l=this.userComponentFactory.getFilterDetails(o,a,i);return l?{filterPromise:function(){var u=l.newAgStackInstance();return u&&u.then(function(c){return s=c}),u},compDetails:l}:{filterPromise:null,compDetails:null}},t.prototype.createFilterParams=function(e,r){var i={column:e,colDef:qo(r),rowModel:this.rowModel,filterChangedCallback:function(){},filterModifiedCallback:function(){},valueGetter:this.createValueGetter(e),getValue:this.createGetValue(e),doesRowPassOtherFilter:function(){return!0},api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};return i},t.prototype.createFilterWrapper=function(e,r){var i,o={column:e,filterPromise:null,compiledElement:null,guiPromise:vt.resolve(null),compDetails:null},s=this.createFilterInstance(e),a=s.filterPromise,l=s.compDetails;return o.filterPromise=(i=a==null?void 0:a())!==null&&i!==void 0?i:null,o.compDetails=l,a&&this.putIntoGui(o,r),o},t.prototype.putIntoGui=function(e,r){var i=this,o=document.createElement("div");o.className="ag-filter",e.guiPromise=new vt(function(s){e.filterPromise.then(function(a){var l=a.getGui();P(l)||console.warn("AG Grid: getGui method from filter returned ".concat(l,", it should be a DOM element or an HTML template string.")),typeof l=="string"&&(l=ge(l)),o.appendChild(l),s(o);var u={type:g.EVENT_FILTER_OPENED,column:e.column,source:r,eGui:o};i.eventService.dispatchEvent(u)})})},t.prototype.onColumnsChanged=function(){var e=this,r=[];this.allColumnFilters.forEach(function(i,o){var s;i.column.isPrimary()?s=e.columnModel.getPrimaryColumn(o):s=e.columnModel.getGridColumn(o),!s&&(r.push(i.column),e.disposeFilterWrapper(i,"columnChanged"),e.disposeColumnListener(o))}),r.length>0?this.onFilterChanged({columns:r,source:"api"}):this.updateDependantFilters()},t.prototype.updateDependantFilters=function(){var e=this,r=this.columnModel.getGroupAutoColumns();r==null||r.forEach(function(i){i.getColDef().filter==="agGroupColumnFilter"&&e.getOrCreateFilterWrapper(i,"NO_UI")})},t.prototype.isFilterAllowed=function(e){var r,i;if(this.isAdvancedFilterEnabled())return!1;var o=e.isFilterAllowed();if(!o)return!1;var s=this.allColumnFilters.get(e.getColId());return(i=(r=s==null?void 0:s.filterPromise)===null||r===void 0?void 0:r.resolveNow(!0,function(a){return typeof(a==null?void 0:a.isFilterAllowed)=="function"?a==null?void 0:a.isFilterAllowed():!0}))!==null&&i!==void 0?i:!0},t.prototype.getFloatingFilterCompDetails=function(e,r){var i=this,o=e.getColDef(),s=this.createFilterParams(e,o),a=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(o,cs,s),l=this.userComponentFactory.getDefaultFloatingFilterType(o,function(){return i.getDefaultFloatingFilter(e)});l==null&&(l="agReadOnlyFloatingFilter");var u=function(p){var d=i.getFilterComponent(e,"NO_UI");d!=null&&d.then(function(h){p(cr(h))})},c={column:e,filterParams:a,currentParentModel:function(){return i.getCurrentFloatingFilterParentModel(e)},parentFilterInstance:u,showParentFilter:r,suppressFilterButton:!1};return this.userComponentFactory.getFloatingFilterCompDetails(o,c,l)},t.prototype.getCurrentFloatingFilterParentModel=function(e){var r=this.getFilterComponent(e,"NO_UI",!1);return r?r.resolveNow(null,function(i){return i&&i.getModel()}):null},t.prototype.destroyFilter=function(e,r){r===void 0&&(r="api");var i=e.getColId(),o=this.allColumnFilters.get(i);this.disposeColumnListener(i),o&&(this.disposeFilterWrapper(o,r),this.onFilterChanged({columns:[e],source:"api"}))},t.prototype.disposeColumnListener=function(e){var r=this.allColumnListeners.get(e);r&&(this.allColumnListeners.delete(e),r())},t.prototype.disposeFilterWrapper=function(e,r){var i=this;e.filterPromise.then(function(o){i.getContext().destroyBean(o),e.column.setFilterActive(!1,"filterDestroyed"),i.allColumnFilters.delete(e.column.getColId());var s={type:g.EVENT_FILTER_DESTROYED,source:r,column:e.column};i.eventService.dispatchEvent(s)})},t.prototype.filterModifiedCallbackFactory=function(e,r){var i=this;return function(){var o={type:g.EVENT_FILTER_MODIFIED,column:r,filterInstance:e};i.eventService.dispatchEvent(o)}},t.prototype.filterChangedCallbackFactory=function(e,r){var i=this;return function(o){var s,a=(s=o==null?void 0:o.source)!==null&&s!==void 0?s:"api",l={filter:e,additionalEventAttributes:o,columns:[r],source:a};i.callOnFilterChangedOutsideRenderCycle(l)}},t.prototype.checkDestroyFilter=function(e){var r=this,i=this.allColumnFilters.get(e);if(i){var o=i.column,s=(o.isFilterAllowed()?this.createFilterInstance(o):{compDetails:null}).compDetails;if(this.areFilterCompsDifferent(i.compDetails,s)){this.destroyFilter(o,"columnChanged");return}var a=o.getColDef().filterParams;if(!i.filterPromise){this.destroyFilter(o,"columnChanged");return}i.filterPromise.then(function(l){var u=l!=null&&l.refresh?l.refresh(pr(pr(pr({},r.createFilterParams(o,o.getColDef())),{filterModifiedCallback:r.filterModifiedCallbackFactory(l,o),filterChangedCallback:r.filterChangedCallbackFactory(l,o),doesRowPassOtherFilter:function(c){return r.doesRowPassOtherFilters(l,c)}}),a)):!0;u||r.destroyFilter(o,"columnChanged")})}},t.prototype.setColumnFilterWrapper=function(e,r){var i=this,o=e.getColId();this.allColumnFilters.set(o,r),this.allColumnListeners.set(o,this.addManagedListener(e,Z.EVENT_COL_DEF_CHANGED,function(){return i.checkDestroyFilter(o)}))},t.prototype.areFilterCompsDifferent=function(e,r){if(!r||!e)return!0;var i=e.componentClass,o=r.componentClass,s=i===o||(i==null?void 0:i.render)&&(o==null?void 0:o.render)&&i.render===o.render;return!s},t.prototype.getAdvancedFilterModel=function(){return this.isAdvancedFilterEnabled()?this.advancedFilterService.getModel():null},t.prototype.setAdvancedFilterModel=function(e){if(this.isAdvancedFilterEnabled()){if(this.dataTypeService.isPendingInference()){this.advancedFilterModelUpdateQueue.push(e);return}this.advancedFilterService.setModel(e??null),this.onFilterChanged({source:"advancedFilter"})}},t.prototype.showAdvancedFilterBuilder=function(e){this.isAdvancedFilterEnabled()&&this.advancedFilterService.getCtrl().toggleFilterBuilder(e,!0)},t.prototype.updateAdvancedFilterColumns=function(){this.isAdvancedFilterEnabled()&&this.advancedFilterService.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})},t.prototype.hasFloatingFilters=function(){if(this.isAdvancedFilterEnabled())return!1;var e=this.columnModel.getAllGridColumns();return e.some(function(r){return r.getColDef().floatingFilter})},t.prototype.getFilterInstance=function(e,r){if(this.isAdvancedFilterEnabled()){this.warnAdvancedFilters();return}var i=this.getFilterInstanceImpl(e,function(s){if(r){var a=cr(s);r(a)}}),o=cr(i);return o},t.prototype.getFilterInstanceImpl=function(e,r){var i=this.columnModel.getPrimaryColumn(e);if(i){var o=this.getFilterComponent(i,"NO_UI"),s=o&&o.resolveNow(null,function(a){return a});return s?setTimeout(r,0,s):o&&o.then(function(a){r(a)}),s}},t.prototype.warnAdvancedFilters=function(){B("Column Filter API methods have been disabled as Advanced Filters are enabled.")},t.prototype.setupAdvancedFilterHeaderComp=function(e){var r;(r=this.advancedFilterService)===null||r===void 0||r.getCtrl().setupHeaderComp(e)},t.prototype.getHeaderRowCount=function(){return this.isAdvancedFilterHeaderActive()?1:0},t.prototype.getHeaderHeight=function(){return this.isAdvancedFilterHeaderActive()?this.advancedFilterService.getCtrl().getHeaderHeight():0},t.prototype.processFilterModelUpdateQueue=function(){var e=this;this.filterModelUpdateQueue.forEach(function(r){var i=r.model,o=r.source;return e.setFilterModel(i,o)}),this.filterModelUpdateQueue=[],this.advancedFilterModelUpdateQueue.forEach(function(r){return e.setAdvancedFilterModel(r)}),this.advancedFilterModelUpdateQueue=[]},t.prototype.destroy=function(){var e=this;n.prototype.destroy.call(this),this.allColumnFilters.forEach(function(r){return e.disposeFilterWrapper(r,"gridDestroyed")}),this.allColumnListeners.clear()},yt([f("valueService")],t.prototype,"valueService",void 0),yt([f("columnModel")],t.prototype,"columnModel",void 0),yt([f("rowModel")],t.prototype,"rowModel",void 0),yt([f("userComponentFactory")],t.prototype,"userComponentFactory",void 0),yt([f("rowRenderer")],t.prototype,"rowRenderer",void 0),yt([f("dataTypeService")],t.prototype,"dataTypeService",void 0),yt([f("quickFilterService")],t.prototype,"quickFilterService",void 0),yt([Y("advancedFilterService")],t.prototype,"advancedFilterService",void 0),yt([b],t.prototype,"init",null),t=yt([I("filterManager")],t),t}(D),mf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),hs=function(n){mf(t,n);function t(e,r){var i=n.call(this,e)||this;return i.ctrl=r,i}return t.prototype.getCtrl=function(){return this.ctrl},t}(W),Sf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),oi=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},wf=function(n){Sf(t,n);function t(e){return n.call(this,t.TEMPLATE,e)||this}return t.prototype.postConstruct=function(){var e=this,r=this.getGui(),i={addOrRemoveCssClass:function(o,s){return e.addOrRemoveCssClass(o,s)},addOrRemoveBodyCssClass:function(o,s){return e.eFloatingFilterBody.classList.toggle(o,s)},setButtonWrapperDisplayed:function(o){return q(e.eButtonWrapper,o)},setCompDetails:function(o){return e.setCompDetails(o)},getFloatingFilterComp:function(){return e.compPromise},setWidth:function(o){return r.style.width=o},setMenuIcon:function(o){return e.eButtonShowMainFilter.appendChild(o)}};this.ctrl.setComp(i,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(i){return r.afterCompCreated(i)})},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=`<div class="ag-header-cell ag-floating-filter" role="gridcell" tabindex="-1">
|
||
<div ref="eFloatingFilterBody" role="presentation"></div>
|
||
<div class="ag-floating-filter-button ag-hidden" ref="eButtonWrapper" role="presentation">
|
||
<button type="button" class="ag-button ag-floating-filter-button-button" ref="eButtonShowMainFilter" tabindex="-1"></button>
|
||
</div>
|
||
</div>`,oi([L("eFloatingFilterBody")],t.prototype,"eFloatingFilterBody",void 0),oi([L("eButtonWrapper")],t.prototype,"eButtonWrapper",void 0),oi([L("eButtonShowMainFilter")],t.prototype,"eButtonShowMainFilter",void 0),oi([b],t.prototype,"postConstruct",null),oi([Se],t.prototype,"destroyFloatingFilterComp",null),t}(hs),Ef=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),_f=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},ue;(function(n){n.AUTO_HEIGHT="ag-layout-auto-height",n.NORMAL="ag-layout-normal",n.PRINT="ag-layout-print"})(ue||(ue={}));var fs=function(n){Ef(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"},i=r.autoHeight?ue.AUTO_HEIGHT:r.print?ue.PRINT:ue.NORMAL;this.view.updateLayoutClasses(i,r)},t.prototype.getDomLayout=function(){var e,r=(e=this.gridOptionsService.get("domLayout"))!==null&&e!==void 0?e:"normal",i=["normal","print","autoHeight"];return i.indexOf(r)===-1?(B("".concat(r," is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.")),"normal"):r},_f([b],t.prototype,"postConstruct",null),t}(D),Rf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),co=function(){return co=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},co.apply(this,arguments)},Bt=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},me;(function(n){n[n.Vertical=0]="Vertical",n[n.Horizontal=1]="Horizontal"})(me||(me={}));var Ee;(function(n){n[n.Container=0]="Container",n[n.FakeContainer=1]="FakeContainer"})(Ee||(Ee={}));var Of=function(n){Rf(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=ze(function(){return r.lastScrollSource[me.Horizontal]=null},500),r.resetLastVScrollDebounced=ze(function(){return r.lastScrollSource[me.Vertical]=null},500),r}return t.prototype.postConstruct=function(){var e=this;this.enableRtl=this.gridOptionsService.get("enableRtl"),this.addManagedListener(this.eventService,g.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 i=this.gridOptionsService.get("debounceVerticalScrollbar"),o=i?ze(this.onVScroll.bind(this),100):this.onVScroll.bind(this),s=i?ze(this.onFakeVScroll.bind(this),100):this.onFakeVScroll.bind(this);this.addManagedListener(this.eBodyViewport,"scroll",o),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 i=this.enableRtl?e:-e,o=this.ctrlsService.getTopCenterRowContainerCtrl(),s=this.ctrlsService.getStickyTopCenterRowContainerCtrl(),a=this.ctrlsService.getBottomCenterRowContainerCtrl(),l=this.ctrlsService.getFakeHScrollComp(),u=this.ctrlsService.getHeaderRowContainerCtrl();u.setHorizontalScroll(-i),a.setContainerTranslateX(i),o.setContainerTranslateX(i),s.setContainerTranslateX(i);var c=this.centerRowContainerCtrl.getViewportElement(),p=this.lastScrollSource[me.Horizontal]===Ee.Container;e=Math.abs(e),p?l.setScrollPosition(e):qr(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(Ee.FakeContainer,me.Horizontal)&&this.onHScrollCommon(Ee.FakeContainer)},t.prototype.onHScroll=function(){this.isControllingScroll(Ee.Container,me.Horizontal)&&this.onHScrollCommon(Ee.Container)},t.prototype.onHScrollCommon=function(e){var r=this.centerRowContainerCtrl.getViewportElement(),i=r.scrollLeft;if(!this.shouldBlockScrollUpdate(me.Horizontal,i,!0)){var o;e===Ee.Container?o=Yr(r,this.enableRtl):o=this.ctrlsService.getFakeHScrollComp().getScrollPosition(),this.doHorizontalScroll(Math.round(o)),this.resetLastHScrollDebounced()}},t.prototype.onFakeVScroll=function(){this.isControllingScroll(Ee.FakeContainer,me.Vertical)&&this.onVScrollCommon(Ee.FakeContainer)},t.prototype.onVScroll=function(){this.isControllingScroll(Ee.Container,me.Vertical)&&this.onVScrollCommon(Ee.Container)},t.prototype.onVScrollCommon=function(e){var r;e===Ee.Container?r=this.eBodyViewport.scrollTop:r=this.ctrlsService.getFakeVScrollComp().getScrollPosition(),!this.shouldBlockScrollUpdate(me.Vertical,r,!0)&&(this.animationFrameService.setScrollTop(r),this.nextScrollTop=r,e===Ee.Container?this.ctrlsService.getFakeVScrollComp().setScrollPosition(r):this.eBodyViewport.scrollTop=r,this.gridOptionsService.get("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(me.Horizontal),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowContainerCtrl.onHorizontalViewportChanged(!0))},t.prototype.fireScrollEvent=function(e){var r=this,i={type:g.EVENT_BODY_SCROLL,direction:e===me.Horizontal?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(i),window.clearTimeout(this.scrollTimer),this.scrollTimer=void 0,this.scrollTimer=window.setTimeout(function(){var o=co(co({},i),{type:g.EVENT_BODY_SCROLL_END});r.eventService.dispatchEvent(o)},100)},t.prototype.shouldBlockScrollUpdate=function(e,r,i){return i===void 0&&(i=!1),i&&!Nt()?!1:e===me.Vertical?this.shouldBlockVerticalScroll(r):this.shouldBlockHorizontalScroll(r)},t.prototype.shouldBlockVerticalScroll=function(e){var r=zr(this.eBodyViewport),i=this.eBodyViewport.scrollHeight;return e<0||e+r>i},t.prototype.shouldBlockHorizontalScroll=function(e){var r=this.centerRowContainerCtrl.getCenterWidth(),i=this.centerRowContainerCtrl.getViewportElement().scrollWidth;if(this.enableRtl&&Kr()){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+r>i},t.prototype.redrawRowsAfterScroll=function(){this.fireScrollEvent(me.Vertical)},t.prototype.checkScrollLeft=function(){this.scrollLeft!==this.centerRowContainerCtrl.getCenterViewportScrollLeft()&&this.onHScrollCommon(Ee.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 i=0,o=this.centerRowContainerCtrl.getViewportElement().scrollWidth-this.centerRowContainerCtrl.getCenterWidth();!r&&this.shouldBlockScrollUpdate(me.Horizontal,e)&&(this.enableRtl&&Kr()?e=e>0?0:o:e=Math.min(Math.max(e,i),o)),qr(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 i=this.rowModel.getRowCount(),o=-1,s=0;s<i;s++){var a=this.rowModel.getRow(s);if(typeof e=="function"){var l=e;if(a&&l(a)){o=s;break}}else if(e===a||e===a.data){o=s;break}}o>=0&&this.ensureIndexVisible(o,r)},t.prototype.ensureIndexVisible=function(e,r){if(!this.gridOptionsService.isDomLayout("print")){var i=this.paginationProxy.getRowCount();if(typeof e!="number"||e<0||e>=i){console.warn("AG Grid: Invalid row index for ensureIndexVisible: "+e);return}var o=this.gridOptionsService.get("pagination"),s=o&&!this.gridOptionsService.get("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,h=this.paginationProxy.getPixelOffset(),v=u.rowTop-h,y=v+u.rowHeight,C=this.getVScrollPosition(),m=this.heightScaler.getDivStretchOffset(),w=C.top+m,E=C.bottom+m,S=E-w,R=this.heightScaler.getScrollPositionForPixel(v),T=this.heightScaler.getScrollPositionForPixel(y-S),F=Math.min((R+T)/2,v),A=w+l>v,x=E<y,G=null;r==="top"?G=R:r==="bottom"?G=T:r==="middle"?G=F:A?G=R-l:x&&(G=T),G!==null&&(this.setVerticalScrollPosition(G),this.rowRenderer.redraw({afterScroll:!0})),c=p!==u.rowTop||d!==u.rowHeight}while(c);this.animationFrameService.flushAllFrames()}},t.prototype.ensureColumnVisible=function(e,r){r===void 0&&(r="auto");var i=this.columnModel.getGridColumn(e);if(i&&!i.isPinned()&&this.columnModel.isColumnDisplayed(i)){var o=this.getPositionedHorizontalScroll(i,r);o!==null&&this.centerRowContainerCtrl.setCenterViewportScrollLeft(o),this.centerRowContainerCtrl.onHorizontalViewportChanged(),this.animationFrameService.flushAllFrames()}},t.prototype.setScrollPosition=function(e,r){this.centerRowContainerCtrl.setCenterViewportScrollLeft(r),this.setVerticalScrollPosition(e),this.rowRenderer.redraw({afterScroll:!0}),this.animationFrameService.flushAllFrames()},t.prototype.getPositionedHorizontalScroll=function(e,r){var i=this.isColumnOutsideViewport(e),o=i.columnBeforeStart,s=i.columnAfterEnd,a=this.centerRowContainerCtrl.getCenterWidth()<e.getActualWidth(),l=this.centerRowContainerCtrl.getCenterWidth(),u=this.enableRtl,c=(u?o:s)||a,p=u?s:o;r!=="auto"&&(c=r==="start",p=r==="end");var d=r==="middle";if(c||p||d){var h=this.getColumnBounds(e),v=h.colLeft,y=h.colMiddle,C=h.colRight;return d?y-l/2:c?u?C:v:u?v-l:C-l}return null},t.prototype.isColumnOutsideViewport=function(e){var r=this.getViewportBounds(),i=r.start,o=r.end,s=this.getColumnBounds(e),a=s.colLeft,l=s.colRight,u=this.enableRtl,c=u?i>l:o<l,p=u?o<a:i>a;return{columnBeforeStart:c,columnAfterEnd:p}},t.prototype.getColumnBounds=function(e){var r=this.enableRtl,i=this.columnModel.getBodyContainerWidth(),o=e.getActualWidth(),s=e.getLeft(),a=r?-1:1,l=r?i-s:s,u=l+o*a,c=l+o/2*a;return{colLeft:l,colMiddle:c,colRight:u}},t.prototype.getViewportBounds=function(){var e=this.centerRowContainerCtrl.getCenterWidth(),r=this.centerRowContainerCtrl.getCenterViewportScrollLeft(),i=r,o=e+r;return{start:i,end:o,width:e}},Bt([f("ctrlsService")],t.prototype,"ctrlsService",void 0),Bt([f("animationFrameService")],t.prototype,"animationFrameService",void 0),Bt([f("paginationProxy")],t.prototype,"paginationProxy",void 0),Bt([f("rowModel")],t.prototype,"rowModel",void 0),Bt([f("rowContainerHeightService")],t.prototype,"heightScaler",void 0),Bt([f("rowRenderer")],t.prototype,"rowRenderer",void 0),Bt([f("columnModel")],t.prototype,"columnModel",void 0),Bt([b],t.prototype,"postConstruct",null),t}(D),Tf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),vs=function(){return vs=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},vs.apply(this,arguments)},Je=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Pf=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},Df=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},Af=function(n){Tf(t,n);function t(e){var r=n.call(this)||this;return r.isMultiRowDrag=!1,r.isGridSorted=!1,r.isGridFiltered=!1,r.isRowGroupActive=!1,r.eContainer=e,r}return t.prototype.postConstruct=function(){var e=this;this.gridOptionsService.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel);var r=function(){e.onSortChanged(),e.onFilterChanged(),e.onRowGroupChanged()};this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_MODEL_UPDATED,function(){r()}),r(),this.ctrlsService.whenReady(function(){var i=e.ctrlsService.getGridBodyCtrl();e.autoScrollService=new eu({scrollContainer:i.getBodyViewportElement(),scrollAxis:"y",getVerticalPosition:function(){return i.getScrollFeature().getVScrollPosition().top},setVerticalPosition:function(o){return i.getScrollFeature().setVerticalScrollPosition(o)},onScrollCallback:function(){e.onDragging(e.lastDraggingEvent)}})})},t.prototype.onSortChanged=function(){this.isGridSorted=this.sortController.isSortActive()},t.prototype.onFilterChanged=function(){this.isGridFiltered=this.filterManager.isAnyFilterPresent()},t.prototype.onRowGroupChanged=function(){var e=this.columnModel.getRowGroupColumns();this.isRowGroupActive=!_e(e)},t.prototype.getContainer=function(){return this.eContainer},t.prototype.isInterestedIn=function(e){return e===Pe.RowDrag},t.prototype.getIconName=function(){var e=this.gridOptionsService.get("rowDragManaged");return e&&this.shouldPreventRowMove()?fe.ICON_NOT_ALLOWED:fe.ICON_MOVE},t.prototype.shouldPreventRowMove=function(){return this.isGridSorted||this.isGridFiltered||this.isRowGroupActive},t.prototype.getRowNodes=function(e){var r=this;if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];var i=this.gridOptionsService.get("rowDragMultiRow"),o=Df([],Pf(this.selectionService.getSelectedNodes()),!1).sort(function(a,l){return a.rowIndex==null||l.rowIndex==null?0:r.getRowIndexNumber(a)-r.getRowIndexNumber(l)}),s=e.dragItem.rowNode;return i&&o.indexOf(s)!==-1?(this.isMultiRowDrag=!0,o):(this.isMultiRowDrag=!1,[s])},t.prototype.onDragEnter=function(e){e.dragItem.rowNodes=this.getRowNodes(e),this.dispatchGridEvent(g.EVENT_ROW_DRAG_ENTER,e),this.getRowNodes(e).forEach(function(r){r.setDragging(!0)}),this.onEnterOrDragging(e)},t.prototype.onDragging=function(e){this.onEnterOrDragging(e)},t.prototype.isFromThisGrid=function(e){var r=e.dragSource.dragSourceDomDataKey;return r===this.gridOptionsService.getDomDataKey()},t.prototype.isDropZoneWithinThisGrid=function(e){var r=this.ctrlsService.getGridBodyCtrl(),i=r.getGui(),o=e.dropZoneTarget;return!i.contains(o)},t.prototype.onEnterOrDragging=function(e){this.dispatchGridEvent(g.EVENT_ROW_DRAG_MOVE,e),this.lastDraggingEvent=e;var r=this.mouseEventService.getNormalisedPosition(e).y,i=this.gridOptionsService.get("rowDragManaged");i&&this.doManagedDrag(e,r),this.autoScrollService.check(e.event)},t.prototype.doManagedDrag=function(e,r){var i=this.isFromThisGrid(e),o=this.gridOptionsService.get("rowDragManaged"),s=e.dragItem.rowNodes;o&&this.shouldPreventRowMove()||(this.gridOptionsService.get("suppressMoveWhenRowDragging")||!i?this.isDropZoneWithinThisGrid(e)||this.clientSideRowModel.highlightRowAtPixel(s[0],r):this.moveRows(s,r))},t.prototype.getRowIndexNumber=function(e){return parseInt(Q(e.getRowIndexString().split("-")),10)},t.prototype.moveRowAndClearHighlight=function(e){var r=this,i=this.clientSideRowModel.getLastHighlightedRowNode(),o=i&&i.highlighted===Xe.Below,s=this.mouseEventService.getNormalisedPosition(e).y,a=e.dragItem.rowNodes,l=o?1:0;if(this.isFromThisGrid(e))a.forEach(function(p){p.rowTop<s&&(l-=1)}),this.moveRows(a,s,l);else{var u=this.gridOptionsService.getCallback("getRowId"),c=this.clientSideRowModel.getRowIndexAtPixel(s)+1;this.clientSideRowModel.getHighlightPosition(s)===Xe.Above&&c--,this.clientSideRowModel.updateRowData({add:a.map(function(p){return p.data}).filter(function(p){return!r.clientSideRowModel.getRowNode(u?u({data:p,level:0}):p.id)}),addIndex:c})}this.clearRowHighlight()},t.prototype.clearRowHighlight=function(){this.clientSideRowModel.highlightRowAtPixel(null)},t.prototype.moveRows=function(e,r,i){i===void 0&&(i=0);var o=this.clientSideRowModel.ensureRowsAtPixel(e,r,i);o&&(this.focusService.clearFocusedCell(),this.rangeService&&this.rangeService.removeAllCellRanges())},t.prototype.addRowDropZone=function(e){var r=this;if(!e.getContainer()){B("addRowDropZone - A container target needs to be provided");return}if(this.dragAndDropService.findExternalZone(e)){console.warn("AG Grid: addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.");return}var i={getContainer:e.getContainer};e.fromGrid?(e.fromGrid=void 0,i=e):(e.onDragEnter&&(i.onDragEnter=function(o){e.onDragEnter(r.draggingToRowDragEvent(g.EVENT_ROW_DRAG_ENTER,o))}),e.onDragLeave&&(i.onDragLeave=function(o){e.onDragLeave(r.draggingToRowDragEvent(g.EVENT_ROW_DRAG_LEAVE,o))}),e.onDragging&&(i.onDragging=function(o){e.onDragging(r.draggingToRowDragEvent(g.EVENT_ROW_DRAG_MOVE,o))}),e.onDragStop&&(i.onDragStop=function(o){e.onDragStop(r.draggingToRowDragEvent(g.EVENT_ROW_DRAG_END,o))})),this.dragAndDropService.addDropTarget(vs({isInterestedIn:function(o){return o===Pe.RowDrag},getIconName:function(){return fe.ICON_MOVE},external:!0},i))},t.prototype.getRowDropZone=function(e){var r=this,i=this.getContainer.bind(this),o=this.onDragEnter.bind(this),s=this.onDragLeave.bind(this),a=this.onDragging.bind(this),l=this.onDragStop.bind(this);return e?{getContainer:i,onDragEnter:e.onDragEnter?function(u){o(u),e.onDragEnter(r.draggingToRowDragEvent(g.EVENT_ROW_DRAG_ENTER,u))}:o,onDragLeave:e.onDragLeave?function(u){s(u),e.onDragLeave(r.draggingToRowDragEvent(g.EVENT_ROW_DRAG_LEAVE,u))}:s,onDragging:e.onDragging?function(u){a(u),e.onDragging(r.draggingToRowDragEvent(g.EVENT_ROW_DRAG_MOVE,u))}:a,onDragStop:e.onDragStop?function(u){l(u),e.onDragStop(r.draggingToRowDragEvent(g.EVENT_ROW_DRAG_END,u))}:l,fromGrid:!0}:{getContainer:i,onDragEnter:o,onDragLeave:s,onDragging:a,onDragStop:l,fromGrid:!0}},t.prototype.draggingToRowDragEvent=function(e,r){var i=this.mouseEventService.getNormalisedPosition(r).y,o=i>this.paginationProxy.getCurrentPageHeight(),s=-1,a;o||(s=this.rowModel.getRowIndexAtPixel(i),a=this.rowModel.getRow(s));var l;switch(r.vDirection){case Ar.Down:l="down";break;case Ar.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:i,vDirection:l};return u},t.prototype.dispatchGridEvent=function(e,r){var i=this.draggingToRowDragEvent(e,r);this.eventService.dispatchEvent(i)},t.prototype.onDragLeave=function(e){this.dispatchGridEvent(g.EVENT_ROW_DRAG_LEAVE,e),this.stopDragging(e),this.gridOptionsService.get("rowDragManaged")&&this.clearRowHighlight(),this.isFromThisGrid(e)&&(this.isMultiRowDrag=!1)},t.prototype.onDragStop=function(e){this.dispatchGridEvent(g.EVENT_ROW_DRAG_END,e),this.stopDragging(e),this.gridOptionsService.get("rowDragManaged")&&(this.gridOptionsService.get("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)})},Je([f("dragAndDropService")],t.prototype,"dragAndDropService",void 0),Je([f("rowModel")],t.prototype,"rowModel",void 0),Je([f("paginationProxy")],t.prototype,"paginationProxy",void 0),Je([f("columnModel")],t.prototype,"columnModel",void 0),Je([f("focusService")],t.prototype,"focusService",void 0),Je([f("sortController")],t.prototype,"sortController",void 0),Je([f("filterManager")],t.prototype,"filterManager",void 0),Je([f("selectionService")],t.prototype,"selectionService",void 0),Je([f("mouseEventService")],t.prototype,"mouseEventService",void 0),Je([f("ctrlsService")],t.prototype,"ctrlsService",void 0),Je([Y("rangeService")],t.prototype,"rangeService",void 0),Je([b],t.prototype,"postConstruct",null),t}(D),bf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),De=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Fr;(function(n){n.ANIMATION_ON="ag-row-animation",n.ANIMATION_OFF="ag-row-no-animation"})(Fr||(Fr={}));var ou="ag-force-vertical-scroll",Ff="ag-selectable",Lf="ag-column-moving",If=function(n){bf(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,i,o,s,a){var l=this;this.comp=e,this.eGridBody=r,this.eBodyViewport=i,this.eTop=o,this.eBottom=s,this.eStickyTop=a,this.setCellTextSelection(this.gridOptionsService.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",function(u){return l.setCellTextSelection(u.currentValue)}),this.createManagedBean(new fs(this.comp)),this.bodyScrollFeature=this.createManagedBean(new Of(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([o,i,s,a]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.filterManager.setupAdvancedFilterHeaderComp(o),this.ctrlsService.registerGridBodyCtrl(this)},t.prototype.getComp=function(){return this.comp},t.prototype.addEventListeners=function(){this.addManagedListener(this.eventService,g.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))},t.prototype.addFocusListeners=function(e){var r=this;e.forEach(function(i){r.addManagedListener(i,"focusin",function(o){var s=o.target,a=rr(s,"ag-root",i);i.classList.toggle("ag-has-focus",!a)}),r.addManagedListener(i,"focusout",function(o){var s=o.target,a=o.relatedTarget,l=i.contains(a),u=rr(a,"ag-root",i),c=rr(s,"ag-root",i);c||(!l||u)&&i.classList.remove("ag-has-focus")})})},t.prototype.setColumnMovingCss=function(e){this.comp.setColumnMovingCss(Lf,e)},t.prototype.setCellTextSelection=function(e){e===void 0&&(e=!1),this.comp.setCellSelectableCss(Ff,e)},t.prototype.onScrollVisibilityChanged=function(){var e=this,r=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(r),this.setStickyTopWidth(r);var i=r&&this.gridOptionsService.getScrollbarWidth()||0,o=Dn()?16:0,s="calc(100% + ".concat(i+o,"px)");this.animationFrameService.requestAnimationFrame(function(){return e.comp.setBodyViewportWidth(s)})},t.prototype.onGridColumnsChanged=function(){var e=this.columnModel.getAllGridColumns();this.comp.setColumnCount(e.length)},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.get("stopEditingWhenCellsLoseFocus")){var r=function(o){var s=o.relatedTarget;if(Yi(s)===null){e.rowRenderer.stopEditing();return}var a=i.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()},i=[this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop];i.forEach(function(o){return e.addManagedListener(o,"focusout",r)})}},t.prototype.updateRowCount=function(){var e=this.headerNavigationService.getHeaderRowCount()+this.filterManager.getHeaderRowCount(),r=this.rowModel.isLastRowIndexKnown()?this.rowModel.getRowCount():-1,i=r===-1?-1:e+r;this.comp.setRowCount(i)},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.get("alwaysShowVerticalScroll"),r=e?ou:null,i=this.gridOptionsService.isDomLayout("normal");return this.comp.setAlwaysVerticalScrollClass(r,e),e||i&&ll(this.eBodyViewport)},t.prototype.setupRowAnimationCssClass=function(){var e=this,r=function(){var i=e.gridOptionsService.isAnimateRows()&&!e.rowContainerHeightService.isStretching(),o=i?Fr.ANIMATION_ON:Fr.ANIMATION_OFF;e.comp.setRowAnimationCssOnBodyViewport(o,i)};r(),this.addManagedListener(this.eventService,g.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"),i=this.eBodyViewport.querySelector(".ag-center-cols-viewport");r&&i&&this.addManagedListener(r,"wheel",function(o){return e.onFullWidthContainerWheel(o,i)})},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,i){if(!(!e&&!i)){if(this.gridOptionsService.get("preventDefaultOnContextMenu")){var o=e||i;o.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):i&&this.contextMenuFactory.onContextMenu(null,i,null,null,null,this.eGridBody)}}},t.prototype.mockContextMenuForIPad=function(e){if(Nt()){var r=new Be(this.eBodyViewport),i=function(o){e(void 0,o.touchStart,o.touchEvent)};this.addManagedListener(r,Be.EVENT_LONG_TAP,i),this.addDestroyFunc(function(){return r.destroy()})}},t.prototype.onBodyViewportWheel=function(e){this.gridOptionsService.get("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 Af(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 i=e.getPinnedBottomTotalHeight();i&&(i+=1),this.comp.setTopHeight(r),this.comp.setBottomHeight(i),this.comp.setTopDisplay(r?"inherit":"none"),this.comp.setBottomDisplay(i?"inherit":"none"),this.setStickyTopOffsetTop()},t.prototype.setStickyTopHeight=function(e){e===void 0&&(e=0),this.comp.setStickyTopHeight("".concat(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% - ".concat(r,"px)"))}},t.prototype.onHeaderHeightChanged=function(){this.setStickyTopOffsetTop()},t.prototype.setStickyTopOffsetTop=function(){var e=this.ctrlsService.getGridHeaderCtrl(),r=e.getHeaderHeight()+this.filterManager.getHeaderHeight(),i=this.pinnedRowModel.getPinnedTopTotalHeight(),o=0;r>0&&(o+=r+1),i>0&&(o+=i+1),this.comp.setStickyTopTop("".concat(o,"px"))},t.prototype.sizeColumnsToFit=function(e,r){var i=this,o=this.isVerticalScrollShowing(),s=o?this.gridOptionsService.getScrollbarWidth():0,a=ir(this.eGridBody),l=a-s;if(l>0){this.columnModel.sizeColumnsToFit(l,"sizeColumnsToFit",!1,e);return}r===void 0?window.setTimeout(function(){i.sizeColumnsToFit(e,100)},0):r===100?window.setTimeout(function(){i.sizeColumnsToFit(e,500)},100):r===500?window.setTimeout(function(){i.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)},De([f("animationFrameService")],t.prototype,"animationFrameService",void 0),De([f("rowContainerHeightService")],t.prototype,"rowContainerHeightService",void 0),De([f("ctrlsService")],t.prototype,"ctrlsService",void 0),De([f("columnModel")],t.prototype,"columnModel",void 0),De([f("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),De([Y("contextMenuFactory")],t.prototype,"contextMenuFactory",void 0),De([f("headerNavigationService")],t.prototype,"headerNavigationService",void 0),De([f("dragAndDropService")],t.prototype,"dragAndDropService",void 0),De([f("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),De([f("rowRenderer")],t.prototype,"rowRenderer",void 0),De([f("popupService")],t.prototype,"popupService",void 0),De([f("mouseEventService")],t.prototype,"mouseEventService",void 0),De([f("rowModel")],t.prototype,"rowModel",void 0),De([f("filterManager")],t.prototype,"filterManager",void 0),t}(D),po;(function(n){n[n.FILL=0]="FILL",n[n.RANGE=1]="RANGE"})(po||(po={}));var Lr;(function(n){n[n.VALUE=0]="VALUE",n[n.DIMENSION=1]="DIMENSION"})(Lr||(Lr={}));var ni="ag-cell-range-selected",xf="ag-cell-range-chart",Mf="ag-cell-range-single-cell",Nf="ag-cell-range-chart-category",Gf="ag-cell-range-handle",Vf="ag-cell-range-top",Hf="ag-cell-range-right",Bf="ag-cell-range-bottom",kf="ag-cell-range-left",Wf=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(ni,this.rangeCount!==0),this.cellComp.addOrRemoveCssClass("".concat(ni,"-1"),this.rangeCount===1),this.cellComp.addOrRemoveCssClass("".concat(ni,"-2"),this.rangeCount===2),this.cellComp.addOrRemoveCssClass("".concat(ni,"-3"),this.rangeCount===3),this.cellComp.addOrRemoveCssClass("".concat(ni,"-4"),this.rangeCount>=4),this.cellComp.addOrRemoveCssClass(xf,this.hasChartRange),Er(this.eGui,this.rangeCount>0?!0:void 0),this.cellComp.addOrRemoveCssClass(Mf,this.isSingleCell()),this.updateRangeBorders(),this.refreshHandle())},n.prototype.updateRangeBorders=function(){var t=this.getRangeBorders(),e=this.isSingleCell(),r=!e&&t.top,i=!e&&t.right,o=!e&&t.bottom,s=!e&&t.left;this.cellComp.addOrRemoveCssClass(Vf,r),this.cellComp.addOrRemoveCssClass(Hf,i),this.cellComp.addOrRemoveCssClass(Bf,o),this.cellComp.addOrRemoveCssClass(kf,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 $e([Lr.DIMENSION,Lr.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.get("enableRtl"),r=!1,i=!1,o=!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 h=u.getCellRanges().filter(function(w){return u.isCellInSpecificRange(t.cellCtrl.getCellPosition(),w)});p||(s=!0),d||(i=!0);for(var v=0;v<h.length&&!(r&&i&&o&&s);v++){var y=h[v],C=u.getRangeStartRow(y),m=u.getRangeEndRow(y);!r&&this.beans.rowPositionUtils.sameRow(C,this.cellCtrl.getCellPosition())&&(r=!0),!o&&this.beans.rowPositionUtils.sameRow(m,this.cellCtrl.getCellPosition())&&(o=!0),!s&&p&&y.columns.indexOf(p)<0&&(s=!0),!i&&d&&y.columns.indexOf(d)<0&&(i=!0)}return{top:r,right:i,bottom:o,left:s}},n.prototype.refreshHandle=function(){if(this.beans.rangeService){var t=this.shouldHaveSelectionHandle();this.selectionHandle&&!t&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),t&&this.addSelectionHandle(),this.cellComp.addOrRemoveCssClass(Gf,!!this.selectionHandle)}},n.prototype.shouldHaveSelectionHandle=function(){var t=this.beans,e=t.gridOptionsService,r=t.rangeService,i=r.getCellRanges(),o=i.length;if(this.rangeCount<1||o<1)return!1;var s=Q(i),a=this.cellCtrl.getCellPosition(),l=e.get("enableFillHandle")&&!this.cellCtrl.isSuppressFillHandle(),u=e.get("enableRangeHandle"),c=o===1&&!this.cellCtrl.isEditing()&&(l||u);if(this.hasChartRange){var p=i[0].type===Lr.DIMENSION,d=p&&r.isCellInSpecificRange(a,i[0]);this.cellComp.addOrRemoveCssClass(Nf,d),c=s.type===Lr.VALUE}return c&&s.endRow!=null&&r.isContiguousRange(s)&&r.isBottomRightCell(s,a)},n.prototype.addSelectionHandle=function(){var t=this.beans,e=t.gridOptionsService,r=t.rangeService,i=Q(r.getCellRanges()).type,o=e.get("enableFillHandle")&&V(i),s=o?po.FILL:po.RANGE;this.selectionHandle&&this.selectionHandle.getType()!==s&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),this.selectionHandle||(this.selectionHandle=this.beans.selectionHandleFactory.createSelectionHandle(s)),this.selectionHandle.refresh(this.cellCtrl)},n.prototype.destroy=function(){this.beans.context.destroyBean(this.selectionHandle)},n}(),jf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Uf=function(n){jf(t,n);function t(e,r){var i=n.call(this)||this;return i.cellCtrl=e,i.beans=r,i.column=e.getColumn(),i.rowNode=e.getRowNode(),i.setupColSpan(),i.setupRowSpan(),i}return t.prototype.setupRowSpan=function(){var e=this;this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListener(this.beans.eventService,g.EVENT_NEW_COLUMNS_LOADED,function(){return e.onNewColumnsLoaded()})},t.prototype.setComp=function(e){this.eGui=e,this.onLeftChanged(),this.onWidthChanged(),this.applyRowSpan()},t.prototype.onNewColumnsLoaded=function(){var e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this.applyRowSpan(!0))},t.prototype.onDisplayColumnsChanged=function(){var e=this.getColSpanningList();_t(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())},t.prototype.setupColSpan=function(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListener(this.beans.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayColumnsChanged.bind(this)),this.addManagedListener(this.beans.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onWidthChanged.bind(this)))},t.prototype.onWidthChanged=function(){if(this.eGui){var e=this.getCellWidth();this.eGui.style.width="".concat(e,"px")}},t.prototype.getCellWidth=function(){return this.colsSpanning?this.colsSpanning.reduce(function(e,r){return e+r.getActualWidth()},0):this.column.getActualWidth()},t.prototype.getColSpanningList=function(){var e=this.column.getColSpan(this.rowNode),r=[];if(e===1)r.push(this.column);else for(var i=this.column,o=this.column.getPinned(),s=0;i&&s<e&&(r.push(i),i=this.beans.columnModel.getDisplayedColAfter(i),!(!i||V(i)||o!==i.getPinned()));s++);return r},t.prototype.onLeftChanged=function(){if(this.eGui){var e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eGui.style.left=e+"px"}},t.prototype.getCellLeft=function(){var e;return this.beans.gridOptionsService.get("enableRtl")&&this.colsSpanning?e=Q(this.colsSpanning):e=this.column,e.getLeft()},t.prototype.modifyLeftForPrintLayout=function(e){if(!this.cellCtrl.isPrintLayout()||this.column.getPinned()==="left")return e;var r=this.beans.columnModel.getDisplayedColumnsLeftWidth();if(this.column.getPinned()==="right"){var i=this.beans.columnModel.getBodyContainerWidth();return r+i+(e||0)}return r+(e||0)},t.prototype.applyRowSpan=function(e){if(!(this.rowSpan===1&&!e)){var r=this.beans.gridOptionsService.getRowHeightAsNumber(),i=r*this.rowSpan;this.eGui.style.height="".concat(i,"px"),this.eGui.style.zIndex="1"}},t.prototype.destroy=function(){n.prototype.destroy.call(this)},t}(D),zf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),$f=function(n){zf(t,n);function t(e,r){var i=n.call(this)||this;return i.staticClasses=[],i.cellCtrl=e,i.beans=r,i.column=e.getColumn(),i.rowNode=e.getRowNode(),i}return t.prototype.setComp=function(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()},t.prototype.applyCellClassRules=function(){var e=this,r=this.column.getColDef(),i=r.cellClassRules,o={value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,colDef:r,column:this.column,rowIndex:this.rowNode.rowIndex,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,context:this.beans.gridOptionsService.context};this.beans.stylingService.processClassRules(i===this.cellClassRules?void 0:this.cellClassRules,i,o,function(s){return e.cellComp.addOrRemoveCssClass(s,!0)},function(s){return e.cellComp.addOrRemoveCssClass(s,!1)}),this.cellClassRules=i},t.prototype.applyUserStyles=function(){var e=this.column.getColDef();if(e.cellStyle){var r;if(typeof e.cellStyle=="function"){var i={column:this.column,value:this.cellCtrl.getValue(),colDef:e,data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,context:this.beans.gridOptionsService.context},o=e.cellStyle;r=o(i)}else r=e.cellStyle;r&&this.cellComp.setUserStyles(r)}},t.prototype.applyClassesFromColDef=function(){var e=this,r=this.column.getColDef(),i={value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,column:this.column,colDef:r,rowIndex:this.rowNode.rowIndex,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,context:this.beans.gridOptionsService.context};this.staticClasses.length&&this.staticClasses.forEach(function(o){return e.cellComp.addOrRemoveCssClass(o,!1)}),this.staticClasses=this.beans.stylingService.getStaticCellClasses(r,i),this.staticClasses.length&&this.staticClasses.forEach(function(o){return e.cellComp.addOrRemoveCssClass(o,!0)})},t.prototype.destroy=function(){n.prototype.destroy.call(this)},t}(D),Kf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),gs=function(n){Kf(t,n);function t(e,r){var i=n.call(this)||this;return i.ctrl=e,i.beans=r,i}return t.prototype.setComp=function(e){this.eGui=e,this.setupTooltip()},t.prototype.setBrowserTooltip=function(e){var r="title";e!=null&&e!=""?this.eGui.setAttribute(r,e):this.eGui.removeAttribute(r)},t.prototype.setupTooltip=function(){this.browserTooltips=this.beans.gridOptionsService.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?this.setBrowserTooltip(this.tooltip):this.createTooltipFeatureIfNeeded()},t.prototype.updateTooltipText=function(){this.tooltip=this.ctrl.getTooltipValue()},t.prototype.createTooltipFeatureIfNeeded=function(){var e=this,r,i,o,s;if(this.genericTooltipFeature==null){var a={getTooltipParams:function(){return e.getTooltipParams()},getGui:function(){return e.ctrl.getGui()}};this.genericTooltipFeature=this.createManagedBean(new Kn(a,(i=(r=this.ctrl).getTooltipShowDelayOverride)===null||i===void 0?void 0:i.call(r),(s=(o=this.ctrl).getTooltipHideDelayOverride)===null||s===void 0?void 0:s.call(o)),this.beans.context)}},t.prototype.refreshToolTip=function(){this.updateTooltipText(),this.browserTooltips&&this.setBrowserTooltip(this.tooltip)},t.prototype.getTooltipParams=function(){var e=this,r=this.ctrl,i=r.getColumn?r.getColumn():void 0,o=r.getColDef?r.getColDef():void 0,s=r.getRowNode?r.getRowNode():void 0;return{location:r.getLocation(),colDef:o,column:i,rowIndex:r.getRowIndex?r.getRowIndex():void 0,node:s,data:s?s.data:void 0,value:this.getTooltipText(),valueFormatted:r.getValueFormatted?r.getValueFormatted():void 0,hideTooltipCallback:function(){return e.genericTooltipFeature.hideTooltip(!0)}}},t.prototype.getTooltipText=function(){return this.tooltip},t.prototype.destroy=function(){n.prototype.destroy.call(this)},t}(D),H=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},nu=function(){function n(){}return n.prototype.postConstruct=function(){this.gridOptionsService.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.gridOptionsService.isRowModelType("serverSide")&&(this.serverSideRowModel=this.rowModel)},H([f("resizeObserverService")],n.prototype,"resizeObserverService",void 0),H([f("paginationProxy")],n.prototype,"paginationProxy",void 0),H([f("context")],n.prototype,"context",void 0),H([f("columnApi")],n.prototype,"columnApi",void 0),H([f("gridApi")],n.prototype,"gridApi",void 0),H([f("gridOptionsService")],n.prototype,"gridOptionsService",void 0),H([f("expressionService")],n.prototype,"expressionService",void 0),H([f("environment")],n.prototype,"environment",void 0),H([f("rowRenderer")],n.prototype,"rowRenderer",void 0),H([f("templateService")],n.prototype,"templateService",void 0),H([f("valueService")],n.prototype,"valueService",void 0),H([f("eventService")],n.prototype,"eventService",void 0),H([f("columnModel")],n.prototype,"columnModel",void 0),H([f("headerNavigationService")],n.prototype,"headerNavigationService",void 0),H([f("navigationService")],n.prototype,"navigationService",void 0),H([f("columnAnimationService")],n.prototype,"columnAnimationService",void 0),H([Y("rangeService")],n.prototype,"rangeService",void 0),H([f("focusService")],n.prototype,"focusService",void 0),H([Y("contextMenuFactory")],n.prototype,"contextMenuFactory",void 0),H([f("popupService")],n.prototype,"popupService",void 0),H([f("valueFormatterService")],n.prototype,"valueFormatterService",void 0),H([f("stylingService")],n.prototype,"stylingService",void 0),H([f("columnHoverService")],n.prototype,"columnHoverService",void 0),H([f("userComponentFactory")],n.prototype,"userComponentFactory",void 0),H([f("userComponentRegistry")],n.prototype,"userComponentRegistry",void 0),H([f("animationFrameService")],n.prototype,"animationFrameService",void 0),H([f("dragService")],n.prototype,"dragService",void 0),H([f("dragAndDropService")],n.prototype,"dragAndDropService",void 0),H([f("sortController")],n.prototype,"sortController",void 0),H([f("filterManager")],n.prototype,"filterManager",void 0),H([f("rowContainerHeightService")],n.prototype,"rowContainerHeightService",void 0),H([f("frameworkOverrides")],n.prototype,"frameworkOverrides",void 0),H([f("cellPositionUtils")],n.prototype,"cellPositionUtils",void 0),H([f("rowPositionUtils")],n.prototype,"rowPositionUtils",void 0),H([f("selectionService")],n.prototype,"selectionService",void 0),H([Y("selectionHandleFactory")],n.prototype,"selectionHandleFactory",void 0),H([f("rowCssClassCalculator")],n.prototype,"rowCssClassCalculator",void 0),H([f("rowModel")],n.prototype,"rowModel",void 0),H([f("ctrlsService")],n.prototype,"ctrlsService",void 0),H([f("ctrlsFactory")],n.prototype,"ctrlsFactory",void 0),H([f("agStackComponentsRegistry")],n.prototype,"agStackComponentsRegistry",void 0),H([f("valueCache")],n.prototype,"valueCache",void 0),H([f("rowNodeEventThrottle")],n.prototype,"rowNodeEventThrottle",void 0),H([f("localeService")],n.prototype,"localeService",void 0),H([f("valueParserService")],n.prototype,"valueParserService",void 0),H([f("syncService")],n.prototype,"syncService",void 0),H([b],n.prototype,"postConstruct",null),n=H([I("beans")],n),n}(),Yf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),qf=function(n){Yf(t,n);function t(e,r,i){var o=n.call(this)||this;return o.cellCtrl=e,o.beans=r,o.column=i,o}return t.prototype.onMouseEvent=function(e,r){if(!tt(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,i=r.eventService,o=r.rangeService,s=r.gridOptionsService,a=e.ctrlKey||e.metaKey;o&&a&&o.getCellRangeCount(this.cellCtrl.getCellPosition())>1&&o.intersectLastRange(!0);var l=this.cellCtrl.createEvent(e,g.EVENT_CELL_CLICKED);i.dispatchEvent(l);var u=this.column.getColDef();u.onCellClicked&&window.setTimeout(function(){return u.onCellClicked(l)},0);var c=(s.get("singleClickEdit")||u.singleClickEdit)&&!s.get("suppressClickEdit");c&&!(e.shiftKey&&(o==null?void 0:o.getCellRanges().length)!=0)&&this.cellCtrl.startRowOrCellEdit()},t.prototype.isDoubleClickOnIPad=function(){if(!Nt()||sn("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(),i=this.cellCtrl.createEvent(e,g.EVENT_CELL_DOUBLE_CLICKED);this.beans.eventService.dispatchEvent(i),typeof r.onCellDoubleClicked=="function"&&window.setTimeout(function(){return r.onCellDoubleClicked(i)},0);var o=!this.beans.gridOptionsService.get("singleClickEdit")&&!this.beans.gridOptionsService.get("suppressClickEdit");o&&this.cellCtrl.startRowOrCellEdit(null,e)},t.prototype.onMouseDown=function(e){var r=e.ctrlKey,i=e.metaKey,o=e.shiftKey,s=e.target,a=this,l=a.cellCtrl,u=a.beans,c=u.eventService,p=u.rangeService,d=u.focusService;if(!this.isRightClickInExistingRange(e)){var h=p&&p.getCellRanges().length!=0;if(!o||!h){var v=nt()&&!l.isEditing()&&!xn(s);l.focusCell(v)}if(o&&h&&!d.isCellFocused(l.getCellPosition())){e.preventDefault();var y=d.getFocusedCell();if(y){var C=y.column,m=y.rowIndex,w=y.rowPinned,E=u.rowRenderer.getRowByPosition({rowIndex:m,rowPinned:w}),S=E==null?void 0:E.getCellCtrl(C);S!=null&&S.isEditing()&&S.stopEditing(),d.setFocusedCell({column:C,rowIndex:m,rowPinned:w,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!this.containsWidget(s)){if(p){var R=this.cellCtrl.getCellPosition();if(o)p.extendLatestRangeToCell(R);else{var T=r||i;p.setRangeToCell(R,T)}}c.dispatchEvent(this.cellCtrl.createEvent(e,g.EVENT_CELL_MOUSE_DOWN))}}},t.prototype.isRightClickInExistingRange=function(e){var r=this.beans.rangeService;if(r){var i=r.isCellInAnyRange(this.cellCtrl.getCellPosition()),o=e.button===2||e.ctrlKey&&this.beans.gridOptionsService.get("allowContextMenuWithControlKey");if(i&&o)return!0}return!1},t.prototype.containsWidget=function(e){return rr(e,"ag-selection-checkbox",3)},t.prototype.onMouseOut=function(e){if(!this.mouseStayingInsideCell(e)){var r=this.cellCtrl.createEvent(e,g.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,g.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(),i=r.contains(e.target),o=r.contains(e.relatedTarget);return i&&o},t.prototype.destroy=function(){},t}(nu),Qf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Xf=function(n){Qf(t,n);function t(e,r,i,o,s){var a=n.call(this)||this;return a.cellCtrl=e,a.beans=r,a.rowNode=o,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 _.ENTER:this.onEnterKeyDown(e);break;case _.F2:this.onF2KeyDown(e);break;case _.ESCAPE:this.onEscapeKeyDown(e);break;case _.TAB:this.onTabKeyDown(e);break;case _.BACKSPACE:case _.DELETE:this.onBackspaceOrDeleteKeyDown(r,e);break;case _.DOWN:case _.UP:case _.RIGHT:case _.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 i=this,o=i.cellCtrl,s=i.beans,a=i.rowNode,l=s.gridOptionsService,u=s.rangeService,c=s.eventService;o.isEditing()||(c.dispatchEvent({type:g.EVENT_KEY_SHORTCUT_CHANGED_CELL_START}),vl(e,l.get("enableCellEditingOnBackspace"))?u&&l.get("enableRangeSelection")?u.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"}):o.isCellEditable()&&a.setDataValue(o.getColumn(),null,"cellClear"):o.startRowOrCellEdit(e,r),c.dispatchEvent({type:g.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.get("enterNavigatesVertically")){var r=e.shiftKey?_.UP:_.DOWN;this.beans.navigationService.navigateToNextCell(null,r,this.cellCtrl.getCellPosition(),!1)}else this.cellCtrl.startRowOrCellEdit(_.ENTER,e),this.cellCtrl.isEditing()&&e.preventDefault()},t.prototype.onF2KeyDown=function(e){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(_.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,i=r!==this.eGui;if(!(i||this.cellCtrl.isEditing())){var o=e.key;o===" "?this.onSpaceKeyDown(e):(this.cellCtrl.startRowOrCellEdit(o,e),e.preventDefault())}},t.prototype.onSpaceKeyDown=function(e){var r=this.beans.gridOptionsService;if(!this.cellCtrl.isEditing()&&r.isRowSelection()){var i=this.rowNode.isSelected(),o=!i;if(o||!r.get("suppressRowDeselection")){var s=this.beans.gridOptionsService.get("groupSelectsFiltered"),a=this.rowNode.setSelectedParams({newValue:o,rangeSelect:e.shiftKey,groupSelectsFiltered:s,event:e,source:"spaceKey"});i===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}(D),Jf=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Zf=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},ev=function(n){Jf(t,n);function t(e,r,i){var o=n.call(this,'<div class="ag-drag-handle ag-row-drag" draggable="true"></div>')||this;return o.rowNode=e,o.column=r,o.eCell=i,o}return t.prototype.postConstruct=function(){var e=this.getGui();e.appendChild(ne("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,i=this.column.getColDef().dndSourceOnRowDrag;e.dataTransfer.setDragImage(this.eCell,0,0);var o=function(){try{var a=JSON.stringify(r.rowNode.data);e.dataTransfer.setData("application/json",a),e.dataTransfer.setData("text/plain",a)}catch{}};if(i){var s={rowNode:this.rowNode,dragEvent:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};i(s)}else o()},t.prototype.checkVisibility=function(){var e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)},Zf([b],t.prototype,"postConstruct",null),t}(W),tv=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},rv=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},iv="ag-column-first",ov="ag-column-last",ho=function(){function n(){}return n.getHeaderClassesFromColDef=function(t,e,r,i){return V(t)?[]:this.getColumnClassesFromCollDef(t.headerClass,t,e,r,i)},n.getToolPanelClassesFromColDef=function(t,e,r,i){return V(t)?[]:this.getColumnClassesFromCollDef(t.toolPanelClass,t,e,r,i)},n.refreshFirstAndLastStyles=function(t,e,r){t.addOrRemoveCssClass(iv,r.isColumnAtEdge(e,"first")),t.addOrRemoveCssClass(ov,r.isColumnAtEdge(e,"last"))},n.getClassParams=function(t,e,r,i){return{colDef:t,column:r,columnGroup:i,api:e.api,columnApi:e.columnApi,context:e.context}},n.getColumnClassesFromCollDef=function(t,e,r,i,o){if(V(t))return[];var s;if(typeof t=="function"){var a=this.getClassParams(e,r,i,o);s=t(a)}else s=t;return typeof s=="string"?[s]:Array.isArray(s)?rv([],tv(s),!1):[]},n}(),nv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),fo=function(){return fo=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},fo.apply(this,arguments)},sv="ag-cell",av="ag-cell-auto-height",lv="ag-cell-normal-height",uv="ag-cell-focus",cv="ag-cell-first-right-pinned",pv="ag-cell-last-left-pinned",dv="ag-cell-not-inline-editing",hv="ag-column-hover",fv="ag-cell-wrap-text",vv=0,dr=function(n){nv(t,n);function t(e,r,i,o){var s=n.call(this)||this;s.cellRangeFeature=null,s.cellPositionFeature=null,s.cellCustomStyleFeature=null,s.tooltipFeature=null,s.cellMouseListenerFeature=null,s.cellKeyboardListenerFeature=null,s.suppressRefreshCell=!1,s.onCellCompAttachedFuncs=[],s.column=e,s.rowNode=r,s.beans=i,s.rowCtrl=o,s.instanceId=e.getId()+"-"+vv++;var a=s.column.getColDef();return s.colIdSanitised=se(s.column.getId()),s.beans.gridOptionsService.get("suppressCellFocus")||(s.tabIndex=-1),s.isCellRenderer=a.cellRenderer!=null||a.cellRendererSelector!=null,s.createCellPosition(),s.addFeatures(),s.updateAndFormatValue(!1),s}return t.prototype.shouldRestoreFocus=function(){return this.beans.focusService.shouldRestoreFocus(this.cellPosition)},t.prototype.addFeatures=function(){var e=this;this.cellPositionFeature=new Uf(this,this.beans),this.addDestroyFunc(function(){var i;(i=e.cellPositionFeature)===null||i===void 0||i.destroy(),e.cellPositionFeature=null}),this.cellCustomStyleFeature=new $f(this,this.beans),this.addDestroyFunc(function(){var i;(i=e.cellCustomStyleFeature)===null||i===void 0||i.destroy(),e.cellCustomStyleFeature=null}),this.cellMouseListenerFeature=new qf(this,this.beans,this.column),this.addDestroyFunc(function(){var i;(i=e.cellMouseListenerFeature)===null||i===void 0||i.destroy(),e.cellMouseListenerFeature=null}),this.cellKeyboardListenerFeature=new Xf(this,this.beans,this.column,this.rowNode,this.rowCtrl),this.addDestroyFunc(function(){var i;(i=e.cellKeyboardListenerFeature)===null||i===void 0||i.destroy(),e.cellKeyboardListenerFeature=null}),this.column.isTooltipEnabled()&&(this.enableTooltipFeature(),this.addDestroyFunc(function(){e.disableTooltipFeature()}));var r=this.beans.rangeService&&this.beans.gridOptionsService.get("enableRangeSelection");r&&(this.cellRangeFeature=new Wf(this.beans,this),this.addDestroyFunc(function(){var i;(i=e.cellRangeFeature)===null||i===void 0||i.destroy(),e.cellRangeFeature=null}))},t.prototype.enableTooltipFeature=function(){var e=this,r=function(){var o=e.column.getColDef(),s=e.rowNode.data;if(o.tooltipField&&P(s))return Sr(s,o.tooltipField,e.column.isTooltipFieldContainsDots());var a=o.tooltipValueGetter;return a?a({location:"cell",api:e.beans.gridOptionsService.api,columnApi:e.beans.gridOptionsService.columnApi,context:e.beans.gridOptionsService.context,colDef:e.column.getColDef(),column:e.column,rowIndex:e.cellPosition.rowIndex,node:e.rowNode,data:e.rowNode.data,value:e.value,valueFormatted:e.valueFormatted}):null},i={getColumn:function(){return e.column},getColDef:function(){return e.column.getColDef()},getRowIndex:function(){return e.cellPosition.rowIndex},getRowNode:function(){return e.rowNode},getGui:function(){return e.getGui()},getLocation:function(){return"cell"},getTooltipValue:r,getValueFormatted:function(){return e.valueFormatted}};this.tooltipFeature=new gs(i,this.beans)},t.prototype.disableTooltipFeature=function(){this.tooltipFeature&&(this.tooltipFeature.destroy(),this.tooltipFeature=null)},t.prototype.setComp=function(e,r,i,o,s){var a,l,u,c;this.cellComp=e,this.eGui=r,this.printLayout=o,this.addDomData(),this.onCellFocused(this.focusEventToRestore),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(i),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),(a=this.cellPositionFeature)===null||a===void 0||a.setComp(r),(l=this.cellCustomStyleFeature)===null||l===void 0||l.setComp(e),(u=this.tooltipFeature)===null||u===void 0||u.setComp(r),(c=this.cellKeyboardListenerFeature)===null||c===void 0||c.setComp(this.eGui),this.cellRangeFeature&&this.cellRangeFeature.setComp(e,r),s&&this.isCellEditable()?this.startEditing():this.showValue(),this.onCellCompAttachedFuncs.length&&(this.onCellCompAttachedFuncs.forEach(function(p){return p()}),this.onCellCompAttachedFuncs=[])},t.prototype.setupAutoHeight=function(e){var r=this;if(this.isAutoHeight=this.column.isAutoHeight(),!(!this.isAutoHeight||!e)){var i=e.parentElement,o=this.beans.gridOptionsService.getRowHeightForNode(this.rowNode).height,s=function(u){if(!r.editing&&r.isAlive()){var c=Gt(i),p=c.paddingTop,d=c.paddingBottom,h=c.borderBottomWidth,v=c.borderTopWidth,y=p+d+h+v,C=e.offsetHeight,m=C+y;if(u<5){var w=r.beans.gridOptionsService.getDocument(),E=!w||!w.contains(e),S=m==0;if(E||S){r.beans.frameworkOverrides.setTimeout(function(){return s(u+1)},0);return}}var R=Math.max(m,o);r.rowNode.setRowAutoHeight(R,r.column)}},a=function(){return s(0)};a();var l=this.beans.resizeObserverService.observeResize(e,a);this.addDestroyFunc(function(){l(),r.rowNode.setRowAutoHeight(void 0,r.column)})}},t.prototype.getCellAriaRole=function(){var e;return(e=this.column.getColDef().cellAriaRole)!==null&&e!==void 0?e:"gridcell"},t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.getIncludeSelection=function(){return this.includeSelection},t.prototype.getIncludeRowDrag=function(){return this.includeRowDrag},t.prototype.getIncludeDndSource=function(){return this.includeDndSource},t.prototype.getColumnIdSanitised=function(){return this.colIdSanitised},t.prototype.getTabIndex=function(){return this.tabIndex},t.prototype.getIsCellRenderer=function(){return this.isCellRenderer},t.prototype.getValueToDisplay=function(){return this.valueFormatted!=null?this.valueFormatted:this.value},t.prototype.showValue=function(e){e===void 0&&(e=!1);var r=this.getValueToDisplay(),i;if(this.isCellRenderer){var o=this.createCellRendererParams();i=this.beans.userComponentFactory.getCellRendererDetails(this.column.getColDef(),o)}this.cellComp.setRenderDetails(i,r,e),this.refreshHandle()},t.prototype.setupControlComps=function(){var e=this.column.getColDef();this.includeSelection=this.isIncludeControl(e.checkboxSelection),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.cellComp.setIncludeSelection(this.includeSelection),this.cellComp.setIncludeDndSource(this.includeDndSource),this.cellComp.setIncludeRowDrag(this.includeRowDrag)},t.prototype.isForceWrapper=function(){var e=this.beans.gridOptionsService.get("enableCellTextSelection")||this.column.isAutoHeight();return e},t.prototype.isIncludeControl=function(e){var r=this.rowNode.rowPinned!=null,i=typeof e=="function",o=r?!1:i||e===!0;return o},t.prototype.refreshShouldDestroy=function(){var e=this.column.getColDef(),r=this.includeSelection!=this.isIncludeControl(e.checkboxSelection),i=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),o=this.includeDndSource!=this.isIncludeControl(e.dndSource);return r||i||o},t.prototype.startEditing=function(e,r,i){var o=this;if(e===void 0&&(e=null),r===void 0&&(r=!1),i===void 0&&(i=null),!(!this.isCellEditable()||this.editing)){if(!this.cellComp){this.onCellCompAttachedFuncs.push(function(){o.startEditing(e,r,i)});return}var s=this.createCellEditorParams(e,r),a=this.column.getColDef(),l=this.beans.userComponentFactory.getCellEditorDetails(a,s),u=(l==null?void 0:l.popupFromSelector)!=null?l.popupFromSelector:!!a.cellEditorPopup,c=(l==null?void 0:l.popupPositionFromSelector)!=null?l.popupPositionFromSelector:a.cellEditorPopupPosition;this.setEditing(!0),this.cellComp.setEditDetails(l,u,c);var p=this.createEvent(i,g.EVENT_CELL_EDITING_STARTED);this.beans.eventService.dispatchEvent(p)}},t.prototype.setEditing=function(e){this.editing!==e&&(this.editing=e,this.refreshHandle())},t.prototype.stopRowOrCellEdit=function(e){e===void 0&&(e=!1),this.beans.gridOptionsService.get("editType")==="fullRow"?this.rowCtrl.stopRowEditing(e):this.stopEditing(e)},t.prototype.onPopupEditorClosed=function(){this.isEditing()&&this.stopEditingAndFocus()},t.prototype.takeValueFromCellEditor=function(e){var r={newValueExists:!1};if(e)return r;var i=this.cellComp.getCellEditor();if(!i)return r;var o=i.isCancelAfterEnd&&i.isCancelAfterEnd();if(o)return r;var s=i.getValue();return{newValue:s,newValueExists:!0}},t.prototype.saveNewValue=function(e,r){if(r===e)return!1;this.suppressRefreshCell=!0;var i=this.rowNode.setDataValue(this.column,r,"edit");return this.suppressRefreshCell=!1,i},t.prototype.stopEditing=function(e){if(e===void 0&&(e=!1),!this.editing)return!1;var r=this.takeValueFromCellEditor(e),i=r.newValue,o=r.newValueExists,s=this.rowNode.getValueFromValueService(this.column),a=!1;return o&&(a=this.saveNewValue(s,i)),this.setEditing(!1),this.cellComp.setEditDetails(),this.updateAndFormatValue(!1),this.refreshCell({forceRefresh:!0,suppressFlash:!0}),this.dispatchEditingStoppedEvent(s,i,!e&&!!a),a},t.prototype.dispatchEditingStoppedEvent=function(e,r,i){var o=fo(fo({},this.createEvent(null,g.EVENT_CELL_EDITING_STOPPED)),{oldValue:e,newValue:r,valueChanged:i});this.beans.eventService.dispatchEvent(o)},t.prototype.createCellEditorParams=function(e,r){return{value:this.rowNode.getValueFromValueService(this.column),eventKey:e,column:this.column,colDef:this.column.getColDef(),rowIndex:this.getCellPosition().rowIndex,node:this.rowNode,data:this.rowNode.data,api:this.beans.gridOptionsService.api,cellStartedEdit:r,columnApi:this.beans.gridOptionsService.columnApi,context:this.beans.gridOptionsService.context,onKeyDown:this.onKeyDown.bind(this),stopEditing:this.stopEditingAndFocus.bind(this),eGridCell:this.getGui(),parseValue:this.parseValue.bind(this),formatValue:this.formatValue.bind(this)}},t.prototype.createCellRendererParams=function(){var e=this,r={value:this.value,valueFormatted:this.valueFormatted,getValue:function(){return e.rowNode.getValueFromValueService(e.column)},setValue:function(i){return e.beans.valueService.setValue(e.rowNode,e.column,i)},formatValue:this.formatValue.bind(this),data:this.rowNode.data,node:this.rowNode,pinned:this.column.getPinned(),colDef:this.column.getColDef(),column:this.column,rowIndex:this.getCellPosition().rowIndex,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,context:this.beans.gridOptionsService.context,refreshCell:this.refreshCell.bind(this),eGridCell:this.getGui(),eParentOfValue:this.cellComp.getParentOfValue(),registerRowDragger:function(i,o,s,a){return e.registerRowDragger(i,o,a)}};return r},t.prototype.parseValue=function(e){return this.beans.valueParserService.parseValue(this.column,this.rowNode,e,this.getValue())},t.prototype.setFocusOutOnEditor=function(){if(this.editing){var e=this.cellComp.getCellEditor();e&&e.focusOut&&e.focusOut()}},t.prototype.setFocusInOnEditor=function(){if(this.editing){var e=this.cellComp.getCellEditor();e&&e.focusIn?e.focusIn():this.focusCell(!0)}},t.prototype.onCellChanged=function(e){var r=e.column===this.column;r&&this.refreshCell({})},t.prototype.refreshOrDestroyCell=function(e){var r;this.refreshShouldDestroy()?(r=this.rowCtrl)===null||r===void 0||r.refreshCell(this):this.refreshCell(e)},t.prototype.refreshCell=function(e){var r,i,o;if(!(this.suppressRefreshCell||this.editing)){var s=this.column.getColDef(),a=e!=null&&!!e.newData,l=e!=null&&!!e.suppressFlash||!!s.suppressCellFlash,u=s.field==null&&s.valueGetter==null&&s.showRowGroup==null,c=e&&e.forceRefresh||u||a,p=!!this.cellComp,d=this.updateAndFormatValue(p),h=c||d;if(p){if(h){this.showValue(a);var v=this.beans.filterManager.isSuppressFlashingCellsBecauseFiltering(),y=!l&&!v&&(this.beans.gridOptionsService.get("enableCellChangeFlash")||s.enableCellChangeFlash);y&&this.flashCell(),(r=this.cellCustomStyleFeature)===null||r===void 0||r.applyUserStyles(),(i=this.cellCustomStyleFeature)===null||i===void 0||i.applyClassesFromColDef()}this.refreshToolTip(),(o=this.cellCustomStyleFeature)===null||o===void 0||o.applyCellClassRules()}}},t.prototype.stopEditingAndFocus=function(e,r){e===void 0&&(e=!1),r===void 0&&(r=!1),this.stopRowOrCellEdit(),this.focusCell(!0),e||this.navigateAfterEdit(r)},t.prototype.navigateAfterEdit=function(e){var r=this.beans.gridOptionsService.get("enterNavigatesVerticallyAfterEdit");if(r){var i=e?_.UP:_.DOWN;this.beans.navigationService.navigateToNextCell(null,i,this.getCellPosition(),!1)}},t.prototype.flashCell=function(e){var r=e&&e.flashDelay,i=e&&e.fadeDelay;this.animateCell("data-changed",r,i)},t.prototype.animateCell=function(e,r,i){var o=this;if(this.cellComp){var s="ag-cell-".concat(e),a="ag-cell-".concat(e,"-animation"),l=this.beans.gridOptionsService;r||(r=l.get("cellFlashDelay")),P(i)||(i=l.get("cellFadeDelay")),this.cellComp.addOrRemoveCssClass(s,!0),this.cellComp.addOrRemoveCssClass(a,!1),window.setTimeout(function(){o.isAlive()&&(o.cellComp.addOrRemoveCssClass(s,!1),o.cellComp.addOrRemoveCssClass(a,!0),o.eGui.style.transition="background-color ".concat(i,"ms"),window.setTimeout(function(){o.isAlive()&&(o.cellComp.addOrRemoveCssClass(a,!1),o.eGui.style.transition="")},i))},r)}},t.prototype.onFlashCells=function(e){if(this.cellComp){var r=this.beans.cellPositionUtils.createId(this.getCellPosition()),i=e.cells[r];i&&this.animateCell("highlight")}},t.prototype.isCellEditable=function(){return this.column.isCellEditable(this.rowNode)},t.prototype.isSuppressFillHandle=function(){return this.column.isSuppressFillHandle()},t.prototype.formatValue=function(e){var r;return(r=this.callValueFormatter(e))!==null&&r!==void 0?r:e},t.prototype.callValueFormatter=function(e){return this.beans.valueFormatterService.formatValue(this.column,this.rowNode,e)},t.prototype.updateAndFormatValue=function(e){var r=this.value,i=this.valueFormatted;return this.value=this.rowNode.getValueFromValueService(this.column),this.valueFormatted=this.callValueFormatter(this.value),e?!this.valuesAreEqual(r,this.value)||this.valueFormatted!=i:!0},t.prototype.valuesAreEqual=function(e,r){var i=this.column.getColDef();return i.equals?i.equals(e,r):e===r},t.prototype.getComp=function(){return this.cellComp},t.prototype.getValue=function(){return this.value},t.prototype.getValueFormatted=function(){return this.valueFormatted},t.prototype.addDomData=function(){var e=this,r=this.getGui();this.beans.gridOptionsService.setDomData(r,t.DOM_DATA_KEY_CELL_CTRL,this),this.addDestroyFunc(function(){return e.beans.gridOptionsService.setDomData(r,t.DOM_DATA_KEY_CELL_CTRL,null)})},t.prototype.createEvent=function(e,r){var i={type:r,node:this.rowNode,data:this.rowNode.data,value:this.value,column:this.column,colDef:this.column.getColDef(),context:this.beans.gridOptionsService.context,api:this.beans.gridApi,columnApi:this.beans.columnApi,rowPinned:this.rowNode.rowPinned,event:e,rowIndex:this.rowNode.rowIndex};return i},t.prototype.processCharacter=function(e){var r;(r=this.cellKeyboardListenerFeature)===null||r===void 0||r.processCharacter(e)},t.prototype.onKeyDown=function(e){var r;(r=this.cellKeyboardListenerFeature)===null||r===void 0||r.onKeyDown(e)},t.prototype.onMouseEvent=function(e,r){var i;(i=this.cellMouseListenerFeature)===null||i===void 0||i.onMouseEvent(e,r)},t.prototype.getGui=function(){return this.eGui},t.prototype.refreshToolTip=function(){var e;(e=this.tooltipFeature)===null||e===void 0||e.refreshToolTip()},t.prototype.getColSpanningList=function(){return this.cellPositionFeature.getColSpanningList()},t.prototype.onLeftChanged=function(){var e;this.cellComp&&((e=this.cellPositionFeature)===null||e===void 0||e.onLeftChanged())},t.prototype.onDisplayedColumnsChanged=function(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())},t.prototype.refreshFirstAndLastStyles=function(){var e=this,r=e.cellComp,i=e.column,o=e.beans;ho.refreshFirstAndLastStyles(r,i,o.columnModel)},t.prototype.refreshAriaColIndex=function(){var e=this.beans.columnModel.getAriaColumnIndex(this.column);gn(this.getGui(),e)},t.prototype.isSuppressNavigable=function(){return this.column.isSuppressNavigable(this.rowNode)},t.prototype.onWidthChanged=function(){var e;return(e=this.cellPositionFeature)===null||e===void 0?void 0:e.onWidthChanged()},t.prototype.getColumn=function(){return this.column},t.prototype.getRowNode=function(){return this.rowNode},t.prototype.getBeans=function(){return this.beans},t.prototype.isPrintLayout=function(){return this.printLayout},t.prototype.appendChild=function(e){this.eGui.appendChild(e)},t.prototype.refreshHandle=function(){this.cellRangeFeature&&this.cellRangeFeature.refreshHandle()},t.prototype.getCellPosition=function(){return this.cellPosition},t.prototype.isEditing=function(){return this.editing},t.prototype.startRowOrCellEdit=function(e,r){r===void 0&&(r=null),this.cellComp&&(this.beans.gridOptionsService.get("editType")==="fullRow"?this.rowCtrl.startRowEditing(e,this):this.startEditing(e,!0,r))},t.prototype.getRowCtrl=function(){return this.rowCtrl},t.prototype.getRowPosition=function(){return{rowIndex:this.cellPosition.rowIndex,rowPinned:this.cellPosition.rowPinned}},t.prototype.updateRangeBordersIfRangeCount=function(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.updateRangeBordersIfRangeCount()},t.prototype.onRangeSelectionChanged=function(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()},t.prototype.isRangeSelectionEnabled=function(){return this.cellRangeFeature!=null},t.prototype.focusCell=function(e){e===void 0&&(e=!1),this.beans.focusService.setFocusedCell({rowIndex:this.getCellPosition().rowIndex,column:this.column,rowPinned:this.rowNode.rowPinned,forceBrowserFocus:e})},t.prototype.onRowIndexChanged=function(){this.createCellPosition(),this.onCellFocused(),this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()},t.prototype.onFirstRightPinnedChanged=function(){if(this.cellComp){var e=this.column.isFirstRightPinned();this.cellComp.addOrRemoveCssClass(cv,e)}},t.prototype.onLastLeftPinnedChanged=function(){if(this.cellComp){var e=this.column.isLastLeftPinned();this.cellComp.addOrRemoveCssClass(pv,e)}},t.prototype.onCellFocused=function(e){if(!this.beans.gridOptionsService.get("suppressCellFocus")){var r=this.beans.focusService.isCellFocused(this.cellPosition);if(!this.cellComp){r&&(e!=null&&e.forceBrowserFocus)&&(this.focusEventToRestore=e);return}if(this.focusEventToRestore=void 0,this.cellComp.addOrRemoveCssClass(uv,r),r&&e&&e.forceBrowserFocus){var i=this.cellComp.getFocusableElement();i.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}var o=this.beans.gridOptionsService.get("editType")==="fullRow";!r&&!o&&this.editing&&this.stopRowOrCellEdit()}},t.prototype.createCellPosition=function(){this.cellPosition={rowIndex:this.rowNode.rowIndex,rowPinned:ct(this.rowNode.rowPinned),column:this.column}},t.prototype.applyStaticCssClasses=function(){this.cellComp.addOrRemoveCssClass(sv,!0),this.cellComp.addOrRemoveCssClass(dv,!0);var e=this.column.isAutoHeight()==!0;this.cellComp.addOrRemoveCssClass(av,e),this.cellComp.addOrRemoveCssClass(lv,!e)},t.prototype.onColumnHover=function(){if(this.cellComp&&this.beans.gridOptionsService.get("columnHoverHighlight")){var e=this.beans.columnHoverService.isHovered(this.column);this.cellComp.addOrRemoveCssClass(hv,e)}},t.prototype.onColDefChanged=function(){var e,r;if(this.cellComp){var i=this.column.isAutoHeight();i!==this.isAutoHeight&&((e=this.rowCtrl)===null||e===void 0||e.refreshCell(this));var o=this.column.isTooltipEnabled();o?(this.disableTooltipFeature(),this.enableTooltipFeature(),(r=this.tooltipFeature)===null||r===void 0||r.setComp(this.eGui)):this.disableTooltipFeature(),this.setWrapText(),this.editing||this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0})}},t.prototype.setWrapText=function(){var e=this.column.getColDef().wrapText==!0;this.cellComp.addOrRemoveCssClass(fv,e)},t.prototype.dispatchCellContextMenuEvent=function(e){var r=this.column.getColDef(),i=this.createEvent(e,g.EVENT_CELL_CONTEXT_MENU);this.beans.eventService.dispatchEvent(i),r.onCellContextMenu&&window.setTimeout(function(){return r.onCellContextMenu(i)},0)},t.prototype.getCellRenderer=function(){return this.cellComp?this.cellComp.getCellRenderer():null},t.prototype.getCellEditor=function(){return this.cellComp?this.cellComp.getCellEditor():null},t.prototype.destroy=function(){this.onCellCompAttachedFuncs=[],n.prototype.destroy.call(this)},t.prototype.createSelectionCheckbox=function(){var e=new $l;return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e},t.prototype.createDndSource=function(){var e=new ev(this.rowNode,this.column,this.eGui);return this.beans.context.createBean(e),e},t.prototype.registerRowDragger=function(e,r,i){var o=this;if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,r);return}var s=this.createRowDragComp(e,r,i);s&&(this.customRowDragComp=s,this.addDestroyFunc(function(){o.beans.context.destroyBean(s),o.customRowDragComp=null}))},t.prototype.createRowDragComp=function(e,r,i){var o=this,s=this.beans.gridOptionsService.get("pagination"),a=this.beans.gridOptionsService.get("rowDragManaged"),l=this.beans.gridOptionsService.isRowModelType("clientSide");if(a){if(!l){B("managed row dragging is only allowed in the Client Side Row Model");return}if(s){B("managed row dragging is not possible when doing pagination");return}}var u=new ao(function(){return o.value},this.rowNode,this.column,e,r,i);return this.beans.context.createBean(u),u},t.DOM_DATA_KEY_CELL_CTRL="cellCtrl",t}(D),gv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),yv=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.")},ys=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},Cs=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},Ae;(function(n){n.Normal="Normal",n.FullWidth="FullWidth",n.FullWidthLoading="FullWidthLoading",n.FullWidthGroup="FullWidthGroup",n.FullWidthDetail="FullWidthDetail"})(Ae||(Ae={}));var Cv=0,hr=function(n){gv(t,n);function t(e,r,i,o,s){var a=n.call(this)||this;return a.allRowGuis=[],a.active=!0,a.centerCellCtrls={list:[],map:{}},a.leftCellCtrls={list:[],map:{}},a.rightCellCtrls={list:[],map:{}},a.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},a.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},a.rowDragComps=[],a.lastMouseDownOnDragger=!1,a.emptyStyle={},a.updateColumnListsPending=!1,a.rowId=null,a.businessKeySanitised=null,a.beans=r,a.gridOptionsService=r.gridOptionsService,a.rowNode=e,a.paginationPage=r.paginationProxy.getCurrentPage(),a.useAnimationFrameForCreate=o,a.printLayout=s,a.instanceId=e.id+"-"+Cv++,a.rowId=se(e.id),a.initRowBusinessKey(),a.rowFocused=r.focusService.isRowFocused(a.rowNode.rowIndex,a.rowNode.rowPinned),a.rowLevel=r.rowCssClassCalculator.calculateRowLevel(a.rowNode),a.setRowType(),a.setAnimateFlags(i),a.rowStyles=a.processStylesFromGridOptions(),a.isFullWidth()&&!a.gridOptionsService.get("suppressCellFocus")&&(a.tabIndex=-1),a.addListeners(),a}return t.prototype.initRowBusinessKey=function(){this.businessKeyForNodeFunc=this.gridOptionsService.get("getBusinessKeyForNode"),this.updateRowBusinessKey()},t.prototype.updateRowBusinessKey=function(){if(typeof this.businessKeyForNodeFunc=="function"){var e=this.businessKeyForNodeFunc(this.rowNode);this.businessKeySanitised=se(e)}},t.prototype.getRowId=function(){return this.rowId},t.prototype.getRowStyles=function(){return this.rowStyles},t.prototype.getTabIndex=function(){return this.tabIndex},t.prototype.isSticky=function(){return this.rowNode.sticky},t.prototype.getBeans=function(){return this.beans},t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.setComp=function(e,r,i){var o={rowComp:e,element:r,containerType:i};this.allRowGuis.push(o),i===de.LEFT?this.leftGui=o:i===de.RIGHT?this.rightGui=o:i===de.FULL_WIDTH?this.fullWidthGui=o:this.centerGui=o,this.initialiseRowComp(o),this.rowType!=="FullWidthLoading"&&!this.rowNode.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent()},t.prototype.unsetComp=function(e){switch(this.allRowGuis=this.allRowGuis.filter(function(r){return r.containerType!==e}),e){case de.LEFT:this.leftGui=void 0;break;case de.RIGHT:this.rightGui=void 0;break;case de.FULL_WIDTH:this.fullWidthGui=void 0;break;case de.CENTER:this.centerGui=void 0;break}},t.prototype.isCacheable=function(){return this.rowType===Ae.FullWidthDetail&&this.gridOptionsService.get("keepDetailRows")},t.prototype.setCached=function(e){var r=e?"none":"";this.allRowGuis.forEach(function(i){return i.element.style.display=r})},t.prototype.initialiseRowComp=function(e){var r=this,i=this.gridOptionsService;this.listenOnDomOrder(e),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights(),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),i.isRowSelection()&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);var o=e.rowComp,s=this.getInitialRowClasses(e.containerType);s.forEach(function(a){return o.addOrRemoveCssClass(a,!0)}),this.executeSlideAndFadeAnimations(e),this.rowNode.group&&ot(e.element,this.rowNode.expanded==!0),this.setRowCompRowId(o),this.setRowCompRowBusinessKey(o),i.setDomData(e.element,t.DOM_DATA_KEY_ROW_CTRL,this),this.addDestroyFunc(function(){return i.setDomData(e.element,t.DOM_DATA_KEY_ROW_CTRL,null)}),this.useAnimationFrameForCreate?this.beans.animationFrameService.createTask(this.addHoverFunctionality.bind(this,e.element),this.rowNode.rowIndex,"createTasksP2"):this.addHoverFunctionality(e.element),this.isFullWidth()&&this.setupFullWidth(e),i.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameService.addDestroyTask(function(){r.isAlive()&&e.rowComp.addOrRemoveCssClass("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()},t.prototype.setRowCompRowBusinessKey=function(e){this.businessKeySanitised!=null&&e.setRowBusinessKey(this.businessKeySanitised)},t.prototype.getBusinessKey=function(){return this.businessKeySanitised},t.prototype.setRowCompRowId=function(e){this.rowId=se(this.rowNode.id),this.rowId!=null&&e.setRowId(this.rowId)},t.prototype.executeSlideAndFadeAnimations=function(e){var r=this,i=e.containerType,o=this.slideInAnimation[i];o&&(Jo(function(){r.onTopChanged()}),this.slideInAnimation[i]=!1);var s=this.fadeInAnimation[i];s&&(Jo(function(){e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}),this.fadeInAnimation[i]=!1)},t.prototype.addRowDraggerToRow=function(e){if(this.gridOptionsService.get("enableRangeSelection")){B("Setting `rowDragEntireRow: true` in the gridOptions doesn't work with `enableRangeSelection: true`");return}var r=this.beans.localeService.getLocaleTextFunc(),i=new ao(function(){return"1 ".concat(r("rowDragRow","row"))},this.rowNode,void 0,e.element,void 0,!0),o=this.createBean(i,this.beans.context);this.rowDragComps.push(o)},t.prototype.setupFullWidth=function(e){var r=this.getPinnedForContainer(e.containerType),i=this.createFullWidthParams(e.element,r);if(!(this.rowType==Ae.FullWidthDetail&&!k.__assertRegistered(M.MasterDetailModule,"cell renderer 'agDetailCellRenderer' (for master detail)",this.beans.context.getGridId()))){var o;switch(this.rowType){case Ae.FullWidthDetail:o=this.beans.userComponentFactory.getFullWidthDetailCellRendererDetails(i);break;case Ae.FullWidthGroup:o=this.beans.userComponentFactory.getFullWidthGroupCellRendererDetails(i);break;case Ae.FullWidthLoading:o=this.beans.userComponentFactory.getFullWidthLoadingCellRendererDetails(i);break;default:o=this.beans.userComponentFactory.getFullWidthCellRendererDetails(i);break}e.rowComp.showFullWidth(o)}},t.prototype.isPrintLayout=function(){return this.printLayout},t.prototype.getFullWidthCellRenderer=function(){var e,r;return(r=(e=this.fullWidthGui)===null||e===void 0?void 0:e.rowComp)===null||r===void 0?void 0:r.getFullWidthCellRenderer()},t.prototype.getCellElement=function(e){var r=this.getCellCtrl(e);return r?r.getGui():null},t.prototype.executeProcessRowPostCreateFunc=function(){var e=this.gridOptionsService.getCallback("processRowPostCreate");if(!(!e||!this.areAllContainersReady())){var r={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(r)}},t.prototype.areAllContainersReady=function(){var e=!!this.leftGui||!this.beans.columnModel.isPinningLeft(),r=!!this.centerGui,i=!!this.rightGui||!this.beans.columnModel.isPinningRight();return e&&r&&i},t.prototype.setRowType=function(){var e=this.rowNode.stub,r=this.rowNode.isFullWidthCell(),i=this.gridOptionsService.get("masterDetail")&&this.rowNode.detail,o=this.beans.columnModel.isPivotMode(),s=!!this.rowNode.group&&!this.rowNode.footer,a=s&&this.gridOptionsService.isGroupUseEntireRow(o);e?this.rowType=Ae.FullWidthLoading:i?this.rowType=Ae.FullWidthDetail:r?this.rowType=Ae.FullWidth:a?this.rowType=Ae.FullWidthGroup:this.rowType=Ae.Normal},t.prototype.updateColumnLists=function(e,r){var i=this;if(e===void 0&&(e=!1),r===void 0&&(r=!1),!this.isFullWidth()){var o=e||this.gridOptionsService.get("suppressAnimationFrame")||this.printLayout;if(o){this.updateColumnListsImpl(r);return}this.updateColumnListsPending||(this.beans.animationFrameService.createTask(function(){i.active&&i.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"createTasksP1"),this.updateColumnListsPending=!0)}},t.prototype.createCellCtrls=function(e,r,i){var o=this;i===void 0&&(i=null);var s={list:[],map:{}},a=function(l,u){s.list.push(u),s.map[l]=u};return r.forEach(function(l){var u=l.getInstanceId(),c=e.map[u];c||(c=new dr(l,o.rowNode,o.beans,o)),a(u,c)}),e.list.forEach(function(l){var u=s.map[l.getColumn().getInstanceId()]!=null;if(!u){var c=!o.isCellEligibleToBeRemoved(l,i);if(c){a(l.getColumn().getInstanceId(),l);return}l.destroy()}}),s},t.prototype.updateColumnListsImpl=function(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)},t.prototype.setCellCtrls=function(e){var r=this;this.allRowGuis.forEach(function(i){var o=r.getCellCtrlsForContainer(i.containerType);i.rowComp.setCellCtrls(o,e)})},t.prototype.getCellCtrlsForContainer=function(e){switch(e){case de.LEFT:return this.leftCellCtrls.list;case de.RIGHT:return this.rightCellCtrls.list;case de.FULL_WIDTH:return[];case de.CENTER:return this.centerCellCtrls.list;default:var r=e;throw new Error("Unhandled case: ".concat(r))}},t.prototype.createAllCellCtrls=function(){var e=this.beans.columnModel;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,e.getAllDisplayedColumns()),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{var r=e.getViewportCenterColumnsForRow(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,r);var i=e.getDisplayedLeftColumnsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,i,"left");var o=e.getDisplayedRightColumnsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,o,"right")}},t.prototype.isCellEligibleToBeRemoved=function(e,r){var i=!0,o=!1,s=e.getColumn();if(s.getPinned()!=r)return i;var a=e.isEditing(),l=this.beans.focusService.isCellFocused(e.getCellPosition()),u=a||l;if(u){var c=e.getColumn(),p=this.beans.columnModel.getAllDisplayedColumns(),d=p.indexOf(c)>=0;return d?o:i}return i},t.prototype.getDomOrder=function(){var e=this.gridOptionsService.get("ensureDomOrder");return e||this.gridOptionsService.isDomLayout("print")},t.prototype.listenOnDomOrder=function(e){var r=this,i=function(){e.rowComp.setDomOrder(r.getDomOrder())};this.addManagedPropertyListener("domLayout",i),this.addManagedPropertyListener("ensureDomOrder",i)},t.prototype.setAnimateFlags=function(e){if(!(this.isSticky()||!e)){var r=P(this.rowNode.oldRowTop),i=this.beans.columnModel.isPinningLeft(),o=this.beans.columnModel.isPinningRight();if(r){if(this.isFullWidth()&&!this.gridOptionsService.get("embedFullWidthRows")){this.slideInAnimation.fullWidth=!0;return}this.slideInAnimation.center=!0,this.slideInAnimation.left=i,this.slideInAnimation.right=o}else{if(this.isFullWidth()&&!this.gridOptionsService.get("embedFullWidthRows")){this.fadeInAnimation.fullWidth=!0;return}this.fadeInAnimation.center=!0,this.fadeInAnimation.left=i,this.fadeInAnimation.right=o}}},t.prototype.isEditing=function(){return this.editingRow},t.prototype.stopRowEditing=function(e){this.stopEditing(e)},t.prototype.isFullWidth=function(){return this.rowType!==Ae.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),h=p.refresh(d);return h},i=r(this.fullWidthGui,null),o=r(this.centerGui,null),s=r(this.leftGui,"left"),a=r(this.rightGui,"right"),l=i&&o&&s&&a;return l},t.prototype.addListeners=function(){var e=this;this.addManagedListener(this.rowNode,U.EVENT_HEIGHT_CHANGED,function(){return e.onRowHeightChanged()}),this.addManagedListener(this.rowNode,U.EVENT_ROW_SELECTED,function(){return e.onRowSelected()}),this.addManagedListener(this.rowNode,U.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addManagedListener(this.rowNode,U.EVENT_TOP_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(this.rowNode,U.EVENT_EXPANDED_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,U.EVENT_HAS_CHILDREN_CHANGED,this.updateExpandedCss.bind(this)),this.rowNode.detail&&this.addManagedListener(this.rowNode.parent,U.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,U.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,U.EVENT_CELL_CHANGED,this.onRowNodeCellChanged.bind(this)),this.addManagedListener(this.rowNode,U.EVENT_HIGHLIGHT_CHANGED,this.onRowNodeHighlightChanged.bind(this)),this.addManagedListener(this.rowNode,U.EVENT_DRAGGING_CHANGED,this.onRowNodeDraggingChanged.bind(this)),this.addManagedListener(this.rowNode,U.EVENT_UI_LEVEL_CHANGED,this.onUiLevelChanged.bind(this));var r=this.beans.eventService;this.addManagedListener(r,g.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,this.onPaginationPixelOffsetChanged.bind(this)),this.addManagedListener(r,g.EVENT_HEIGHT_SCALE_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(r,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(r,g.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(r,g.EVENT_CELL_FOCUSED,this.onCellFocused.bind(this)),this.addManagedListener(r,g.EVENT_CELL_FOCUS_CLEARED,this.onCellFocusCleared.bind(this)),this.addManagedListener(r,g.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),this.addManagedListener(r,g.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedListener(r,g.EVENT_COLUMN_MOVED,this.onColumnMoved.bind(this)),this.addDestroyFunc(function(){e.destroyBeans(e.rowDragComps,e.beans.context)}),this.addManagedPropertyListeners(["rowDragEntireRow"],function(){var i=e.gridOptionsService.get("rowDragEntireRow");if(i){e.allRowGuis.forEach(function(o){e.addRowDraggerToRow(o)});return}e.destroyBeans(e.rowDragComps,e.beans.context),e.rowDragComps=[]}),this.addListenersForCellComps()},t.prototype.onColumnMoved=function(){this.updateColumnLists()},t.prototype.addListenersForCellComps=function(){var e=this;this.addManagedListener(this.rowNode,U.EVENT_ROW_INDEX_CHANGED,function(){e.getAllCellCtrls().forEach(function(r){return r.onRowIndexChanged()})}),this.addManagedListener(this.rowNode,U.EVENT_CELL_CHANGED,function(r){e.getAllCellCtrls().forEach(function(i){return i.onCellChanged(r)})})},t.prototype.onRowNodeDataChanged=function(e){var r=this,i=this.isFullWidth()!==!!this.rowNode.isFullWidthCell();if(i){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){var o=this.refreshFullWidth();o||this.beans.rowRenderer.redrawRow(this.rowNode);return}this.getAllCellCtrls().forEach(function(s){return s.refreshCell({suppressFlash:!e.update,newData:!e.update})}),this.allRowGuis.forEach(function(s){r.setRowCompRowId(s.rowComp),r.updateRowBusinessKey(),r.setRowCompRowBusinessKey(s.rowComp)}),this.onRowSelected(),this.postProcessCss()},t.prototype.onRowNodeCellChanged=function(){this.postProcessCss()},t.prototype.postProcessCss=function(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()},t.prototype.onRowNodeHighlightChanged=function(){var e=this.rowNode.highlighted;this.allRowGuis.forEach(function(r){var i=e===Xe.Above,o=e===Xe.Below;r.rowComp.addOrRemoveCssClass("ag-row-highlight-above",i),r.rowComp.addOrRemoveCssClass("ag-row-highlight-below",o)})},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(i){i.rowComp.addOrRemoveCssClass("ag-row-group",e),i.rowComp.addOrRemoveCssClass("ag-row-group-expanded",e&&r),i.rowComp.addOrRemoveCssClass("ag-row-group-contracted",e&&!r),ot(i.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:ct(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)}),i=r?r.element:null,o=i===e.target;if(o){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||tt(e))){var r=this.allRowGuis.find(function(a){return a.element.contains(e.target)}),i=r?r.element:null,o=i===e.target,s=null;o||(s=this.beans.focusService.findNextFocusableElement(i,!1,e.shiftKey)),(this.isFullWidth()&&o||!s)&&this.beans.navigationService.onTabKeyDown(this,e)}},t.prototype.onFullWidthRowFocused=function(e){var r,i=this.rowNode,o=e?this.isFullWidth()&&e.rowIndex===i.rowIndex&&e.rowPinned==i.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",o),o&&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 i={list:[],map:{}};return e.list.forEach(function(o){o!==r&&(i.list.push(o),i.map[o.getInstanceId()]=o)}),i},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 i=this.createRowEvent(e,r);return i.source=this,i},t.prototype.onRowDblClick=function(e){if(!tt(e)){var r=this.createRowEventWithSource(g.EVENT_ROW_DOUBLE_CLICKED,e);this.beans.eventService.dispatchEvent(r)}},t.prototype.onRowMouseDown=function(e){if(this.lastMouseDownOnDragger=rr(e.target,"ag-row-drag",3),!!this.isFullWidth()){var r=this.rowNode,i=this.beans.columnModel;this.beans.rangeService&&this.beans.rangeService.removeAllCellRanges(),this.beans.focusService.setFocusedCell({rowIndex:r.rowIndex,column:i.getAllDisplayedColumns()[0],rowPinned:r.rowPinned,forceBrowserFocus:!0})}},t.prototype.onRowClick=function(e){var r=tt(e)||this.lastMouseDownOnDragger;if(!r){var i=this.createRowEventWithSource(g.EVENT_ROW_CLICKED,e);this.beans.eventService.dispatchEvent(i);var o=e.ctrlKey||e.metaKey,s=e.shiftKey,a=this.gridOptionsService.get("groupSelectsChildren");if(!(a&&this.rowNode.group||!this.rowNode.selectable||this.rowNode.rowPinned||!this.gridOptionsService.isRowSelection()||this.gridOptionsService.get("suppressRowClickSelection"))){var l=this.gridOptionsService.get("rowMultiSelectWithClick"),u=!this.gridOptionsService.get("suppressRowDeselection"),c="rowClicked";if(this.rowNode.isSelected())l?this.rowNode.setSelectedParams({newValue:!1,event:e,source:c}):o?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:!o;this.rowNode.setSelectedParams({newValue:!0,clearSelection:p,rangeSelect:s,event:e,source:c})}}}},t.prototype.setupDetailRowAutoHeight=function(e){var r=this;if(this.rowType===Ae.FullWidthDetail&&this.gridOptionsService.get("detailRowAutoHeight")){var i=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)}},o=this.beans.resizeObserverService.observeResize(e,i);this.addDestroyFunc(o),i()}},t.prototype.createFullWidthParams=function(e,r){var i=this,o={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 i.addFullWidthRowDragging(s,a,l,u)}};return o},t.prototype.addFullWidthRowDragging=function(e,r,i,o){if(i===void 0&&(i=""),!!this.isFullWidth()){var s=new ao(function(){return i},this.rowNode,void 0,e,r,o);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,i="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(function(o){o.rowComp.addOrRemoveCssClass(r,!0),o.rowComp.addOrRemoveCssClass(i,!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(i){return i.rowComp.addOrRemoveCssClass("ag-row-first",e)})),this.lastRowOnPage!==r&&(this.lastRowOnPage=r,this.allRowGuis.forEach(function(i){return i.rowComp.addOrRemoveCssClass("ag-row-last",r)}))},t.prototype.stopEditing=function(e){var r,i;if(e===void 0&&(e=!1),!this.stoppingRowEdit){var o=this.getAllCellCtrls(),s=this.editingRow;this.stoppingRowEdit=!0;var a=!1;try{for(var l=yv(o),u=l.next();!u.done;u=l.next()){var c=u.value,p=c.stopEditing(e);s&&!e&&!a&&p&&(a=!0)}}catch(h){r={error:h}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}if(a){var d=this.createRowEvent(g.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(i){return i.rowComp.addOrRemoveCssClass("ag-row-editing",e)});var r=e?this.createRowEvent(g.EVENT_ROW_EDITING_STARTED):this.createRowEvent(g.EVENT_ROW_EDITING_STOPPED);this.beans.eventService.dispatchEvent(r)},t.prototype.startRowEditing=function(e,r,i){if(e===void 0&&(e=null),r===void 0&&(r=null),i===void 0&&(i=null),!this.editingRow){var o=this.getAllCellCtrls().reduce(function(s,a){var l=a===r;return l?a.startEditing(e,l,i):a.startEditing(null,l,i),s?!0:a.isEditing()},!1);o&&this.setEditingRow(!0)}},t.prototype.getAllCellCtrls=function(){if(this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0)return this.centerCellCtrls.list;var e=Cs(Cs(Cs([],ys(this.centerCellCtrls.list),!1),ys(this.leftCellCtrls.list),!1),ys(this.rightCellCtrls.list),!1);return e},t.prototype.postProcessClassesFromGridOptions=function(){var e=this,r=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);!r||!r.length||r.forEach(function(i){e.allRowGuis.forEach(function(o){return o.rowComp.addOrRemoveCssClass(i,!0)})})},t.prototype.postProcessRowClassRules=function(){var e=this;this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,function(r){e.allRowGuis.forEach(function(i){return i.rowComp.addOrRemoveCssClass(r,!0)})},function(r){e.allRowGuis.forEach(function(i){return i.rowComp.addOrRemoveCssClass(r,!1)})})},t.prototype.setStylesFromGridOptions=function(e,r){var i=this;e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(r,function(o){return o.rowComp.setUserStyles(i.rowStyles)})},t.prototype.getPinnedForContainer=function(e){var r=e===de.LEFT?"left":e===de.RIGHT?"right":null;return r},t.prototype.getInitialRowClasses=function(e){var r=this.getPinnedForContainer(e),i={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(i)},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"),i;if(r){var o={data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex};i=r(o)}return i||e?Object.assign({},e,i):this.emptyStyle},t.prototype.onRowSelected=function(e){var r=this,i=!!this.rowNode.isSelected();this.forEachGui(e,function(o){o.rowComp.addOrRemoveCssClass("ag-row-selected",i),Er(o.element,i?!0:void 0);var s=r.createAriaLabel();Rt(o.element,s??"")})},t.prototype.createAriaLabel=function(){var e=this.rowNode.isSelected();if(!(e&&this.gridOptionsService.get("suppressRowDeselection"))){var r=this.beans.localeService.getLocaleTextFunc(),i=r(e?"ariaRowDeselect":"ariaRowSelect","Press SPACE to ".concat(e?"deselect":"select"," this row."));return i}},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,U.EVENT_MOUSE_ENTER,function(){!r.beans.dragService.isDragging()&&!r.gridOptionsService.get("suppressRowHoverHighlight")&&(e.classList.add("ag-row-hover"),r.rowNode.setHovered(!0))}),this.addManagedListener(this.rowNode,U.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(),i=r.getScrollFeature().getVScrollPosition(),o=this.applyPaginationOffset(i.top,!0)-100,s=this.applyPaginationOffset(i.bottom,!0)+100;return Math.min(Math.max(o,e),s)},t.prototype.getFrameworkOverrides=function(){return this.beans.frameworkOverrides},t.prototype.forEachGui=function(e,r){e?r(e):this.allRowGuis.forEach(r)},t.prototype.onRowHeightChanged=function(e){if(this.rowNode.rowHeight!=null){var r=this.rowNode.rowHeight,i=this.beans.environment.getDefaultRowHeight(),o=this.gridOptionsService.isGetRowHeightFunction(),s=o?this.gridOptionsService.getRowHeightForNode(this.rowNode).height:void 0,a=s?"".concat(Math.min(i,s)-2,"px"):void 0;this.forEachGui(e,function(l){l.element.style.height="".concat(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(g.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(i){return i.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0)})}},t.prototype.destroySecondPass=function(){this.allRowGuis.length=0,this.stopEditing();var e=function(r){return r.list.forEach(function(i){return i.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(i){i.rowComp.addOrRemoveCssClass("ag-row-focus",r.rowFocused),i.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 i=this.beans.paginationProxy.getPixelOffset(),o=r?1:-1;return e+i*o},t.prototype.setRowTop=function(e){if(!this.printLayout&&P(e)){var r=this.applyPaginationOffset(e),i=this.rowNode.isRowPinned()||this.rowNode.sticky,o=i?r:this.beans.rowContainerHeightService.getRealPixelPosition(r),s="".concat(o,"px");this.setRowTopStyle(s)}},t.prototype.getInitialRowTop=function(e){var r=this.gridOptionsService.get("suppressRowTransform");return r?this.getInitialRowTopShared(e):void 0},t.prototype.getInitialTransform=function(e){var r=this.gridOptionsService.get("suppressRowTransform");return r?void 0:"translateY(".concat(this.getInitialRowTopShared(e),")")},t.prototype.getInitialRowTopShared=function(e){if(this.printLayout)return"";var r;if(this.isSticky())r=this.rowNode.stickyRowTop;else{var i=this.slideInAnimation[e]?this.roundRowTopToBounds(this.rowNode.oldRowTop):this.rowNode.rowTop,o=this.applyPaginationOffset(i);r=this.rowNode.isRowPinned()?o:this.beans.rowContainerHeightService.getRealPixelPosition(o)}return r+"px"},t.prototype.setRowTopStyle=function(e){var r=this.gridOptionsService.get("suppressRowTransform");this.allRowGuis.forEach(function(i){return r?i.rowComp.setTop(e):i.rowComp.setTransform("translateY(".concat(e,")"))})},t.prototype.getRowNode=function(){return this.rowNode},t.prototype.getCellCtrl=function(e){var r=null;return this.getAllCellCtrls().forEach(function(i){i.getColumn()==e&&(r=i)}),r!=null||this.getAllCellCtrls().forEach(function(i){i.getColSpanningList().indexOf(e)>=0&&(r=i)}),r},t.prototype.onRowIndexChanged=function(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())},t.prototype.getRowIndex=function(){return this.rowNode.getRowIndexString()},t.prototype.updateRowIndexes=function(e){var r=this.rowNode.getRowIndexString(),i=this.beans.headerNavigationService.getHeaderRowCount()+this.beans.filterManager.getHeaderRowCount(),o=this.rowNode.rowIndex%2===0,s=i+this.rowNode.rowIndex+1;this.forEachGui(e,function(a){a.rowComp.setRowIndex(r),a.rowComp.addOrRemoveCssClass("ag-row-even",o),a.rowComp.addOrRemoveCssClass("ag-row-odd",!o),vn(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}(D),mv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),We=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Sv=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},wv=function(n){mv(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=sn("touchstart")?"touchstart":"mousedown",i=["dblclick","contextmenu","mouseover","mouseout","click",r];i.forEach(function(o){var s=e.processMouseEvent.bind(e,o);e.addManagedListener(e.element,o,s)})},t.prototype.processMouseEvent=function(e,r){if(!(!this.mouseEventService.isEventFromThisGrid(r)||tt(r))){var i=this.getRowForEvent(r),o=this.mouseEventService.getRenderedCellForEvent(r);e==="contextmenu"?this.handleContextMenuMouseEvent(r,null,i,o):(o&&o.onMouseEvent(e,r),i&&i.onMouseEvent(e,r))}},t.prototype.mockContextMenuForIPad=function(){var e=this;if(Nt()){var r=new Be(this.element),i=function(o){var s=e.getRowForEvent(o.touchEvent),a=e.mouseEventService.getRenderedCellForEvent(o.touchEvent);e.handleContextMenuMouseEvent(null,o.touchEvent,s,a)};this.addManagedListener(r,Be.EVENT_LONG_TAP,i),this.addDestroyFunc(function(){return r.destroy()})}},t.prototype.getRowForEvent=function(e){for(var r=e.target;r;){var i=this.gridOptionsService.getDomData(r,hr.DOM_DATA_KEY_ROW_CTRL);if(i)return i;r=r.parentElement}return null},t.prototype.handleContextMenuMouseEvent=function(e,r,i,o){var s=i?i.getRowNode():null,a=o?o.getColumn():null,l=null;if(a){var u=e||r;o.dispatchCellContextMenuEvent(u),l=this.valueService.getValue(a,s)}var c=this.ctrlsService.getGridBodyCtrl(),p=o?o.getGui():c.getGridBodyElement();this.contextMenuFactory&&this.contextMenuFactory.onContextMenu(e,r,s,a,l,p)},t.prototype.getControlsForEventTarget=function(e){return{cellCtrl:Hi(this.gridOptionsService,e,dr.DOM_DATA_KEY_CELL_CTRL),rowCtrl:Hi(this.gridOptionsService,e,hr.DOM_DATA_KEY_ROW_CTRL)}},t.prototype.processKeyboardEvent=function(e,r){var i=this.getControlsForEventTarget(r.target),o=i.cellCtrl,s=i.rowCtrl;r.defaultPrevented||(o?this.processCellKeyboardEvent(o,e,r):s&&s.isFullWidth()&&this.processFullWidthRowKeyboardEvent(s,e,r))},t.prototype.processCellKeyboardEvent=function(e,r,i){var o=e.getRowNode(),s=e.getColumn(),a=e.isEditing(),l=!Ji(this.gridOptionsService,i,o,s,a);if(l&&r==="keydown"){var u=!a&&this.navigationService.handlePageScrollingKey(i);u||e.onKeyDown(i),this.doGridOperations(i,e.isEditing()),Xi(i)&&e.processCharacter(i)}if(r==="keydown"){var c=e.createEvent(i,g.EVENT_CELL_KEY_DOWN);this.eventService.dispatchEvent(c)}},t.prototype.processFullWidthRowKeyboardEvent=function(e,r,i){var o=e.getRowNode(),s=this.focusService.getFocusedCell(),a=s&&s.column,l=!Ji(this.gridOptionsService,i,o,a,!1);if(l){var u=i.key;if(r==="keydown")switch(u){case _.PAGE_HOME:case _.PAGE_END:case _.PAGE_UP:case _.PAGE_DOWN:this.navigationService.handlePageScrollingKey(i,!0);break;case _.UP:case _.DOWN:e.onKeyboardNavigate(i);break;case _.TAB:e.onTabKeyDown(i);break}}if(r==="keydown"){var c=e.createRowEvent(g.EVENT_CELL_KEY_DOWN,i);this.eventService.dispatchEvent(c)}},t.prototype.doGridOperations=function(e,r){if(!(!e.ctrlKey&&!e.metaKey)&&!r&&this.mouseEventService.isEventFromThisGrid(e)){var i=fl(e);if(i===_.A)return this.onCtrlAndA(e);if(i===_.C)return this.onCtrlAndC(e);if(i===_.D)return this.onCtrlAndD(e);if(i===_.V)return this.onCtrlAndV(e);if(i===_.X)return this.onCtrlAndX(e);if(i===_.Y)return this.onCtrlAndY();if(i===_.Z)return this.onCtrlAndZ(e)}},t.prototype.onCtrlAndA=function(e){var r=this,i=r.pinnedRowModel,o=r.paginationProxy,s=r.rangeService;if(s&&o.isRowsToRender()){var a=Sv([i.isEmpty("top"),i.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=i.getPinnedBottomRowData().length-1);var h=this.columnModel.getAllDisplayedColumns();if(_e(h))return;s.setCellRange({rowStartIndex:0,rowStartPinned:c,rowEndIndex:d,rowEndPinned:p,columnStart:h[0],columnEnd:Q(h)})}e.preventDefault()},t.prototype.onCtrlAndC=function(e){if(!(!this.clipboardService||this.gridOptionsService.get("enableCellTextSelection"))){var r=this.getControlsForEventTarget(e.target),i=r.cellCtrl,o=r.rowCtrl;i!=null&&i.isEditing()||o!=null&&o.isEditing()||(e.preventDefault(),this.clipboardService.copyToClipboard())}},t.prototype.onCtrlAndX=function(e){if(!(!this.clipboardService||this.gridOptionsService.get("enableCellTextSelection")||this.gridOptionsService.get("suppressCutToClipboard"))){var r=this.getControlsForEventTarget(e.target),i=r.cellCtrl,o=r.rowCtrl;i!=null&&i.isEditing()||o!=null&&o.isEditing()||(e.preventDefault(),this.clipboardService.cutToClipboard(void 0,"ui"))}},t.prototype.onCtrlAndV=function(e){var r=this.getControlsForEventTarget(e.target),i=r.cellCtrl,o=r.rowCtrl;i!=null&&i.isEditing()||o!=null&&o.isEditing()||this.clipboardService&&!this.gridOptionsService.get("suppressClipboardPaste")&&this.clipboardService.pasteFromClipboard()},t.prototype.onCtrlAndD=function(e){this.clipboardService&&!this.gridOptionsService.get("suppressClipboardPaste")&&this.clipboardService.copyRangeDown(),e.preventDefault()},t.prototype.onCtrlAndZ=function(e){this.gridOptionsService.get("undoRedoCellEditing")&&(e.preventDefault(),e.shiftKey?this.undoRedoService.redo("ui"):this.undoRedoService.undo("ui"))},t.prototype.onCtrlAndY=function(){this.undoRedoService.redo("ui")},We([f("mouseEventService")],t.prototype,"mouseEventService",void 0),We([f("valueService")],t.prototype,"valueService",void 0),We([Y("contextMenuFactory")],t.prototype,"contextMenuFactory",void 0),We([f("ctrlsService")],t.prototype,"ctrlsService",void 0),We([f("navigationService")],t.prototype,"navigationService",void 0),We([f("focusService")],t.prototype,"focusService",void 0),We([f("undoRedoService")],t.prototype,"undoRedoService",void 0),We([f("columnModel")],t.prototype,"columnModel",void 0),We([f("paginationProxy")],t.prototype,"paginationProxy",void 0),We([f("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),We([Y("rangeService")],t.prototype,"rangeService",void 0),We([Y("clipboardService")],t.prototype,"clipboardService",void 0),We([b],t.prototype,"postConstruct",null),t}(D),Ev=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),si=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},su=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},au=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},_v=function(n){Ev(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,g.EVENT_SCROLLBAR_WIDTH_CHANGED,this.onScrollbarWidthChanged.bind(this)),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],function(){e.checkViewportAndScrolls()})},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.keepPinnedColumnsNarrowerThanViewport(),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.keepPinnedColumnsNarrowerThanViewport=function(){var e=this.gridBodyCtrl.getBodyViewportElement(),r=ir(e);if(!(isNaN(r)||r<=50)){var i=this.getPinnedColumnsOverflowingViewport(r-50),o=this.gridOptionsService.getCallback("processUnpinnedColumns");if(i.length){if(o){var s={columns:i,viewportWidth:r};i=o(s)}this.columnModel.setColumnsPinned(i,null,"viewportSizeFeature")}}},t.prototype.getPinnedColumnsOverflowingViewport=function(e){var r=this.pinnedWidthService.getPinnedRightWidth(),i=this.pinnedWidthService.getPinnedLeftWidth(),o=r+i;if(o<e)return[];for(var s=au([],su(this.columnModel.getDisplayedLeftColumns()),!1),a=au([],su(this.columnModel.getDisplayedRightColumns()),!1),l=0,u=0,c=0,p=[],d=o-c-e;(u<s.length||l<a.length)&&d>0;){if(l<a.length){var h=a[l++];d-=h.getActualWidth(),p.push(h)}if(u<s.length&&d>0){var h=s[u++];d-=h.getActualWidth(),p.push(h)}}return p},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=zr(e);if(this.bodyHeight!==r){this.bodyHeight=r;var i={type:g.EVENT_BODY_HEIGHT_CHANGED};this.eventService.dispatchEvent(i)}},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)},si([f("ctrlsService")],t.prototype,"ctrlsService",void 0),si([f("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),si([f("columnModel")],t.prototype,"columnModel",void 0),si([f("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),si([b],t.prototype,"postConstruct",null),t}(D),Rv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),lu=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Ov=function(n){Rv(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,g.EVENT_LEFT_PINNED_WIDTH_CHANGED,this.onPinnedLeftWidthChanged.bind(this))},t.prototype.onPinnedLeftWidthChanged=function(){var e=this.pinnedWidthService.getPinnedLeftWidth(),r=e>0;q(this.element,r),qe(this.element,e)},t.prototype.getWidth=function(){return this.pinnedWidthService.getPinnedLeftWidth()},lu([f("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),lu([b],t.prototype,"postConstruct",null),t}(D),Tv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),uu=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Pv=function(n){Tv(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,g.EVENT_RIGHT_PINNED_WIDTH_CHANGED,this.onPinnedRightWidthChanged.bind(this))},t.prototype.onPinnedRightWidthChanged=function(){var e=this.pinnedWidthService.getPinnedRightWidth(),r=e>0;q(this.element,r),qe(this.element,e)},t.prototype.getWidth=function(){return this.pinnedWidthService.getPinnedRightWidth()},uu([f("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),uu([b],t.prototype,"postConstruct",null),t}(D),Dv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),cu=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},pu=function(n){Dv(t,n);function t(e,r){var i=n.call(this)||this;return i.eContainer=e,i.eViewport=r,i}return t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,g.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onHeightChanged.bind(this))},t.prototype.onHeightChanged=function(){var e=this.maxDivHeightScaler.getUiContainerHeight(),r=e!=null?"".concat(e,"px"):"";this.eContainer.style.height=r,this.eViewport&&(this.eViewport.style.height=r)},cu([f("rowContainerHeightService")],t.prototype,"maxDivHeightScaler",void 0),cu([b],t.prototype,"postConstruct",null),t}(D),Av=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),ms=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},bv=function(n){Av(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(!V(this.rangeService)){this.params={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.addManagedPropertyListener("enableRangeSelection",function(i){var o=i.currentValue;if(o){e.enableFeature();return}e.disableFeature()}),this.addDestroyFunc(function(){return e.disableFeature()});var r=this.gridOptionsService.get("enableRangeSelection");r&&this.enableFeature()}},t.prototype.enableFeature=function(){this.dragService.addDragSource(this.params)},t.prototype.disableFeature=function(){this.dragService.removeDragSource(this.params)},ms([Y("rangeService")],t.prototype,"rangeService",void 0),ms([f("dragService")],t.prototype,"dragService",void 0),ms([b],t.prototype,"postConstruct",null),t}(D),Fv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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 i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},ws=function(n){Fv(t,n);function t(e,r){r===void 0&&(r=!1);var i=n.call(this)||this;return i.callback=e,i.addSpacer=r,i}return t.prototype.postConstruct=function(){var e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_LEFT_PINNED_WIDTH_CHANGED,e),this.addSpacer&&(this.addManagedListener(this.eventService,g.EVENT_RIGHT_PINNED_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_SCROLL_VISIBILITY_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_SCROLLBAR_WIDTH_CHANGED,e)),this.setWidth()},t.prototype.setWidth=function(){var e=this.columnModel,r=this.gridOptionsService.isDomLayout("print"),i=e.getBodyContainerWidth(),o=e.getDisplayedColumnsLeftWidth(),s=e.getDisplayedColumnsRightWidth(),a;if(r)a=i+o+s;else if(a=i,this.addSpacer){var l=this.gridOptionsService.get("enableRtl")?o:s;l===0&&this.scrollVisibleService.isVerticalScrollShowing()&&(a+=this.gridOptionsService.getScrollbarWidth())}this.callback(a)},Ss([f("columnModel")],t.prototype,"columnModel",void 0),Ss([f("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),Ss([b],t.prototype,"postConstruct",null),t}(D),Lv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),kt=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},vo=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},go=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},O;(function(n){n.LEFT="left",n.RIGHT="right",n.CENTER="center",n.FULL_WIDTH="fullWidth",n.TOP_LEFT="topLeft",n.TOP_RIGHT="topRight",n.TOP_CENTER="topCenter",n.TOP_FULL_WIDTH="topFullWidth",n.STICKY_TOP_LEFT="stickyTopLeft",n.STICKY_TOP_RIGHT="stickyTopRight",n.STICKY_TOP_CENTER="stickyTopCenter",n.STICKY_TOP_FULL_WIDTH="stickyTopFullWidth",n.BOTTOM_LEFT="bottomLeft",n.BOTTOM_RIGHT="bottomRight",n.BOTTOM_CENTER="bottomCenter",n.BOTTOM_FULL_WIDTH="bottomFullWidth"})(O||(O={}));var de;(function(n){n.LEFT="left",n.RIGHT="right",n.CENTER="center",n.FULL_WIDTH="fullWidth"})(de||(de={}));function Iv(n){switch(n){case O.CENTER:case O.TOP_CENTER:case O.STICKY_TOP_CENTER:case O.BOTTOM_CENTER:return de.CENTER;case O.LEFT:case O.TOP_LEFT:case O.STICKY_TOP_LEFT:case O.BOTTOM_LEFT:return de.LEFT;case O.RIGHT:case O.TOP_RIGHT:case O.STICKY_TOP_RIGHT:case O.BOTTOM_RIGHT:return de.RIGHT;case O.FULL_WIDTH:case O.TOP_FULL_WIDTH:case O.STICKY_TOP_FULL_WIDTH:case O.BOTTOM_FULL_WIDTH:return de.FULL_WIDTH;default:throw Error("Invalid Row Container Type")}}var xv=It([[O.CENTER,"ag-center-cols-container"],[O.LEFT,"ag-pinned-left-cols-container"],[O.RIGHT,"ag-pinned-right-cols-container"],[O.FULL_WIDTH,"ag-full-width-container"],[O.TOP_CENTER,"ag-floating-top-container"],[O.TOP_LEFT,"ag-pinned-left-floating-top"],[O.TOP_RIGHT,"ag-pinned-right-floating-top"],[O.TOP_FULL_WIDTH,"ag-floating-top-full-width-container"],[O.STICKY_TOP_CENTER,"ag-sticky-top-container"],[O.STICKY_TOP_LEFT,"ag-pinned-left-sticky-top"],[O.STICKY_TOP_RIGHT,"ag-pinned-right-sticky-top"],[O.STICKY_TOP_FULL_WIDTH,"ag-sticky-top-full-width-container"],[O.BOTTOM_CENTER,"ag-floating-bottom-container"],[O.BOTTOM_LEFT,"ag-pinned-left-floating-bottom"],[O.BOTTOM_RIGHT,"ag-pinned-right-floating-bottom"],[O.BOTTOM_FULL_WIDTH,"ag-floating-bottom-full-width-container"]]),Mv=It([[O.CENTER,"ag-center-cols-viewport"],[O.TOP_CENTER,"ag-floating-top-viewport"],[O.STICKY_TOP_CENTER,"ag-sticky-top-viewport"],[O.BOTTOM_CENTER,"ag-floating-bottom-viewport"]]),du=function(n){Lv(t,n);function t(e){var r=n.call(this)||this;return r.visible=!0,r.EMPTY_CTRLS=[],r.name=e,r.isFullWithContainer=r.name===O.TOP_FULL_WIDTH||r.name===O.STICKY_TOP_FULL_WIDTH||r.name===O.BOTTOM_FULL_WIDTH||r.name===O.FULL_WIDTH,r}return t.getRowContainerCssClasses=function(e){var r=xv.get(e),i=Mv.get(e);return{container:r,viewport:i}},t.getPinned=function(e){switch(e){case O.BOTTOM_LEFT:case O.TOP_LEFT:case O.STICKY_TOP_LEFT:case O.LEFT:return"left";case O.BOTTOM_RIGHT:case O.TOP_RIGHT:case O.STICKY_TOP_RIGHT:case O.RIGHT:return"right";default:return null}},t.prototype.postConstruct=function(){var e=this;this.enableRtl=this.gridOptionsService.get("enableRtl"),this.forContainers([O.CENTER],function(){return e.viewportSizeFeature=e.createManagedBean(new _v(e))})},t.prototype.registerWithCtrlsService=function(){switch(this.name){case O.CENTER:this.ctrlsService.registerCenterRowContainerCtrl(this);break;case O.LEFT:this.ctrlsService.registerLeftRowContainerCtrl(this);break;case O.RIGHT:this.ctrlsService.registerRightRowContainerCtrl(this);break;case O.TOP_CENTER:this.ctrlsService.registerTopCenterRowContainerCtrl(this);break;case O.TOP_LEFT:this.ctrlsService.registerTopLeftRowContainerCon(this);break;case O.TOP_RIGHT:this.ctrlsService.registerTopRightRowContainerCtrl(this);break;case O.STICKY_TOP_CENTER:this.ctrlsService.registerStickyTopCenterRowContainerCtrl(this);break;case O.STICKY_TOP_LEFT:this.ctrlsService.registerStickyTopLeftRowContainerCon(this);break;case O.STICKY_TOP_RIGHT:this.ctrlsService.registerStickyTopRightRowContainerCtrl(this);break;case O.BOTTOM_CENTER:this.ctrlsService.registerBottomCenterRowContainerCtrl(this);break;case O.BOTTOM_LEFT:this.ctrlsService.registerBottomLeftRowContainerCtrl(this);break;case O.BOTTOM_RIGHT:this.ctrlsService.registerBottomRightRowContainerCtrl(this);break}},t.prototype.forContainers=function(e,r){e.indexOf(this.name)>=0&&r()},t.prototype.getContainerElement=function(){return this.eContainer},t.prototype.getViewportSizeFeature=function(){return this.viewportSizeFeature},t.prototype.setComp=function(e,r,i){var o=this;this.comp=e,this.eContainer=r,this.eViewport=i,this.createManagedBean(new wv(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder(),this.stopHScrollOnPinnedRows();var s=[O.TOP_CENTER,O.TOP_LEFT,O.TOP_RIGHT],a=[O.STICKY_TOP_CENTER,O.STICKY_TOP_LEFT,O.STICKY_TOP_RIGHT],l=[O.BOTTOM_CENTER,O.BOTTOM_LEFT,O.BOTTOM_RIGHT],u=[O.CENTER,O.LEFT,O.RIGHT],c=go(go(go(go([],vo(s),!1),vo(l),!1),vo(u),!1),vo(a),!1),p=[O.CENTER,O.LEFT,O.RIGHT,O.FULL_WIDTH],d=[O.CENTER,O.TOP_CENTER,O.STICKY_TOP_CENTER,O.BOTTOM_CENTER],h=[O.LEFT,O.BOTTOM_LEFT,O.TOP_LEFT,O.STICKY_TOP_LEFT],v=[O.RIGHT,O.BOTTOM_RIGHT,O.TOP_RIGHT,O.STICKY_TOP_RIGHT];this.forContainers(h,function(){o.pinnedWidthFeature=o.createManagedBean(new Ov(o.eContainer)),o.addManagedListener(o.eventService,g.EVENT_LEFT_PINNED_WIDTH_CHANGED,function(){return o.onPinnedWidthChanged()})}),this.forContainers(v,function(){o.pinnedWidthFeature=o.createManagedBean(new Pv(o.eContainer)),o.addManagedListener(o.eventService,g.EVENT_RIGHT_PINNED_WIDTH_CHANGED,function(){return o.onPinnedWidthChanged()})}),this.forContainers(p,function(){return o.createManagedBean(new pu(o.eContainer,o.name===O.CENTER?i:void 0))}),this.forContainers(c,function(){return o.createManagedBean(new bv(o.eContainer))}),this.forContainers(d,function(){return o.createManagedBean(new ws(function(y){return o.comp.setContainerWidth("".concat(y,"px"))}))}),this.addListeners(),this.registerWithCtrlsService()},t.prototype.addListeners=function(){var e=this;this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,function(){return e.onDisplayedColumnsChanged()}),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,function(){return e.onDisplayedColumnsWidthChanged()}),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_ROWS_CHANGED,function(r){return e.onDisplayedRowsChanged(r.afterScroll)}),this.onDisplayedColumnsChanged(),this.onDisplayedColumnsWidthChanged(),this.onDisplayedRowsChanged()},t.prototype.listenOnDomOrder=function(){var e=this,r=[O.STICKY_TOP_CENTER,O.STICKY_TOP_LEFT,O.STICKY_TOP_RIGHT,O.STICKY_TOP_FULL_WIDTH],i=r.indexOf(this.name)>=0;if(i){this.comp.setDomOrder(!0);return}var o=function(){var s=e.gridOptionsService.get("ensureDomOrder"),a=e.gridOptionsService.isDomLayout("print");e.comp.setDomOrder(s||a)};this.addManagedPropertyListener("domLayout",o),o()},t.prototype.stopHScrollOnPinnedRows=function(){var e=this;this.forContainers([O.TOP_CENTER,O.STICKY_TOP_CENTER,O.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([O.CENTER],function(){return e.onHorizontalViewportChanged()})},t.prototype.onDisplayedColumnsWidthChanged=function(){var e=this;this.forContainers([O.CENTER],function(){return e.onHorizontalViewportChanged()})},t.prototype.addPreventScrollWhileDragging=function(){var e=this,r=function(i){e.dragService.isDragging()&&i.cancelable&&i.preventDefault()};this.eContainer.addEventListener("touchmove",r,{passive:!1}),this.addDestroyFunc(function(){return e.eContainer.removeEventListener("touchmove",r)})},t.prototype.onHorizontalViewportChanged=function(e){e===void 0&&(e=!1);var r=this.getCenterWidth(),i=this.getCenterViewportScrollLeft();this.columnModel.setViewportPosition(r,i,e)},t.prototype.getCenterWidth=function(){return ir(this.eViewport)},t.prototype.getCenterViewportScrollLeft=function(){return Yr(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 Te(this.eViewport)},t.prototype.getViewportScrollLeft=function(){return Yr(this.eViewport,this.enableRtl)},t.prototype.isHorizontalScrollShowing=function(){var e=this.gridOptionsService.get("alwaysShowHorizontalScroll");return e||al(this.eViewport)},t.prototype.getViewportElement=function(){return this.eViewport},t.prototype.setContainerTranslateX=function(e){this.eContainer.style.transform="translateX(".concat(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){qr(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())},t.prototype.onDisplayedRowsChanged=function(e){var r=this;if(e===void 0&&(e=!1),this.visible){var i=this.gridOptionsService.isDomLayout("print"),o=this.gridOptionsService.get("embedFullWidthRows"),s=o||i,a=function(u){var c=u.isFullWidth(),p=r.isFullWithContainer?!s&&c:s||!c;return p},l=this.getRowCtrls().filter(a);this.comp.setRowCtrls(l,e)}else this.comp.setRowCtrls(this.EMPTY_CTRLS,!1)},t.prototype.getRowCtrls=function(){switch(this.name){case O.TOP_CENTER:case O.TOP_LEFT:case O.TOP_RIGHT:case O.TOP_FULL_WIDTH:return this.rowRenderer.getTopRowCtrls();case O.STICKY_TOP_CENTER:case O.STICKY_TOP_LEFT:case O.STICKY_TOP_RIGHT:case O.STICKY_TOP_FULL_WIDTH:return this.rowRenderer.getStickyTopRowCtrls();case O.BOTTOM_CENTER:case O.BOTTOM_LEFT:case O.BOTTOM_RIGHT:case O.BOTTOM_FULL_WIDTH:return this.rowRenderer.getBottomRowCtrls();default:return this.rowRenderer.getCentreRowCtrls()}},kt([f("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),kt([f("dragService")],t.prototype,"dragService",void 0),kt([f("ctrlsService")],t.prototype,"ctrlsService",void 0),kt([f("columnModel")],t.prototype,"columnModel",void 0),kt([f("resizeObserverService")],t.prototype,"resizeObserverService",void 0),kt([f("animationFrameService")],t.prototype,"animationFrameService",void 0),kt([f("rowRenderer")],t.prototype,"rowRenderer",void 0),kt([b],t.prototype,"postConstruct",null),t}(D),Nv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Tt=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Gv=`<div class="ag-root ag-unselectable" role="treegrid">
|
||
<ag-header-root ref="gridHeader"></ag-header-root>
|
||
<div class="ag-floating-top" ref="eTop" role="presentation">
|
||
<ag-row-container ref="topLeftContainer" name="`.concat(O.TOP_LEFT,`"></ag-row-container>
|
||
<ag-row-container ref="topCenterContainer" name="`).concat(O.TOP_CENTER,`"></ag-row-container>
|
||
<ag-row-container ref="topRightContainer" name="`).concat(O.TOP_RIGHT,`"></ag-row-container>
|
||
<ag-row-container ref="topFullWidthContainer" name="`).concat(O.TOP_FULL_WIDTH,`"></ag-row-container>
|
||
</div>
|
||
<div class="ag-body" ref="eBody" role="presentation">
|
||
<div class="ag-body-viewport" ref="eBodyViewport" role="presentation">
|
||
<ag-row-container ref="leftContainer" name="`).concat(O.LEFT,`"></ag-row-container>
|
||
<ag-row-container ref="centerContainer" name="`).concat(O.CENTER,`"></ag-row-container>
|
||
<ag-row-container ref="rightContainer" name="`).concat(O.RIGHT,`"></ag-row-container>
|
||
<ag-row-container ref="fullWidthContainer" name="`).concat(O.FULL_WIDTH,`"></ag-row-container>
|
||
</div>
|
||
<ag-fake-vertical-scroll></ag-fake-vertical-scroll>
|
||
</div>
|
||
<div class="ag-sticky-top" ref="eStickyTop" role="presentation">
|
||
<ag-row-container ref="stickyTopLeftContainer" name="`).concat(O.STICKY_TOP_LEFT,`"></ag-row-container>
|
||
<ag-row-container ref="stickyTopCenterContainer" name="`).concat(O.STICKY_TOP_CENTER,`"></ag-row-container>
|
||
<ag-row-container ref="stickyTopRightContainer" name="`).concat(O.STICKY_TOP_RIGHT,`"></ag-row-container>
|
||
<ag-row-container ref="stickyTopFullWidthContainer" name="`).concat(O.STICKY_TOP_FULL_WIDTH,`"></ag-row-container>
|
||
</div>
|
||
<div class="ag-floating-bottom" ref="eBottom" role="presentation">
|
||
<ag-row-container ref="bottomLeftContainer" name="`).concat(O.BOTTOM_LEFT,`"></ag-row-container>
|
||
<ag-row-container ref="bottomCenterContainer" name="`).concat(O.BOTTOM_CENTER,`"></ag-row-container>
|
||
<ag-row-container ref="bottomRightContainer" name="`).concat(O.BOTTOM_RIGHT,`"></ag-row-container>
|
||
<ag-row-container ref="bottomFullWidthContainer" name="`).concat(O.BOTTOM_FULL_WIDTH,`"></ag-row-container>
|
||
</div>
|
||
<ag-fake-horizontal-scroll></ag-fake-horizontal-scroll>
|
||
<ag-overlay-wrapper></ag-overlay-wrapper>
|
||
</div>`),Vv=function(n){Nv(t,n);function t(){return n.call(this,Gv)||this}return t.prototype.init=function(){var e=this,r=function(o,s){var a="".concat(o,"px");s.style.minHeight=a,s.style.height=a},i={setRowAnimationCssOnBodyViewport:function(o,s){return e.setRowAnimationCssOnBodyViewport(o,s)},setColumnCount:function(o){return Ya(e.getGui(),o)},setRowCount:function(o){return Ka(e.getGui(),o)},setTopHeight:function(o){return r(o,e.eTop)},setBottomHeight:function(o){return r(o,e.eBottom)},setTopDisplay:function(o){return e.eTop.style.display=o},setBottomDisplay:function(o){return e.eBottom.style.display=o},setStickyTopHeight:function(o){return e.eStickyTop.style.height=o},setStickyTopTop:function(o){return e.eStickyTop.style.top=o},setStickyTopWidth:function(o){return e.eStickyTop.style.width=o},setColumnMovingCss:function(o,s){return e.addOrRemoveCssClass(o,s)},updateLayoutClasses:function(o,s){var a=[e.eBodyViewport.classList,e.eBody.classList];a.forEach(function(l){l.toggle(ue.AUTO_HEIGHT,s.autoHeight),l.toggle(ue.NORMAL,s.normal),l.toggle(ue.PRINT,s.print)}),e.addOrRemoveCssClass(ue.AUTO_HEIGHT,s.autoHeight),e.addOrRemoveCssClass(ue.NORMAL,s.normal),e.addOrRemoveCssClass(ue.PRINT,s.print)},setAlwaysVerticalScrollClass:function(o,s){return e.eBodyViewport.classList.toggle(ou,s)},registerBodyViewportResizeListener:function(o){var s=e.resizeObserverService.observeResize(e.eBodyViewport,o);e.addDestroyFunc(function(){return s()})},setPinnedTopBottomOverflowY:function(o){return e.eTop.style.overflowY=e.eBottom.style.overflowY=o},setCellSelectableCss:function(o,s){[e.eTop,e.eBodyViewport,e.eBottom].forEach(function(a){return a.classList.toggle(o,s)})},setBodyViewportWidth:function(o){return e.eBodyViewport.style.width=o}};this.ctrl=this.createManagedBean(new If),this.ctrl.setComp(i,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop),(this.rangeService&&this.gridOptionsService.get("enableRangeSelection")||this.gridOptionsService.get("rowSelection")==="multiple")&&$a(this.getGui(),!0)},t.prototype.setRowAnimationCssOnBodyViewport=function(e,r){var i=this.eBodyViewport.classList;i.toggle(Fr.ANIMATION_ON,r),i.toggle(Fr.ANIMATION_OFF,!r)},t.prototype.getFloatingTopBottom=function(){return[this.eTop,this.eBottom]},Tt([f("resizeObserverService")],t.prototype,"resizeObserverService",void 0),Tt([Y("rangeService")],t.prototype,"rangeService",void 0),Tt([L("eBodyViewport")],t.prototype,"eBodyViewport",void 0),Tt([L("eStickyTop")],t.prototype,"eStickyTop",void 0),Tt([L("eTop")],t.prototype,"eTop",void 0),Tt([L("eBottom")],t.prototype,"eBottom",void 0),Tt([L("gridHeader")],t.prototype,"headerRootComp",void 0),Tt([L("eBody")],t.prototype,"eBody",void 0),Tt([b],t.prototype,"init",null),t}(W),Hv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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 i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Bv=function(n){Hv(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.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 i={type:g.EVENT_SCROLL_VISIBILITY_CHANGED};this.eventService.dispatchEvent(i)}},t.prototype.isHorizontalScrollShowing=function(){return this.horizontalScrollShowing},t.prototype.isVerticalScrollShowing=function(){return this.verticalScrollShowing},Es([f("ctrlsService")],t.prototype,"ctrlsService",void 0),Es([b],t.prototype,"postConstruct",null),t=Es([I("scrollVisibleService")],t),t}(D),kv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),hu=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Wv=function(n){kv(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 Hi(this.gridOptionsService,r.target,dr.DOM_DATA_KEY_CELL_CTRL)},t.prototype.isEventFromThisGrid=function(r){var i=this.isElementInThisGrid(r.target);return i},t.prototype.isElementInThisGrid=function(r){for(var i=r;i;){var o=i[e.GRID_DOM_KEY];if(P(o)){var s=o===this.gridInstanceId;return s}i=i.parentElement}return!1},t.prototype.getCellPositionForEvent=function(r){var i=this.getRenderedCellForEvent(r);return i?i.getCellPosition():null},t.prototype.getNormalisedPosition=function(r){var i=this.gridOptionsService.isDomLayout("normal"),o=r,s,a;if(o.clientX!=null||o.clientY!=null?(s=o.clientX,a=o.clientY):(s=o.x,a=o.y),i){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 Tr,t.GRID_DOM_KEY="__ag_grid_instance",hu([f("ctrlsService")],t.prototype,"ctrlsService",void 0),t=e=hu([I("mouseEventService")],t),t}(D),jv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),yo=function(){return yo=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},yo.apply(this,arguments)},be=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Uv=function(n){jv(t,n);function t(){var e=n.call(this)||this;return e.onPageDown=Zo(e.onPageDown,100),e.onPageUp=Zo(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 i=e.key,o=e.altKey,s=e.ctrlKey||e.metaKey,a=!!this.rangeService&&e.shiftKey,l=this.mouseEventService.getCellPositionForEvent(e),u=!1;switch(i){case _.PAGE_HOME:case _.PAGE_END:!s&&!o&&(this.onHomeOrEndKey(i),u=!0);break;case _.LEFT:case _.RIGHT:case _.UP:case _.DOWN:if(!l)return!1;s&&!o&&!a&&(this.onCtrlUpDownLeftRight(i,l),u=!0);break;case _.PAGE_DOWN:case _.PAGE_UP:!s&&!o&&(u=this.handlePageUpDown(i,l,r));break}return u&&e.preventDefault(),u},t.prototype.handlePageUpDown=function(e,r,i){return i&&(r=this.focusService.getFocusedCell()),r?(e===_.PAGE_UP?this.onPageUp(r):this.onPageDown(r),!0):!1},t.prototype.navigateTo=function(e){var r=e.scrollIndex,i=e.scrollType,o=e.scrollColumn,s=e.focusIndex,a=e.focusColumn;if(P(o)&&!o.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(o),P(r)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(r,i),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(),i=r.getScrollFeature().getVScrollPosition(),o=this.getViewportHeight(),s=this.paginationProxy.getPixelOffset(),a=i.top+o,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(),i=r.getScrollFeature().getVScrollPosition(),o=this.paginationProxy.getPixelOffset(),s=i.top,a=this.paginationProxy.getRowIndexAtPixel(s+o);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,a,!0):this.navigateToNextPage(e,a,!0)},t.prototype.navigateToNextPage=function(e,r,i){i===void 0&&(i=!1);var o=this.getViewportHeight(),s=this.paginationProxy.getPageFirstRow(),a=this.paginationProxy.getPageLastRow(),l=this.paginationProxy.getPixelOffset(),u=this.paginationProxy.getRow(e.rowIndex),c=i?(u==null?void 0:u.rowHeight)-o-l:o-l,p=(u==null?void 0:u.rowTop)+c,d=this.paginationProxy.getRowIndexAtPixel(p+l);if(d===e.rowIndex){var h=i?-1:1;r=d=e.rowIndex+h}var v;i?(v="bottom",d<s&&(d=s),r<s&&(r=s)):(v="top",d>a&&(d=a),r>a&&(r=a)),this.isRowTallerThanView(d)&&(r=d,v="top"),this.navigateTo({scrollIndex:r,scrollType:v,scrollColumn:null,focusIndex:d,focusColumn:e.column})},t.prototype.navigateToNextPageWithAutoHeight=function(e,r,i){var o=this;i===void 0&&(i=!1),this.navigateTo({scrollIndex:r,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:r,focusColumn:e.column}),setTimeout(function(){var s=o.getNextFocusIndexForAutoHeight(e,i);o.navigateTo({scrollIndex:r,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:s,focusColumn:e.column,isAsync:!0})},50)},t.prototype.getNextFocusIndexForAutoHeight=function(e,r){var i;r===void 0&&(r=!1);for(var o=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=(i=c.rowHeight)!==null&&i!==void 0?i:0;if(l+p>s)break;l+=p}u+=o}return Math.max(0,Math.min(u,a))},t.prototype.getViewportHeight=function(){var e=this.ctrlsService.getGridBodyCtrl(),r=e.getScrollFeature().getVScrollPosition(),i=this.gridOptionsService.getScrollbarWidth(),o=r.bottom-r.top;return this.ctrlsService.getCenterRowContainerCtrl().isHorizontalScrollShowing()&&(o-=i),o},t.prototype.isRowTallerThanView=function(e){var r=this.paginationProxy.getRow(e);if(!r)return!1;var i=r.rowHeight;return typeof i!="number"?!1:i>this.getViewportHeight()},t.prototype.onCtrlUpDownLeftRight=function(e,r){var i=this.cellNavigationService.getNextCellToFocus(e,r,!0),o=i.rowIndex,s=i.column;this.navigateTo({scrollIndex:o,scrollType:null,scrollColumn:s,focusIndex:o,focusColumn:s})},t.prototype.onHomeOrEndKey=function(e){var r=e===_.PAGE_HOME,i=this.columnModel.getAllDisplayedColumns(),o=r?i[0]:Q(i),s=r?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow();this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:o,focusIndex:s,focusColumn:o})},t.prototype.onTabKeyDown=function(e,r){var i=r.shiftKey,o=this.tabToNextCellCommon(e,i,r);if(o){r.preventDefault();return}if(i){var s=e.getRowPosition(),a=s.rowIndex,l=s.rowPinned,u=l?a===0:a===this.paginationProxy.getPageFirstRow();u&&(this.gridOptionsService.get("headerHeight")===0?this.focusService.focusNextGridCoreContainer(!0,!0):(r.preventDefault(),this.focusService.focusPreviousFromFirstCell(r)))}else e instanceof dr&&e.focusCell(!0),this.focusService.focusNextGridCoreContainer(i)&&r.preventDefault()},t.prototype.tabToNextCell=function(e,r){var i=this.focusService.getFocusedCell();if(!i)return!1;var o=this.getCellByPosition(i);return!o&&(o=this.rowRenderer.getRowByPosition(i),!o||!o.isFullWidth())?!1:this.tabToNextCellCommon(o,e,r)},t.prototype.tabToNextCellCommon=function(e,r,i){var o=e.isEditing();if(!o&&e instanceof dr){var s=e,a=s.getRowCtrl();a&&(o=a.isEditing())}var l;return o?this.gridOptionsService.get("editType")==="fullRow"?l=this.moveToNextEditingRow(e,r,i):l=this.moveToNextEditingCell(e,r,i):l=this.moveToNextCellNotEditing(e,r),l||!!this.focusService.getFocusedHeader()},t.prototype.moveToNextEditingCell=function(e,r,i){i===void 0&&(i=null);var o=e.getCellPosition();e.getGui().focus(),e.stopEditing();var s=this.findNextCellToFocusOn(o,r,!0);return s==null?!1:(s.startEditing(null,!0,i),s.focusCell(!1),!0)},t.prototype.moveToNextEditingRow=function(e,r,i){i===void 0&&(i=null);var o=e.getCellPosition(),s=this.findNextCellToFocusOn(o,r,!0);if(s==null)return!1;var a=s.getCellPosition(),l=this.isCellEditable(o),u=this.isCellEditable(a),c=a&&o.rowIndex===a.rowIndex&&o.rowPinned===a.rowPinned;if(l&&e.setFocusOutOnEditor(),!c){var p=e.getRowCtrl();p.stopEditing();var d=s.getRowCtrl();d.startRowEditing(void 0,void 0,i)}return u?(s.setFocusInOnEditor(),s.focusCell()):s.focusCell(!0),!0},t.prototype.moveToNextCellNotEditing=function(e,r){var i=this.columnModel.getAllDisplayedColumns(),o;e instanceof hr?o=yo(yo({},e.getRowPosition()),{column:r?i[0]:Q(i)}):o=e.getCellPosition();var s=this.findNextCellToFocusOn(o,r,!1);if(s instanceof dr)s.focusCell(!0);else if(s)return this.tryToFocusFullWidthRow(s.getRowPosition(),r);return P(s)},t.prototype.findNextCellToFocusOn=function(e,r,i){for(var o=e;;){e!==o&&(e=o),r||(o=this.getLastCellOfColSpan(o)),o=this.cellNavigationService.getNextTabbedCell(o,r);var s=this.gridOptionsService.getCallback("tabToNextCell");if(P(s)){var a={backwards:r,editing:i,previousCellPosition:e,nextCellPosition:o||null},l=s(a);P(l)?(l.floating&&(B("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),l.rowPinned=l.floating),o={rowIndex:l.rowIndex,column:l.column,rowPinned:l.rowPinned}):o=null}if(!o)return null;if(o.rowIndex<0){var u=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:u+o.rowIndex,column:o.column},fromCell:!0}),null}var c=this.gridOptionsService.get("editType")==="fullRow";if(i&&!c){var p=this.isCellEditable(o);if(!p)continue}this.ensureCellVisible(o);var d=this.getCellByPosition(o);if(!d){var h=this.rowRenderer.getRowByPosition(o);if(!h||!h.isFullWidth()||i)continue;return h}if(!d.isSuppressNavigable())return this.rangeService&&this.rangeService.setRangeToCell(o),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,i,o){for(var s=i,a=!1;s&&(s===i||!this.isValidNavigateCell(s));)this.gridOptionsService.get("enableRtl")?r===_.LEFT&&(s=this.getLastCellOfColSpan(s)):r===_.RIGHT&&(s=this.getLastCellOfColSpan(s)),s=this.cellNavigationService.getNextCellToFocus(r,s),a=V(s);if(a&&e&&e.key===_.UP&&(s={rowIndex:-1,rowPinned:null,column:i.column}),o){var l=this.gridOptionsService.getCallback("navigateToNextCell");if(P(l)){var u={key:r,previousCellPosition:i,nextCellPosition:s||null,event:e},c=l(u);P(c)?(c.floating&&(B("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),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:i.column},event:e||void 0,fromCell:!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 i=this.columnModel.getAllDisplayedColumns(),o=this.rowRenderer.getRowByPosition(e);if(!o||!o.isFullWidth())return!1;var s=this.focusService.getFocusedCell(),a={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(r?Q(i):i[0])};this.focusPosition(a);var l=s!=null?this.rowPositionUtils.before(a,s):!1,u={type:g.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 i=r.getColSpanningList();return i.length===1?e:{rowIndex:e.rowIndex,column:Q(i),rowPinned:e.rowPinned}},t.prototype.ensureCellVisible=function(e){var r=this.gridOptionsService.isGroupRowsSticky(),i=this.rowModel.getRow(e.rowIndex),o=r&&(i==null?void 0:i.sticky);!o&&V(e.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(e.column)},be([f("mouseEventService")],t.prototype,"mouseEventService",void 0),be([f("paginationProxy")],t.prototype,"paginationProxy",void 0),be([f("focusService")],t.prototype,"focusService",void 0),be([Y("rangeService")],t.prototype,"rangeService",void 0),be([f("columnModel")],t.prototype,"columnModel",void 0),be([f("rowModel")],t.prototype,"rowModel",void 0),be([f("ctrlsService")],t.prototype,"ctrlsService",void 0),be([f("rowRenderer")],t.prototype,"rowRenderer",void 0),be([f("headerNavigationService")],t.prototype,"headerNavigationService",void 0),be([f("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),be([f("cellNavigationService")],t.prototype,"cellNavigationService",void 0),be([f("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),be([b],t.prototype,"postConstruct",null),t=be([I("navigationService")],t),t}(D),zv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),$v=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Kv=function(n){zv(t,n);function t(e){var r=n.call(this,'<div class="ag-popup-editor" tabindex="-1"/>')||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(),i=this.params,o=function(s){Ji(e.gridOptionsService,s,i.node,i.column,!0)||i.onKeyDown(s)};this.addManagedListener(r,"keydown",o)},t.DOM_KEY_POPUP_EDITOR_WRAPPER="popupEditorWrapper",$v([b],t.prototype,"postConstruct",null),t}(lr),Yv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),qv=function(n){Yv(t,n);function t(e,r,i,o,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=o,a.cellCtrl=r,a.setTemplate('<div comp-id="'.concat(a.getCompId(),'"/>'));var l=a.getGui();a.forceWrapper=r.isForceWrapper(),a.refreshWrapper(!1);var u=function(d,h){h!=null&&h!=""?l.setAttribute(d,h):l.removeAttribute(d)};pe(l,r.getCellAriaRole()),u("col-id",r.getColumnIdSanitised());var c=r.getTabIndex();c!==void 0&&u("tabindex",c.toString());var p={addOrRemoveCssClass:function(d,h){return a.addOrRemoveCssClass(d,h)},setUserStyles:function(d){return kn(l,d)},getFocusableElement:function(){return a.getFocusableElement()},setIncludeSelection:function(d){return a.includeSelection=d},setIncludeRowDrag:function(d){return a.includeRowDrag=d},setIncludeDndSource:function(d){return a.includeDndSource=d},setRenderDetails:function(d,h,v){return a.setRenderDetails(d,h,v)},setEditDetails:function(d,h,v){return a.setEditDetails(d,h,v)},getCellEditor:function(){return a.cellEditor||null},getCellRenderer:function(){return a.cellRenderer||null},getParentOfValue:function(){return a.getParentOfValue()}};return r.setComp(p,a.getGui(),a.eCellWrapper,i,s),a}return t.prototype.getParentOfValue=function(){return this.eCellValue?this.eCellValue:this.eCellWrapper?this.eCellWrapper:this.getGui()},t.prototype.setRenderDetails=function(e,r,i){var o=this.cellEditor&&!this.cellEditorPopupWrapper;if(!o){this.firstRender=this.firstRender==null;var s=this.refreshWrapper(!1);if(this.refreshEditStyles(!1),e){var a=i||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,i){e?this.createCellEditorInstance(e,r,i):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,i=r||this.forceWrapper,o=i&&this.eCellWrapper==null;o&&(this.eCellWrapper=ge('<div class="ag-cell-wrapper" role="presentation"></div>'),this.getGui().appendChild(this.eCellWrapper));var s=!i&&this.eCellWrapper!=null;s&&(Ot(this.eCellWrapper),this.eCellWrapper=void 0),this.addOrRemoveCssClass("ag-cell-value",!i);var a=!e&&i,l=a&&this.eCellValue==null;l&&(this.eCellValue=ge('<span class="ag-cell-value" role="presentation"></span>'),this.eCellWrapper.appendChild(this.eCellValue));var u=!a&&this.eCellValue!=null;u&&(Ot(this.eCellValue),this.eCellValue=void 0);var c=o||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,i){var o=this,s=this.editorVersion,a=e.newAgStackInstance();if(a){var l=e.params;a.then(function(c){return o.afterCellEditorCreated(s,c,l,r,i)});var u=V(this.cellEditor);u&&l.cellStartedEdit&&this.cellCtrl.focusCell(!0)}},t.prototype.insertValueWithoutCellRenderer=function(e){var r=this.getParentOfValue();he(r);var i=e!=null?se(e):null;i!=null&&(r.innerHTML=i)},t.prototype.destroyEditorAndRenderer=function(){this.destroyRenderer(),this.destroyEditor()},t.prototype.destroyRenderer=function(){var e=this.beans.context;this.cellRenderer=e.destroyBean(this.cellRenderer),Ot(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),Ot(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,i=this.beans.gridOptionsService.get("suppressAnimationFrame"),o=!i,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)}};o&&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,i){var o=!this.isAlive()||e!==this.rendererVersion;if(o){this.beans.context.destroyBean(i);return}if(this.cellRenderer=i,this.cellRendererClass=r,this.cellRendererGui=this.cellRenderer.getGui(),this.cellRendererGui!=null){var s=this.getParentOfValue();he(s),s.appendChild(this.cellRendererGui)}},t.prototype.afterCellEditorCreated=function(e,r,i,o,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 ".concat(this.column.getId()," is missing getGui() method")),this.beans.context.destroyBean(r);return}this.cellEditor=r,this.cellEditorGui=r.getGui();var u=o||r.isPopup!==void 0&&r.isPopup();u?this.addPopupCellEditor(i,s):this.addInCellEditor(),this.refreshEditStyles(!0,u),r.afterGuiAttached&&r.afterGuiAttached()},t.prototype.refreshEditStyles=function(e,r){var i;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),(i=this.rowCtrl)===null||i===void 0||i.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 i=this.getParentOfValue();i.appendChild(this.cellEditorGui)}},t.prototype.addPopupCellEditor=function(e,r){var i=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 o=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(new Kv(e));var s=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&s.appendChild(this.cellEditorGui);var a=this.beans.popupService,l=this.beans.gridOptionsService.get("stopEditingWhenCellsLoseFocus"),u=r??(o.getPopupPosition?o.getPopupPosition():"over"),c=this.beans.gridOptionsService.get("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),h=this.beans.localeService.getLocaleTextFunc(),v=a.addPopup({modal:l,eChild:s,closeOnEsc:!0,closedCallback:function(){i.cellCtrl.onPopupEditorClosed()},anchorToElement:this.getGui(),positionCallback:d,ariaLabel:h("ariaLabelCellEditor","Cell Editor")});v&&(this.hideEditorPopup=v.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)&&Ki()&&e.focus({preventScroll:!0}),he(this.getParentOfValue())},t}(W),Qv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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){Qv(t,n);function t(e,r,i){var o=n.call(this)||this;o.cellComps={},o.beans=r,o.rowCtrl=e,o.setTemplate('<div comp-id="'.concat(o.getCompId(),'" style="').concat(o.getInitialStyle(i),'"/>'));var s=o.getGui(),a=s.style;o.domOrder=o.rowCtrl.getDomOrder(),pe(s,"row");var l=o.rowCtrl.getTabIndex();l!=null&&s.setAttribute("tabindex",l.toString());var u={setDomOrder:function(c){return o.domOrder=c},setCellCtrls:function(c){return o.setCellCtrls(c)},showFullWidth:function(c){return o.showFullWidth(c)},getFullWidthCellRenderer:function(){return o.getFullWidthCellRenderer()},addOrRemoveCssClass:function(c,p){return o.addOrRemoveCssClass(c,p)},setUserStyles:function(c){return kn(s,c)},setTop:function(c){return a.top=c},setTransform:function(c){return a.transform=c},setRowIndex:function(c){return s.setAttribute("row-index",c)},setRowId:function(c){return s.setAttribute("row-id",c)},setRowBusinessKey:function(c){return s.setAttribute("row-business-key",c)}};return e.setComp(u,o.getGui(),i),o.addDestroyFunc(function(){e.unsetComp(i)}),o}return t.prototype.getInitialStyle=function(e){var r=this.rowCtrl.getInitialTransform(e),i=this.rowCtrl.getInitialRowTop(e);return r?"transform: ".concat(r):"top: ".concat(i)},t.prototype.showFullWidth=function(e){var r=this,i=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)},o=e.newAgStackInstance();o&&o.then(i)},t.prototype.setCellCtrls=function(e){var r=this,i=Object.assign({},this.cellComps);e.forEach(function(s){var a=s.getInstanceId(),l=r.cellComps[a];l==null?r.newCellComp(s):i[a]=null});var o=Ft(i).filter(function(s){return s!=null});this.destroyCells(o),this.ensureDomOrder(e)},t.prototype.ensureDomOrder=function(e){var r=this;if(this.domOrder){var i=[];e.forEach(function(o){var s=r.cellComps[o.getInstanceId()];s&&i.push(s.getGui())}),Bn(this.getGui(),i)}},t.prototype.newCellComp=function(e){var r=new qv(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=Ft(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(i){if(i){var o=i.getCtrl().getInstanceId();r.cellComps[o]===i&&(i.detach(),i.destroy(),r.cellComps[o]=null)}})},t}(W),Jv=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),_s=function(){return _s=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},_s.apply(this,arguments)},ai=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o};function Zv(){var n=W.elementGettingCreated.getAttribute("name"),t=du.getRowContainerCssClasses(n),e,r=n===O.CENTER||n===O.TOP_CENTER||n===O.STICKY_TOP_CENTER||n===O.BOTTOM_CENTER;return r?e='<div class="'.concat(t.viewport,`" ref="eViewport" role="presentation">
|
||
<div class="`).concat(t.container,`" ref="eContainer"></div>
|
||
</div>`):e='<div class="'.concat(t.container,'" ref="eContainer"></div>'),e}var eg=function(n){Jv(t,n);function t(){var e=n.call(this,Zv())||this;return e.rowComps={},e.name=W.elementGettingCreated.getAttribute("name"),e.type=Iv(e.name),e}return t.prototype.postConstruct=function(){var e=this,r={setViewportHeight:function(o){return e.eViewport.style.height=o},setRowCtrls:function(o){return e.setRowCtrls(o)},setDomOrder:function(o){e.domOrder=o},setContainerWidth:function(o){return e.eContainer.style.width=o}},i=this.createManagedBean(new du(this.name));i.setComp(r,this.eContainer,this.eViewport)},t.prototype.preDestroy=function(){this.setRowCtrls([])},t.prototype.setRowCtrls=function(e){var r=this,i=_s({},this.rowComps);this.rowComps={},this.lastPlacedElement=null;var o=function(s){var a=s.getInstanceId(),l=i[a];if(l)r.rowComps[a]=l,delete i[a],r.ensureDomOrder(l.getGui());else{if(!s.getRowNode().displayed)return;var u=new Xv(s,r.beans,r.type);r.rowComps[a]=u,r.appendRow(u.getGui())}};e.forEach(o),Ft(i).forEach(function(s){r.eContainer.removeChild(s.getGui()),s.destroy()}),pe(this.eContainer,e.length?"rowgroup":"presentation")},t.prototype.appendRow=function(e){this.domOrder?sl(this.eContainer,e,this.lastPlacedElement):this.eContainer.appendChild(e),this.lastPlacedElement=e},t.prototype.ensureDomOrder=function(e){this.domOrder&&(Hn(this.eContainer,e,this.lastPlacedElement),this.lastPlacedElement=e)},ai([f("beans")],t.prototype,"beans",void 0),ai([L("eViewport")],t.prototype,"eViewport",void 0),ai([L("eContainer")],t.prototype,"eContainer",void 0),ai([b],t.prototype,"postConstruct",null),ai([Se],t.prototype,"preDestroy",null),t}(W),fu=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},tg=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.get("functionsReadOnly")){var r=t.dragItem.columns;r&&r.forEach(function(i){i.isPrimary()&&(i.isAnyFunctionActive()||(i.isAllowValue()?e.columnsToAggregate.push(i):i.isAllowRowGroup()?e.columnsToGroup.push(i):i.isAllowPivot()&&e.columnsToPivot.push(i)))})}},n.prototype.getIconName=function(){var t=this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length;return t>0?this.pinned?fe.ICON_PINNED:fe.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")},fu([f("columnModel")],n.prototype,"columnModel",void 0),fu([f("gridOptionsService")],n.prototype,"gridOptionsService",void 0),n}(),rg=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},fr=function(){function n(){}return n.attemptMoveColumns=function(t){var e=t.isFromHeader,r=t.hDirection,i=t.xPosition,o=t.fromEnter,s=t.fakeEvent,a=t.pinned,l=t.gridOptionsService,u=t.columnModel,c=r===we.Left,p=r===we.Right,d=t.allMovingColumns;if(e){var h=[];d.forEach(function(N){for(var j,ee=null,ie=N.getParent();ie!=null&&ie.getDisplayedLeafColumns().length===1;)ee=ie,ie=ie.getParent();if(ee!=null){var J=!!(!((j=ee.getColGroupDef())===null||j===void 0)&&j.marryChildren),te=J?ee.getProvidedColumnGroup().getLeafColumns():ee.getLeafColumns();te.forEach(function(X){h.includes(X)||h.push(X)})}else h.includes(N)||h.push(N)}),d=h}var v=d.slice();u.sortColumnsLikeGridColumns(v);var y=this.calculateValidMoves({movingCols:v,draggingRight:p,xPosition:i,pinned:a,gridOptionsService:l,columnModel:u}),C=this.calculateOldIndex(v,u);if(y.length!==0){var m=y[0],w=C!==null&&!o;if(e&&(w=C!==null),!(w&&!s&&(c&&m>=C||p&&m<=C))){for(var E=u.getAllDisplayedColumns(),S=[],R=null,T=0;T<y.length;T++){var F=y[T],A=u.getProposedColumnOrder(v,F);if(u.doesOrderPassRules(A)){var x=A.filter(function(N){return E.includes(N)});if(R===null)R=x;else if(!_t(x,R))break;var G=this.groupFragCount(A);S.push({move:F,fragCount:G})}}if(S.length!==0)return S.sort(function(N,j){return N.fragCount-j.fragCount}),this.moveColumns(d,S[0].move,"uiColumnMoved",!1,u)}}},n.moveColumns=function(t,e,r,i,o){return o.moveColumns(t,e,r,i),i?null:{columns:t,toIndex:e}},n.calculateOldIndex=function(t,e){var r=e.getAllGridColumns(),i=_a(t.map(function(u){return r.indexOf(u)})),o=i[0],s=Q(i),a=s-o,l=a!==i.length-1;return l?null:o},n.groupFragCount=function(t){function e(s){for(var a=[],l=s.getOriginalParent();l!=null;)a.push(l),l=l.getOriginalParent();return a}for(var r=0,i=function(s){var a,l=e(t[s]),u=e(t[s+1]);a=rg(l.length>u.length?[l,u]:[u,l],2),l=a[0],u=a[1],l.forEach(function(c){u.indexOf(c)===-1&&r++})},o=0;o<t.length-1;o++)i(o);return r},n.calculateValidMoves=function(t){var e=t.movingCols,r=t.draggingRight,i=t.xPosition,o=t.pinned,s=t.gridOptionsService,a=t.columnModel,l=s.get("suppressMovableColumns")||e.some(function(N){return N.getColDef().suppressMovable});if(l)return[];var u=a.getDisplayedColumns(o),c=a.getAllGridColumns(),p=u.filter(function(N){return $e(e,N)}),d=u.filter(function(N){return!$e(e,N)}),h=c.filter(function(N){return!$e(e,N)}),v=0,y=i;if(r){var C=0;p.forEach(function(N){return C+=N.getActualWidth()}),y-=C}if(y>0){for(var m=0;m<d.length;m++){var w=d[m];if(y-=w.getActualWidth(),y<0)break;v++}r&&v++}var E;if(v>0){var S=d[v-1];E=h.indexOf(S)+1}else E=h.indexOf(d[0]),E===-1&&(E=0);var R=[E],T=function(N,j){return N-j};if(r){for(var F=E+1,A=c.length-1;F<=A;)R.push(F),F++;R.sort(T)}else{for(var F=E,A=c.length-1,x=c[F];F<=A&&u.indexOf(x)<0;)F++,R.push(F),x=c[F];F=E-1;for(var G=0;F>=G;)R.push(F),F--;R.sort(T).reverse()}return R},n.normaliseX=function(t,e,r,i,o){var s=o.getHeaderRowContainerCtrl(e).getViewport();if(r&&(t-=s.getBoundingClientRect().left),i.get("enableRtl")){var a=s.clientWidth;t=a-t}return e==null&&(t+=o.getCenterRowContainerCtrl().getCenterViewportScrollLeft()),t},n}(),li=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},ig=function(){function n(t,e){this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.pinned=t,this.eContainer=e,this.centerContainer=!P(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?fe.ICON_PINNED:fe.ICON_MOVE},n.prototype.onDragEnter=function(t){var e=t.dragItem.columns,r=t.dragSource.type===Pe.ToolPanel;if(r)this.setColumnsVisible(e,!0,"uiColumnDragged");else{var i=t.dragItem.visibleState,o=(e||[]).filter(function(s){return i[s.getId()]});this.setColumnsVisible(o,!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 i=t.filter(function(o){return!o.getColDef().lockVisible});this.columnModel.setColumnsVisible(i,e,r)}},n.prototype.setColumnsPinned=function(t,e,r){if(r===void 0&&(r="api"),t){var i=t.filter(function(o){return!o.getColDef().lockPinned});this.columnModel.setColumnsPinned(i,e,r)}},n.prototype.onDragStop=function(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null},n.prototype.checkCenterForScrolling=function(t){if(this.centerContainer){var e=this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft(),r=e+this.ctrlsService.getCenterRowContainerCtrl().getCenterWidth();this.gridOptionsService.get("enableRtl")?(this.needToMoveRight=t<e+50,this.needToMoveLeft=t>r-50):(this.needToMoveLeft=t<e+50,this.needToMoveRight=t>r-50),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}},n.prototype.onDragging=function(t,e,r,i){var o=this,s;if(t===void 0&&(t=this.lastDraggingEvent),e===void 0&&(e=!1),r===void 0&&(r=!1),i===void 0&&(i=!1),i){if(this.lastMovedInfo){var a=this.lastMovedInfo,l=a.columns,u=a.toIndex;fr.moveColumns(l,u,"uiColumnMoved",!0,this.columnModel)}return}if(this.lastDraggingEvent=t,!V(t.hDirection)){var c=fr.normaliseX(t.x,this.pinned,!1,this.gridOptionsService,this.ctrlsService);e||this.checkCenterForScrolling(c);var p=this.normaliseDirection(t.hDirection),d=t.dragSource.type,h=((s=t.dragSource.getDragItem().columns)===null||s===void 0?void 0:s.filter(function(y){return y.getColDef().lockPinned?y.getPinned()==o.pinned:!0}))||[],v=fr.attemptMoveColumns({allMovingColumns:h,isFromHeader:d===Pe.HeaderCell,hDirection:p,xPosition:c,pinned:this.pinned,fromEnter:e,fakeEvent:r,gridOptionsService:this.gridOptionsService,columnModel:this.columnModel});v&&(this.lastMovedInfo=v)}},n.prototype.normaliseDirection=function(t){if(this.gridOptionsService.get("enableRtl"))switch(t){case we.Left:return we.Right;case we.Right:return we.Left;default:console.error("AG Grid: Unknown direction ".concat(t))}else return t},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(fe.ICON_LEFT,!0):this.dragAndDropService.setGhostIcon(fe.ICON_RIGHT,!0))},n.prototype.ensureIntervalCleared=function(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.dragAndDropService.setGhostIcon(fe.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 i=this.lastDraggingEvent.dragItem.columns,o=i.filter(function(a){return!a.getColDef().lockPinned});if(o.length>0&&(this.dragAndDropService.setGhostIcon(fe.ICON_PINNED),this.failedMoveAttempts>7)){var s=this.needToMoveLeft?"left":"right";this.setColumnsPinned(o,s,"uiColumnDragged"),this.dragAndDropService.nudge()}}},li([f("columnModel")],n.prototype,"columnModel",void 0),li([f("dragAndDropService")],n.prototype,"dragAndDropService",void 0),li([f("gridOptionsService")],n.prototype,"gridOptionsService",void 0),li([f("ctrlsService")],n.prototype,"ctrlsService",void 0),li([b],n.prototype,"init",null),n}(),og=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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 i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},ng=function(n){og(t,n);function t(e,r){var i=n.call(this)||this;return i.pinned=e,i.eContainer=r,i}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===Pe.HeaderCell||e===Pe.ToolPanel&&this.gridOptionsService.get("allowDragFromColumnsToolPanel")},t.prototype.getSecondaryContainers=function(){return this.eSecondaryContainers},t.prototype.getContainer=function(){return this.eContainer},t.prototype.init=function(){this.moveColumnFeature=this.createManagedBean(new ig(this.pinned,this.eContainer)),this.bodyDropPivotTarget=this.createManagedBean(new tg(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===Pe.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)},ui([f("dragAndDropService")],t.prototype,"dragAndDropService",void 0),ui([f("columnModel")],t.prototype,"columnModel",void 0),ui([f("ctrlsService")],t.prototype,"ctrlsService",void 0),ui([b],t.prototype,"postConstruct",null),ui([b],t.prototype,"init",null),t}(D),sg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Co=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},ag=function(n){sg(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(),i=function(a,l){l!=null&&l!=""?r.setAttribute(a,l):r.removeAttribute(a)};i("col-id",this.column.getColId());var o={setWidth:function(a){return r.style.width=a},addOrRemoveCssClass:function(a,l){return e.addOrRemoveCssClass(a,l)},setAriaDescription:function(a){return ja(r,a)},setAriaSort:function(a){return a?Qa(r,a):Xa(r)},setUserCompDetails:function(a){return e.setUserCompDetails(a)},getUserCompInstance:function(){return e.headerComp}};this.ctrl.setComp(o,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 i=this.headerCompVersion;e.newAgStackInstance().then(function(o){return r.afterCompCreated(i,o)})},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=`<div class="ag-header-cell" role="columnheader" tabindex="-1">
|
||
<div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>
|
||
<div ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>
|
||
</div>`,Co([L("eResize")],t.prototype,"eResize",void 0),Co([L("eHeaderCompWrapper")],t.prototype,"eHeaderCompWrapper",void 0),Co([b],t.prototype,"postConstruct",null),Co([Se],t.prototype,"destroyHeaderComp",null),t}(hs),lg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Rs=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},ug=function(n){lg(t,n);function t(e){return n.call(this,t.TEMPLATE,e)||this}return t.prototype.postConstruct=function(){var e=this,r=this.getGui(),i=function(s,a){return a!=null?r.setAttribute(s,a):r.removeAttribute(s)};r.setAttribute("col-id",this.ctrl.getColId());var o={addOrRemoveCssClass:function(s,a){return e.addOrRemoveCssClass(s,a)},setResizableDisplayed:function(s){return q(e.eResize,s)},setWidth:function(s){return r.style.width=s},setAriaExpanded:function(s){return i("aria-expanded",s)},setUserCompDetails:function(s){return e.setUserCompDetails(s)},getUserCompInstance:function(){return e.headerGroupComp}};this.ctrl.setComp(o,r,this.eResize)},t.prototype.setUserCompDetails=function(e){var r=this;e.newAgStackInstance().then(function(i){return r.afterHeaderCompCreated(i)})},t.prototype.afterHeaderCompCreated=function(e){var r=this,i=function(){return r.destroyBean(e)};if(!this.isAlive()){i();return}var o=this.getGui(),s=e.getGui();o.appendChild(s),this.addDestroyFunc(i),this.headerGroupComp=e,this.ctrl.setDragSource(o)},t.TEMPLATE=`<div class="ag-header-group-cell" role="columnheader" tabindex="-1">
|
||
<div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>
|
||
</div>`,Rs([f("userComponentFactory")],t.prototype,"userComponentFactory",void 0),Rs([L("eResize")],t.prototype,"eResize",void 0),Rs([b],t.prototype,"postConstruct",null),t}(hs),cg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),vu=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},ye;(function(n){n.COLUMN_GROUP="group",n.COLUMN="column",n.FLOATING_FILTER="filter"})(ye||(ye={}));var pg=function(n){cg(t,n);function t(e){var r=n.call(this)||this;return r.headerComps={},r.ctrl=e,r.setTemplate('<div class="'.concat(r.ctrl.getHeaderRowClass(),'" role="row"></div>')),r}return t.prototype.init=function(){var e=this;this.getGui().style.transform=this.ctrl.getTransform(),vn(this.getGui(),this.ctrl.getAriaRowIndex());var r={setHeight:function(i){return e.getGui().style.height=i},setTop:function(i){return e.getGui().style.top=i},setHeaderCtrls:function(i,o){return e.setHeaderCtrls(i,o)},setWidth:function(i){return e.getGui().style.width=i}};this.ctrl.setComp(r)},t.prototype.destroyHeaderCtrls=function(){this.setHeaderCtrls([],!1)},t.prototype.setHeaderCtrls=function(e,r){var i=this;if(this.isAlive()){var o=this.headerComps;if(this.headerComps={},e.forEach(function(l){var u=l.getInstanceId(),c=o[u];delete o[u],c==null&&(c=i.createHeaderComp(l),i.getGui().appendChild(c.getGui())),i.headerComps[u]=c}),Ce(o,function(l,u){i.getGui().removeChild(u.getGui()),i.destroyBean(u)}),r){var s=Ft(this.headerComps);s.sort(function(l,u){var c=l.getCtrl().getColumnGroupChild().getLeft(),p=u.getCtrl().getColumnGroupChild().getLeft();return c-p});var a=s.map(function(l){return l.getGui()});Bn(this.getGui(),a)}}},t.prototype.createHeaderComp=function(e){var r;switch(this.ctrl.getType()){case ye.COLUMN_GROUP:r=new ug(e);break;case ye.FLOATING_FILTER:r=new wf(e);break;default:r=new ag(e);break}return this.createBean(r),r.setParentComponent(this),r},vu([b],t.prototype,"init",null),vu([Se],t.prototype,"destroyHeaderCtrls",null),t}(W),dg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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 i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},hg=0,mo=function(n){dg(t,n);function t(e,r){var i=n.call(this)||this;return i.resizeToggleTimeout=0,i.resizeMultiplier=1,i.resizeFeature=null,i.lastFocusEvent=null,i.dragSource=null,i.columnGroupChild=e,i.parentRowCtrl=r,i.instanceId=e.getUniqueId()+"-"+hg++,i}return t.prototype.shouldStopEventPropagation=function(e){var r=this.focusService.getFocusedHeader(),i=r.headerRowIndex,o=r.column;return hl(this.gridOptionsService,e,i,o)},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(),this.addManagedListener(this.beans.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onDisplayedColumnsChanged()},t.prototype.onDisplayedColumnsChanged=function(){!this.comp||!this.column||(this.refreshFirstAndLastStyles(),this.refreshAriaColIndex())},t.prototype.refreshFirstAndLastStyles=function(){var e=this,r=e.comp,i=e.column,o=e.beans;ho.refreshFirstAndLastStyles(r,i,o.columnModel)},t.prototype.refreshAriaColIndex=function(){var e=this,r=e.beans,i=e.column,o=r.columnModel.getAriaColumnIndex(i);gn(this.eGui,o)},t.prototype.addResizeAndMoveKeyboardListeners=function(){this.resizeFeature&&(this.addManagedListener(this.eGui,"keydown",this.onGuiKeyDown.bind(this)),this.addManagedListener(this.eGui,"keyup",this.onGuiKeyUp.bind(this)))},t.prototype.onGuiKeyDown=function(e){var r,i=this.gridOptionsService.getDocument(),o=i.activeElement,s=e.key===_.LEFT||e.key===_.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),!(o!==this.eGui||!e.shiftKey&&!e.altKey)&&((this.isResizing||s)&&(e.preventDefault(),e.stopImmediatePropagation()),!!s)){var a=e.key===_.LEFT!==this.gridOptionsService.get("enableRtl"),l=we[a?"Left":"Right"];e.altKey?(this.isResizing=!0,this.resizeMultiplier+=1,this.resizeHeader(l,e.shiftKey),(r=this.resizeFeature)===null||r===void 0||r.toggleColumnResizing(!0)):this.moveHeader(l)}},t.prototype.onGuiKeyUp=function(){var e=this;this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=setTimeout(function(){var r;(r=e.resizeFeature)===null||r===void 0||r.toggleColumnResizing(!1)},150))},t.prototype.handleKeyDown=function(e){var r=this.getWrapperHasFocus();switch(e.key){case _.PAGE_DOWN:case _.PAGE_UP:case _.PAGE_HOME:case _.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.prototype.removeDragSource=function(){this.dragSource&&(this.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null)},t.prototype.destroy=function(){n.prototype.destroy.call(this),this.removeDragSource(),this.comp=null,this.column=null,this.resizeFeature=null,this.lastFocusEvent=null,this.columnGroupChild=null,this.parentRowCtrl=null,this.eGui=null},t.DOM_DATA_KEY_HEADER_CTRL="headerCtrl",ci([f("focusService")],t.prototype,"focusService",void 0),ci([f("beans")],t.prototype,"beans",void 0),ci([f("userComponentFactory")],t.prototype,"userComponentFactory",void 0),ci([f("ctrlsService")],t.prototype,"ctrlsService",void 0),ci([f("dragAndDropService")],t.prototype,"dragAndDropService",void 0),t}(D),fg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),vg=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Os=function(n){fg(t,n);function t(e,r,i,o){var s=n.call(this)||this;return s.columnOrGroup=e,s.eCell=r,s.ariaEl=s.eCell.querySelector("[role=columnheader]")||s.eCell,s.colsSpanning=o,s.beans=i,s}return t.prototype.setColsSpanning=function(e){this.colsSpanning=e,this.onLeftChanged()},t.prototype.getColumnOrGroup=function(){return this.beans.gridOptionsService.get("enableRtl")&&this.colsSpanning?Q(this.colsSpanning):this.columnOrGroup},t.prototype.postConstruct=function(){this.addManagedListener(this.columnOrGroup,Z.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.setLeftFirstTime(),this.addManagedListener(this.eventService,g.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.get("suppressColumnMoveAnimation"),r=P(this.columnOrGroup.getOldLeft()),i=this.beans.columnAnimationService.isActive()&&r&&!e;i?this.animateInLeft():this.onLeftChanged()},t.prototype.animateInLeft=function(){var e=this,r=this.getColumnOrGroup(),i=r.getLeft(),o=r.getOldLeft(),s=this.modifyLeftForPrintLayout(r,o),a=this.modifyLeftForPrintLayout(r,i);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 i=this.beans.gridOptionsService.isDomLayout("print");if(!i||e.getPinned()==="left")return r;var o=this.beans.columnModel.getDisplayedColumnsLeftWidth();if(e.getPinned()==="right"){var s=this.beans.columnModel.getBodyContainerWidth();return o+s+r}return o+r},t.prototype.setLeft=function(e){if(P(e)&&(this.eCell.style.left="".concat(e,"px")),this.columnOrGroup instanceof Z)this.columnOrGroup;else{var r=this.columnOrGroup,i=r.getLeafColumns();if(!i.length)return;i.length>1&&qa(this.ariaEl,i.length),i[0]}},vg([b],t.prototype,"postConstruct",null),t}(D),gg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),gu=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Ts=function(n){gg(t,n);function t(e,r){var i=n.call(this)||this;return i.columns=e,i.element=r,i}return t.prototype.postConstruct=function(){this.gridOptionsService.get("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)},gu([f("columnHoverService")],t.prototype,"columnHoverService",void 0),gu([b],t.prototype,"postConstruct",null),t}(D),yg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Ps=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Cg=function(n){yg(t,n);function t(e,r){var i=n.call(this,e,r)||this;return i.iconCreated=!1,i.column=e,i}return t.prototype.setComp=function(e,r,i,o){this.comp=e,this.eButtonShowMainFilter=i,this.eFloatingFilterBody=o,this.setGui(r),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,Z.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this))},t.prototype.resizeHeader=function(){},t.prototype.moveHeader=function(){},t.prototype.setupActive=function(){var e=this.column.getColDef(),r=!!e.filter,i=!!e.floatingFilter;this.active=r&&i},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=ne("filter",this.gridOptionsService,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}},t.prototype.setupFocus=function(){this.createManagedBean(new Vt(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();Rt(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))},t.prototype.onTabKeyDown=function(e){var r=this.gridOptionsService.getDocument(),i=r.activeElement,o=i===this.eGui;if(!o){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,i=this.column;do if(i=e?r.getDisplayedColBefore(i):r.getDisplayedColAfter(i),!i)break;while(!i.getColDef().filter||!i.getColDef().floatingFilter);return i},t.prototype.handleKeyDown=function(e){n.prototype.handleKeyDown.call(this,e);var r=this.getWrapperHasFocus();switch(e.key){case _.UP:case _.DOWN:r||e.preventDefault();case _.LEFT:case _.RIGHT:if(r)return;e.stopPropagation();case _.ENTER:r&&this.focusService.focusInto(this.eGui)&&e.preventDefault();break;case _.ESCAPE:r||this.eGui.focus()}},t.prototype.onFocusIn=function(e){var r=this.eGui.contains(e.relatedTarget);if(!r){var i=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),o=!!e.relatedTarget&&rr(e.relatedTarget,"ag-floating-filter");if(i&&o&&e.target===this.eGui){var s=this.lastFocusEvent,a=!!(s&&s.key===_.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 Ts([this.column],this.eGui));var r=function(){if(e.gridOptionsService.get("columnHoverHighlight")){var i=e.columnHoverService.isHovered(e.column);e.comp.addOrRemoveCssClass("ag-column-hover",i)}};this.addManagedListener(this.eventService,g.EVENT_COLUMN_HOVER_CHANGED,r),r()},t.prototype.setupLeft=function(){var e=new Os(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(i){var o=e.comp.getFloatingFilterComp();o&&o.then(function(s){if(s){var a=e.filterManager.getCurrentFloatingFilterParentModel(e.column);s.onParentModelChanged(a,i)}})};this.destroySyncListener=this.addManagedListener(this.column,Z.EVENT_FILTER_CHANGED,r),this.filterManager.isFilterActive(this.column)&&r(null)}},t.prototype.setupWidth=function(){var e=this,r=function(){var i="".concat(e.column.getActualWidth(),"px");e.comp.setWidth(i)};this.addManagedListener(this.column,Z.EVENT_WIDTH_CHANGED,r),r()},t.prototype.setupFilterChangedListener=function(){this.active&&(this.destroyFilterChangedListener=this.addManagedListener(this.column,Z.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,i,o=this.active;this.setupActive();var s=!o&&this.active;o&&!this.active&&((r=this.destroySyncListener)===null||r===void 0||r.call(this),(i=this.destroyFilterChangedListener)===null||i===void 0||i.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||e.filterManager.areFilterCompsDifferent((c=e.userCompDetails)!==null&&c!==void 0?c:null,a)?e.updateCompDetails(a,s):e.updateFloatingFilterParams(a)})},t.prototype.updateCompDetails=function(e,r){this.setCompDetails(e),this.setupFilterButton(),this.setupUi(),r&&(this.setupSyncWithFilter(),this.setupFilterChangedListener())},t.prototype.updateFloatingFilterParams=function(e){var r;if(e){var i=e.params;(r=this.comp.getFloatingFilterComp())===null||r===void 0||r.then(function(o){o!=null&&o.onParamsUpdated&&typeof o.onParamsUpdated=="function"&&o.onParamsUpdated(i)})}},t.prototype.destroy=function(){n.prototype.destroy.call(this),this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.destroySyncListener=null,this.destroyFilterChangedListener=null},Ps([f("filterManager")],t.prototype,"filterManager",void 0),Ps([f("columnHoverService")],t.prototype,"columnHoverService",void 0),Ps([f("menuFactory")],t.prototype,"menuFactory",void 0),t}(mo),mg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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 i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Sg=function(n){mg(t,n);function t(e,r,i,o,s){var a=n.call(this)||this;return a.pinned=e,a.column=r,a.eResize=i,a.comp=o,a.ctrl=s,a}return t.prototype.postConstruct=function(){var e=this,r=[],i,o,s=function(){if(q(e.eResize,i),!!i){var u=e.horizontalResizeService.addResizeBar({eResizeBar:e.eResize,onResizeStart:e.onResizeStart.bind(e),onResizing:e.onResizing.bind(e,!1),onResizeEnd:e.onResizing.bind(e,!0)});if(r.push(u),o){var c=e.gridOptionsService.get("skipHeaderOnAutoSize"),p=function(){e.columnModel.autoSizeColumn(e.column,c,"uiColumnResized")};e.eResize.addEventListener("dblclick",p);var d=new Be(e.eResize);d.addEventListener(Be.EVENT_DOUBLE_TAP,p),r.push(function(){e.eResize.removeEventListener("dblclick",p),d.removeEventListener(Be.EVENT_DOUBLE_TAP,p),d.destroy()})}}},a=function(){r.forEach(function(u){return u()}),r.length=0},l=function(){var u=e.column.isResizable(),c=!e.gridOptionsService.get("suppressAutoSize")&&!e.column.getColDef().suppressAutoSize,p=u!==i||c!==o;p&&(i=u,o=c,a(),s())};l(),this.addDestroyFunc(a),this.ctrl.addRefreshFunction(l)},t.prototype.onResizing=function(e,r){var i=this,o=i.column,s=i.lastResizeAmount,a=i.resizeStartWidth,l=this.normaliseResizeAmount(r),u=a+l,c=[{key:o,newWidth:u}];if(this.column.getPinned()){var p=this.pinnedWidthService.getPinnedLeftWidth(),d=this.pinnedWidthService.getPinnedRightWidth(),h=ir(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50;if(p+d+(l-s)>h)return}this.lastResizeAmount=l,this.columnModel.setColumnWidths(c,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)},t.prototype.onResizeStart=function(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)},t.prototype.toggleColumnResizing=function(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)},t.prototype.normaliseResizeAmount=function(e){var r=e,i=this.pinned!=="left",o=this.pinned==="right";return this.gridOptionsService.get("enableRtl")?i&&(r*=-1):o&&(r*=-1),r},pi([f("horizontalResizeService")],t.prototype,"horizontalResizeService",void 0),pi([f("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),pi([f("ctrlsService")],t.prototype,"ctrlsService",void 0),pi([f("columnModel")],t.prototype,"columnModel",void 0),pi([b],t.prototype,"postConstruct",null),t}(D),wg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),yu=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Eg=function(n){wg(t,n);function t(e){var r=n.call(this)||this;return r.cbSelectAllVisible=!1,r.processingEventFromCheckbox=!1,r.column=e,r}return t.prototype.onSpaceKeyDown=function(e){var r=this.cbSelectAll,i=this.gridOptionsService.getDocument();r.isDisplayed()&&!r.getGui().contains(i.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 to),this.cbSelectAll.addCssClass("ag-header-select-all"),pe(this.cbSelectAll.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this)),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_SELECTION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_PAGINATION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_MODEL_UPDATED,this.onModelChanged.bind(this)),this.addManagedListener(this.cbSelectAll,g.EVENT_FIELD_VALUE_CHANGED,this.onCbSelectAll.bind(this)),ji(this.cbSelectAll.getGui(),!0),this.cbSelectAll.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()},t.prototype.onNewColumnsLoaded=function(){this.showOrHideSelectAll()},t.prototype.onDisplayedColumnsChanged=function(){this.isAlive()&&this.showOrHideSelectAll()},t.prototype.showOrHideSelectAll=function(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setDisplayed(this.cbSelectAllVisible,{skipAriaHidden:!0}),this.cbSelectAllVisible&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("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.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setValue(e),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}},t.prototype.refreshSelectAllLabel=function(){var e=this.localeService.getLocaleTextFunc(),r=this.cbSelectAll.getValue(),i=r?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),o=e("ariaRowSelectAll","Press Space to toggle all rows selection");this.cbSelectAllVisible?this.headerCellCtrl.setAriaDescriptionProperty("selectAll","".concat(o," (").concat(i,")")):this.headerCellCtrl.setAriaDescriptionProperty("selectAll",null),this.cbSelectAll.setInputAriaLabel("".concat(o," (").concat(i,")")),this.headerCellCtrl.refreshAriaDescription()},t.prototype.checkSelectionType=function(e){var r=this.gridOptionsService.get("rowSelection")==="multiple";return r?!0:(console.warn("AG Grid: ".concat(e," is only available if using 'multiple' rowSelection.")),!1)},t.prototype.checkRightRowModelType=function(e){var r=this.rowModel.getType(),i=r==="clientSide"||r==="serverSide";return i?!0:(console.warn("AG Grid: ".concat(e," is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ").concat(r,".")),!1)},t.prototype.onCbSelectAll=function(){if(!this.processingEventFromCheckbox&&this.cbSelectAllVisible){var e=this.cbSelectAll.getValue(),r=this.isFilteredOnly(),i=this.isCurrentPageOnly(),o="uiSelectAll";i?o="uiSelectAllCurrentPage":r&&(o="uiSelectAllFiltered");var s={source:o,justFiltered:r,justCurrentPage:i};e?this.selectionService.selectAllRowNodes(s):this.selectionService.deselectAllRowNodes(s)}},t.prototype.isCheckboxSelection=function(){var e=this.column.getColDef().headerCheckboxSelection;if(typeof e=="function"){var r=e,i={column:this.column,colDef:this.column.getColDef(),columnApi:this.gridOptionsService.columnApi,api:this.gridOptionsService.api,context:this.gridOptionsService.context};e=r(i)}return e?this.checkRightRowModelType("headerCheckboxSelection")&&this.checkSelectionType("headerCheckboxSelection"):!1},t.prototype.isFilteredOnly=function(){return!!this.column.getColDef().headerCheckboxSelectionFilteredOnly},t.prototype.isCurrentPageOnly=function(){return!!this.column.getColDef().headerCheckboxSelectionCurrentPageOnly},yu([f("rowModel")],t.prototype,"rowModel",void 0),yu([f("selectionService")],t.prototype,"selectionService",void 0),t}(D),_g=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),vr=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Rg=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.")},Og=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},Tg=function(n){_g(t,n);function t(e,r){var i=n.call(this,e,r)||this;return i.refreshFunctions=[],i.userHeaderClasses=new Set,i.ariaDescriptionProperties=new Map,i.column=e,i}return t.prototype.setComp=function(e,r,i,o){var s=this;this.comp=e,this.setGui(r),this.updateState(),this.setupWidth(),this.setupMovingCss(),this.setupMenuClass(),this.setupSortableClass(),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight(o),this.addColumnHoverListener(),this.setupFilterClass(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(),this.setupSelectAll(),this.setupUserComp(),this.refreshAria(),this.resizeFeature=this.createManagedBean(new Sg(this.getPinned(),this.column,i,e,this)),this.createManagedBean(new Ts([this.column],r)),this.createManagedBean(new Os(this.column,r,this.beans)),this.createManagedBean(new Vt(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.addResizeAndMoveKeyboardListeners(),this.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader"],this.refresh.bind(this)),this.addManagedListener(this.column,Z.EVENT_COL_DEF_CHANGED,this.refresh.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VALUE_CHANGED,this.onColumnValueChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onColumnRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_CHANGED,this.onColumnPivotChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))},t.prototype.resizeHeader=function(e,r){var i,o;if(this.column.isResizable()){var s=this.column.getPinned(),a=this.gridOptionsService.get("enableRtl"),l=this.column.getActualWidth(),u=(i=this.column.getMinWidth())!==null&&i!==void 0?i:0,c=(o=this.column.getMaxWidth())!==null&&o!==void 0?o:Number.MAX_SAFE_INTEGER,p=e===we.Left;s&&a!==(s==="right")&&(p=!p);var d=(p?-1:1)*this.resizeMultiplier,h=Math.min(Math.max(l+d,u),c);if(s){var v=this.pinnedWidthService.getPinnedLeftWidth(),y=this.pinnedWidthService.getPinnedRightWidth(),C=ir(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50;if(v+y+d>C)return}this.columnModel.setColumnWidths([{key:this.column,newWidth:h}],r,!0)}},t.prototype.moveHeader=function(e){var r=this,i=r.eGui,o=r.column,s=r.columnModel,a=r.gridOptionsService,l=r.ctrlsService,u=this.getPinned(),c=i.getBoundingClientRect().left,p=o.getActualWidth(),d=a.get("enableRtl"),h=e===we.Left!==d,v=fr.normaliseX(h?c-20:c+p+20,u,!0,a,l);fr.attemptMoveColumns({allMovingColumns:[o],isFromHeader:!0,hDirection:e,xPosition:v,pinned:u,fromEnter:!1,fakeEvent:!1,gridOptionsService:a,columnModel:s}),l.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(o,"auto")},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={column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),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,o){e.sortController.setSortForColumn(e.column,i,!!o,"uiColumnSorted")},api:this.gridApi,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,eGridHeader:this.getGui()};return r},t.prototype.setupSelectAll=function(){this.selectAllFeature=this.createManagedBean(new Eg(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===_.SPACE&&this.selectAllFeature.onSpaceKeyDown(e),e.key===_.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 i=e.shiftKey;this.sortController.progressSort(this.column,i,"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 o=e.column.getColDef().headerTooltip;return o}},i=this.createManagedBean(new gs(r,this.beans));i.setComp(this.eGui),this.refreshFunctions.push(function(){return i.refreshToolTip()})},t.prototype.setupClassesFromColDef=function(){var e=this,r=function(){var i=e.column.getColDef(),o=ho.getHeaderClassesFromColDef(i,e.gridOptionsService,e.column,null),s=e.userHeaderClasses;e.userHeaderClasses=new Set(o),o.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 i=this,o=i.column,s=i.columnModel,a=i.displayName,l=i.dragAndDropService,u=i.gridOptionsService,c=!this.gridOptionsService.get("suppressDragLeaveHidesColumns"),p=this.dragSource={type:Pe.HeaderCell,eElement:e,getDefaultIconName:function(){return c?fe.ICON_HIDE:fe.ICON_NOT_ALLOWED},getDragItem:function(){return r.createDragItem(o)},dragItemName:a,onDragStarted:function(){c=!u.get("suppressDragLeaveHidesColumns"),o.setMoving(!0,"uiColumnMoved")},onDragStopped:function(){return o.setMoving(!1,"uiColumnMoved")},onGridEnter:function(d){var h;if(c){var v=((h=d==null?void 0:d.columns)===null||h===void 0?void 0:h.filter(function(y){return!y.getColDef().lockVisible}))||[];s.setColumnsVisible(v,!0,"uiColumnMoved")}},onGridExit:function(d){var h;if(c){var v=((h=d==null?void 0:d.columns)===null||h===void 0?void 0:h.filter(function(y){return!y.getColDef().lockVisible}))||[];s.setColumnsVisible(v,!1,"uiColumnMoved")}}};l.addDragSource(p,!0)}},t.prototype.createDragItem=function(e){var r={};return r[e.getId()]=e.isVisible(),{columns:[e],visibleState:r}},t.prototype.updateState=function(){var e=this.column.getColDef();this.menuEnabled=this.menuFactory.isMenuEnabled(this.column)&&!e.suppressMenu,this.sortable=this.column.isSortable(),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(),i=r!=null&&this.userCompDetails.componentClass==e.componentClass,o=i?this.attemptHeaderCompRefresh(e.params):!1;o?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)},t.prototype.attemptHeaderCompRefresh=function(e){var r=this.comp.getUserCompInstance();if(!r||!r.refresh)return!1;var i=r.refresh(e);return i},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.get("suppressMovableColumns"),i=!r&&!e.suppressMovable&&!e.lockPosition;return!!i||!!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 i=e.column.getActualWidth();e.comp.setWidth("".concat(i,"px"))};this.addManagedListener(this.column,Z.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,Z.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,Z.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,Z.EVENT_SORT_CHANGED,this.refreshAriaSort.bind(this))},t.prototype.setupFilterClass=function(){var e=this,r=function(){var i=e.column.isFilterActive();e.comp.addOrRemoveCssClass("ag-header-cell-filtered",i),e.refreshAria()};this.addManagedListener(this.column,Z.EVENT_FILTER_ACTIVE_CHANGED,r),r()},t.prototype.setupWrapTextClass=function(){var e=this,r=function(){var i=!!e.column.getColDef().wrapHeaderText;e.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",i)};r(),this.addRefreshFunction(r)},t.prototype.onDisplayedColumnsChanged=function(){n.prototype.onDisplayedColumnsChanged.call(this),this.isAlive()&&this.onHeaderHeightChanged()},t.prototype.onHeaderHeightChanged=function(){this.refreshSpanHeaderHeight()},t.prototype.refreshSpanHeaderHeight=function(){var e=this,r=e.eGui,i=e.column,o=e.comp,s=e.columnModel;if(e.gridOptionsService,!i.isSpanHeaderHeight()){r.style.removeProperty("top"),r.style.removeProperty("height"),o.addOrRemoveCssClass("ag-header-span-height",!1),o.addOrRemoveCssClass("ag-header-span-total",!1);return}var a=this.getColumnGroupPaddingInfo(),l=a.numberOfParents,u=a.isSpanningTotal;o.addOrRemoveCssClass("ag-header-span-height",l>0);var c=s.getColumnHeaderRowHeight();if(l===0){o.addOrRemoveCssClass("ag-header-span-total",!1),r.style.setProperty("top","0px"),r.style.setProperty("height","".concat(c,"px"));return}o.addOrRemoveCssClass("ag-header-span-total",u);var p=s.isPivotMode(),d=p?s.getPivotGroupHeaderHeight():s.getGroupHeaderHeight(),h=l*d;r.style.setProperty("top","".concat(-h,"px")),r.style.setProperty("height","".concat(c+h,"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,i=!0;e;){if(!e.isPadding()){i=!1;break}e=e.getParent()}return{numberOfParents:r,isSpanningTotal:i}},t.prototype.setupAutoHeight=function(e){var r=this,i=function(c){if(r.isAlive()){var p=Gt(r.getGui()),d=p.paddingTop,h=p.paddingBottom,v=p.borderBottomWidth,y=p.borderTopWidth,C=d+h+v+y,m=e.offsetHeight,w=m+C;if(c<5){var E=r.beans.gridOptionsService.getDocument(),S=!E||!E.contains(e),R=w==0;if(S||R){r.beans.frameworkOverrides.setTimeout(function(){return i(c+1)},0);return}}r.columnModel.setColumnHeaderHeight(r.column,w)}},o=!1,s,a=function(){var c=r.column.isAutoHeaderHeight();c&&!o&&l(),!c&&o&&u()},l=function(){o=!0,i(0),r.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),s=r.resizeObserverService.observeResize(e,function(){return i(0)})},u=function(){o=!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,Z.EVENT_WIDTH_CHANGED,function(){return o&&i(0)}),this.addManagedListener(this.eventService,Z.EVENT_SORT_CHANGED,function(){o&&r.beans.frameworkOverrides.setTimeout(function(){return i(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(Ha(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.refreshAriaFiltered=function(){var e=this.localeService.getLocaleTextFunc(),r=this.column.isFilterActive();r?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)},t.prototype.setAriaDescriptionProperty=function(e,r){r!=null?this.ariaDescriptionProperties.set(e,r):this.ariaDescriptionProperties.delete(e)},t.prototype.refreshAriaDescription=function(){var e,r,i=null;try{for(var o=Rg(this.ariaDescriptionProperties),s=o.next();!s.done;s=o.next()){var a=Og(s.value,2),l=a[0],u=a[1];l==="filter"?i="".concat(u," ").concat(i||""):i="".concat(i||""," ").concat(u)}}catch(c){e={error:c}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}this.comp.setAriaDescription(i??void 0)},t.prototype.refreshAria=function(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFiltered(),this.refreshAriaDescription()},t.prototype.addColumnHoverListener=function(){var e=this,r=function(){if(e.gridOptionsService.get("columnHoverHighlight")){var i=e.columnHoverService.isHovered(e.column);e.comp.addOrRemoveCssClass("ag-column-hover",i)}};this.addManagedListener(this.eventService,g.EVENT_COLUMN_HOVER_CHANGED,r),r()},t.prototype.getColId=function(){return this.column.getColId()},t.prototype.addActiveHeaderMouseListeners=function(){var e=this,r=function(i){return e.setActiveHeader(i.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)},t.prototype.destroy=function(){n.prototype.destroy.call(this),this.refreshFunctions=null,this.selectAllFeature=null,this.dragSourceElement=null,this.userCompDetails=null,this.userHeaderClasses=null,this.ariaDescriptionProperties=null},vr([f("columnModel")],t.prototype,"columnModel",void 0),vr([f("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),vr([f("columnHoverService")],t.prototype,"columnHoverService",void 0),vr([f("sortController")],t.prototype,"sortController",void 0),vr([f("menuFactory")],t.prototype,"menuFactory",void 0),vr([f("resizeObserverService")],t.prototype,"resizeObserverService",void 0),vr([f("gridApi")],t.prototype,"gridApi",void 0),t}(mo),Pg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),So=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Dg=function(n){Pg(t,n);function t(e,r,i,o){var s=n.call(this)||this;return s.eResize=r,s.comp=e,s.pinned=i,s.columnGroup=o,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.get("suppressAutoSize")){var i=this.gridOptionsService.get("skipHeaderOnAutoSize");this.eResize.addEventListener("dblclick",function(){var o=[],s=e.columnGroup.getDisplayedLeafColumns();s.forEach(function(a){a.getColDef().suppressAutoSize||o.push(a.getColId())}),o.length>0&&e.columnModel.autoSizeColumns({columns:o,skipHeader:i,stopAtGroup:e.columnGroup,source:"uiColumnResized"}),e.resizeLeafColumnsToFit("uiColumnResized")})}},t.prototype.onResizeStart=function(e){var r=this.getInitialValues(e);this.storeLocalValues(r),this.toggleColumnResizing(!0)},t.prototype.onResizing=function(e,r,i){i===void 0&&(i="uiColumnResized");var o=this.normaliseDragChange(r),s=this.resizeStartWidth+o;this.resizeColumnsFromLocalValues(s,i,e)},t.prototype.getInitialValues=function(e){var r=this.getColumnsToResize(),i=this.getInitialSizeOfColumns(r),o=this.getSizeRatiosOfColumns(r,i),s={columnsToResize:r,resizeStartWidth:i,resizeRatios:o},a=null;if(e&&(a=this.columnModel.getDisplayedGroupAfter(this.columnGroup)),a){var l=a.getDisplayedLeafColumns(),u=s.groupAfterColumns=l.filter(function(p){return p.isResizable()}),c=s.groupAfterStartWidth=this.getInitialSizeOfColumns(u);s.groupAfterRatios=this.getSizeRatiosOfColumns(u,c)}else s.groupAfterColumns=void 0,s.groupAfterStartWidth=void 0,s.groupAfterRatios=void 0;return s},t.prototype.storeLocalValues=function(e){var r=e.columnsToResize,i=e.resizeStartWidth,o=e.resizeRatios,s=e.groupAfterColumns,a=e.groupAfterStartWidth,l=e.groupAfterRatios;this.resizeCols=r,this.resizeStartWidth=i,this.resizeRatios=o,this.resizeTakeFromCols=s,this.resizeTakeFromStartWidth=a,this.resizeTakeFromRatios=l},t.prototype.clearLocalValues=function(){this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0},t.prototype.resizeLeafColumnsToFit=function(e){var r=this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup),i=this.getInitialValues();r>i.resizeStartWidth&&this.resizeColumns(i,r,e,!0)},t.prototype.resizeColumnsFromLocalValues=function(e,r,i){var o,s,a;if(i===void 0&&(i=!0),!(!this.resizeCols||!this.resizeRatios)){var l={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:(o=this.resizeTakeFromCols)!==null&&o!==void 0?o:void 0,groupAfterStartWidth:(s=this.resizeTakeFromStartWidth)!==null&&s!==void 0?s:void 0,groupAfterRatios:(a=this.resizeTakeFromRatios)!==null&&a!==void 0?a:void 0};this.resizeColumns(l,e,r,i)}},t.prototype.resizeColumns=function(e,r,i,o){o===void 0&&(o=!0);var s=e.columnsToResize,a=e.resizeStartWidth,l=e.resizeRatios,u=e.groupAfterColumns,c=e.groupAfterStartWidth,p=e.groupAfterRatios,d=[];if(d.push({columns:s,ratios:l,width:r}),u){var h=r-a;d.push({columns:u,ratios:p,width:c-h})}this.columnModel.resizeColumnSets({resizeSets:d,finished:o,source:i}),o&&this.toggleColumnResizing(!1)},t.prototype.toggleColumnResizing=function(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)},t.prototype.getColumnsToResize=function(){var e=this.columnGroup.getDisplayedLeafColumns();return e.filter(function(r){return r.isResizable()})},t.prototype.getInitialSizeOfColumns=function(e){return e.reduce(function(r,i){return r+i.getActualWidth()},0)},t.prototype.getSizeRatiosOfColumns=function(e,r){return e.map(function(i){return i.getActualWidth()/r})},t.prototype.normaliseDragChange=function(e){var r=e;return this.gridOptionsService.get("enableRtl")?this.pinned!=="left"&&(r*=-1):this.pinned==="right"&&(r*=-1),r},t.prototype.destroy=function(){n.prototype.destroy.call(this),this.clearLocalValues()},So([f("horizontalResizeService")],t.prototype,"horizontalResizeService",void 0),So([f("autoWidthCalculator")],t.prototype,"autoWidthCalculator",void 0),So([f("columnModel")],t.prototype,"columnModel",void 0),So([b],t.prototype,"postConstruct",null),t}(D),Ag=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),bg=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Fg=function(n){Ag(t,n);function t(e,r){var i=n.call(this)||this;return i.removeChildListenersFuncs=[],i.columnGroup=r,i.comp=e,i}return t.prototype.postConstruct=function(){this.addListenersToChildrenColumns(),this.addManagedListener(this.columnGroup,ce.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(i){i.addEventListener("widthChanged",r),i.addEventListener("visibleChanged",r),e.removeChildListenersFuncs.push(function(){i.removeEventListener("widthChanged",r),i.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("".concat(e,"px")),this.comp.addOrRemoveCssClass("ag-hidden",e===0)},bg([b],t.prototype,"postConstruct",null),t}(D),Lg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),wo=function(){return wo=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},wo.apply(this,arguments)},Ig=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},xg=function(n){Lg(t,n);function t(e,r){var i=n.call(this,e,r)||this;return i.onSuppressColMoveChange=function(){if(i.isSuppressMoving())i.removeDragSource();else if(!i.dragSource){var o=i.getGui();i.setDragSource(o)}},i.column=e,i}return t.prototype.setComp=function(e,r,i){this.comp=e,this.setGui(r),this.displayName=this.columnModel.getDisplayNameForColumnGroup(this.column,"header"),this.addClasses(),this.setupMovingCss(),this.setupExpandable(),this.setupTooltip(),this.setupUserComp();var o=this.getParentRowCtrl().getPinned(),s=this.column.getProvidedColumnGroup().getLeafColumns();this.createManagedBean(new Ts(s,r)),this.createManagedBean(new Os(this.column,r,this.beans)),this.createManagedBean(new Fg(e,this.column)),this.resizeFeature=this.createManagedBean(new Dg(e,i,o,this.column)),this.createManagedBean(new Vt(r,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:function(){},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addManagedPropertyListener(g.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED,this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners()},t.prototype.resizeHeader=function(e,r){if(this.resizeFeature){var i=e===we.Left,o=(i?-1:1)*this.resizeMultiplier,s=this.resizeFeature.getInitialValues(r);this.resizeFeature.resizeColumns(s,s.resizeStartWidth+o,"uiColumnResized",!0)}},t.prototype.moveHeader=function(e){var r=this,i=r.eGui,o=r.column,s=r.columnModel,a=r.gridOptionsService,l=r.ctrlsService,u=a.get("enableRtl"),c=e===we.Left,p=this.getPinned(),d=i.getBoundingClientRect(),h=d.left,v=d.width,y=fr.normaliseX(c!==u?h-20:h+v+20,p,!0,a,l),C=o.getGroupId(),m=this.focusService.getFocusedHeader();fr.attemptMoveColumns({allMovingColumns:this.column.getLeafColumns(),isFromHeader:!0,hDirection:e,xPosition:y,pinned:p,fromEnter:!1,fakeEvent:!1,gridOptionsService:a,columnModel:s});var w=o.getDisplayedLeafColumns(),E=c?w[0]:Q(w);this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(E,"auto"),!this.isAlive()&&m&&this.restoreFocus(C,o,m)},t.prototype.restoreFocus=function(e,r,i){var o=r.getLeafColumns();if(o.length){var s=o[0].getParent();if(s){var a=this.findGroupWidthId(s,e);a&&this.focusService.focusHeaderPosition({headerPosition:wo(wo({},i),{column:a})})}}},t.prototype.findGroupWidthId=function(e,r){for(;e;){if(e.getGroupId()===r)return e;e=e.getParent()}return null},t.prototype.resizeLeafColumnsToFit=function(e){this.resizeFeature&&this.resizeFeature.resizeLeafColumnsToFit(e)},t.prototype.setupUserComp=function(){var e=this,r={displayName:this.displayName,columnGroup:this.column,setExpanded:function(o){e.columnModel.setColumnGroupOpened(e.column.getProvidedColumnGroup(),o,"gridInitializing")},api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context},i=this.userComponentFactory.getHeaderGroupCompDetails(r);this.comp.setUserCompDetails(i)},t.prototype.setupTooltip=function(){var e=this,r=this.column.getColGroupDef(),i={getColumn:function(){return e.column},getGui:function(){return e.eGui},getLocation:function(){return"headerGroup"},getTooltipValue:function(){return r&&r.headerTooltip}};r&&(i.getColDef=function(){return r});var o=this.createManagedBean(new gs(i,this.beans));o.setComp(this.eGui)},t.prototype.setupExpandable=function(){var e=this.column.getProvidedColumnGroup();this.refreshExpanded(),this.addManagedListener(e,oe.EVENT_EXPANDABLE_CHANGED,this.refreshExpanded.bind(this)),this.addManagedListener(e,oe.EVENT_EXPANDED_CHANGED,this.refreshExpanded.bind(this))},t.prototype.refreshExpanded=function(){var e=this.column;this.expandable=e.isExpandable();var r=e.isExpanded();this.expandable?this.comp.setAriaExpanded(r?"true":"false"):this.comp.setAriaExpanded(void 0)},t.prototype.getColId=function(){return this.column.getUniqueId()},t.prototype.addClasses=function(){var e=this,r=this.column.getColGroupDef(),i=ho.getHeaderClassesFromColDef(r,this.gridOptionsService,null,this.column);if(this.column.isPadding()){i.push("ag-header-group-cell-no-group");var o=this.column.getLeafColumns();o.every(function(s){return s.isSpanHeaderHeight()})&&i.push("ag-header-span-height")}else i.push("ag-header-group-cell-with-group");i.forEach(function(s){return e.comp.addOrRemoveCssClass(s,!0)})},t.prototype.setupMovingCss=function(){var e=this,r=this.column.getProvidedColumnGroup(),i=r.getLeafColumns(),o=function(){return e.comp.addOrRemoveCssClass("ag-header-cell-moving",e.column.isMoving())};i.forEach(function(s){e.addManagedListener(s,Z.EVENT_MOVING_CHANGED,o)}),o()},t.prototype.onFocusIn=function(e){if(!this.eGui.contains(e.relatedTarget)){var r=this.getRowIndex();this.beans.focusService.setFocusedHeader(r,this.column)}},t.prototype.handleKeyDown=function(e){n.prototype.handleKeyDown.call(this,e);var r=this.getWrapperHasFocus();if(!(!this.expandable||!r)&&e.key===_.ENTER){var i=this.column,o=!i.isExpanded();this.columnModel.setColumnGroupOpened(i.getProvidedColumnGroup(),o,"uiColumnExpanded")}},t.prototype.setDragSource=function(e){var r=this;if(!this.isSuppressMoving()&&(this.removeDragSource(),!!e)){var i=this,o=i.column,s=i.columnModel,a=i.displayName,l=i.gridOptionsService,u=i.dragAndDropService,c=o.getProvidedColumnGroup().getLeafColumns(),p=!l.get("suppressDragLeaveHidesColumns"),d=this.dragSource={type:Pe.HeaderCell,eElement:e,getDefaultIconName:function(){return p?fe.ICON_HIDE:fe.ICON_NOT_ALLOWED},dragItemName:a,getDragItem:function(){return r.getDragItemForGroup(o)},onDragStarted:function(){p=!l.get("suppressDragLeaveHidesColumns"),c.forEach(function(h){return h.setMoving(!0,"uiColumnDragged")})},onDragStopped:function(){return c.forEach(function(h){return h.setMoving(!1,"uiColumnDragged")})},onGridEnter:function(h){var v;if(p){var y=((v=h==null?void 0:h.columns)===null||v===void 0?void 0:v.filter(function(C){return!C.getColDef().lockVisible}))||[];s.setColumnsVisible(y,!0,"uiColumnMoved")}},onGridExit:function(h){var v;if(p){var y=((v=h==null?void 0:h.columns)===null||v===void 0?void 0:v.filter(function(C){return!C.getColDef().lockVisible}))||[];s.setColumnsVisible(y,!1,"uiColumnMoved")}}};u.addDragSource(d,!0)}},t.prototype.getDragItemForGroup=function(e){var r=e.getProvidedColumnGroup().getLeafColumns(),i={};r.forEach(function(s){return i[s.getId()]=s.isVisible()});var o=[];return this.columnModel.getAllDisplayedColumns().forEach(function(s){r.indexOf(s)>=0&&(o.push(s),Ve(r,s))}),r.forEach(function(s){return o.push(s)}),{columns:o,visibleState:i}},t.prototype.isSuppressMoving=function(){var e=!1;this.column.getLeafColumns().forEach(function(i){(i.getColDef().suppressMovable||i.getColDef().lockPosition)&&(e=!0)});var r=e||this.gridOptionsService.get("suppressMovableColumns");return r},Ig([f("columnModel")],t.prototype,"columnModel",void 0),t}(mo),Mg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Eo=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Cu=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.")},Ng=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},Gg=0,Ds=function(n){Mg(t,n);function t(e,r,i){var o=n.call(this)||this;o.instanceId=Gg++,o.rowIndex=e,o.pinned=r,o.type=i;var s=i==ye.COLUMN_GROUP?"ag-header-row-column-group":i==ye.FLOATING_FILTER?"ag-header-row-column-filter":"ag-header-row-column";return o.headerRowClass="ag-header-row ".concat(s),o}return t.prototype.postConstruct=function(){this.isPrintLayout=this.gridOptionsService.isDomLayout("print"),this.isEnsureDomOrder=this.gridOptionsService.get("ensureDomOrder")},t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.setComp=function(e,r){r===void 0&&(r=!0),this.comp=e,r&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners()},t.prototype.getHeaderRowClass=function(){return this.headerRowClass},t.prototype.getAriaRowIndex=function(){return this.rowIndex+1},t.prototype.getTransform=function(){if(nt())return"translateZ(0)"},t.prototype.addEventListeners=function(){var e=this;this.addManagedListener(this.eventService,g.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_VIRTUAL_COLUMNS_CHANGED,function(r){return e.onVirtualColumnsChanged(r.afterScroll)}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_GRID_STYLES_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this)),this.addManagedPropertyListener("ensureDomOrder",function(r){return e.isEnsureDomOrder=r.currentValue}),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){if(this.headerCellCtrls)return Jt(this.headerCellCtrls).find(function(r){return r.getColumnGroupChild()===e})},t.prototype.onDisplayedColumnsChanged=function(){this.isPrintLayout=this.gridOptionsService.isDomLayout("print"),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("".concat(e,"px"))},t.prototype.getWidthForRow=function(){if(this.isPrintLayout){var e=this.pinned!=null;return e?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.getTopAndHeight(),r=e.topOffset,i=e.rowHeight;this.comp.setTop(r+"px"),this.comp.setHeight(i+"px")},t.prototype.getTopAndHeight=function(){var e=this.columnModel.getHeaderRowCount(),r=[],i=0;this.filterManager.hasFloatingFilters()&&(e++,i=1);for(var o=this.columnModel.getColumnGroupHeaderRowHeight(),s=this.columnModel.getColumnHeaderRowHeight(),a=1+i,l=e-a,u=0;u<l;u++)r.push(o);r.push(s);for(var u=0;u<i;u++)r.push(this.columnModel.getFloatingFiltersHeight());for(var c=0,u=0;u<this.rowIndex;u++)c+=r[u];var p=r[this.rowIndex];return{topOffset:c,rowHeight:p}},t.prototype.getPinned=function(){return this.pinned},t.prototype.getRowIndex=function(){return this.rowIndex},t.prototype.onVirtualColumnsChanged=function(e){e===void 0&&(e=!1);var r=this.getHeaderCtrls(),i=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(r,i,e)},t.prototype.getHeaderCtrls=function(){var e,r,i,o,s=this,a=this.headerCellCtrls;this.headerCellCtrls=new Map;var l=this.getColumnsInViewport();try{for(var u=Cu(l),c=u.next();!c.done;c=u.next()){var p=c.value;this.recycleAndCreateHeaderCtrls(p,a)}}catch(S){e={error:S}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}var d=function(S){var R=s.focusService.isHeaderWrapperFocused(S);if(!R)return!1;var T=s.columnModel.isDisplayed(S.getColumnGroupChild());return T};if(a)try{for(var h=Cu(a),v=h.next();!v.done;v=h.next()){var y=Ng(v.value,2),C=y[0],m=y[1],w=d(m);w?this.headerCellCtrls.set(C,m):this.destroyBean(m)}}catch(S){i={error:S}}finally{try{v&&!v.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}var E=Array.from(this.headerCellCtrls.values());return E},t.prototype.recycleAndCreateHeaderCtrls=function(e,r){if(this.headerCellCtrls&&!e.isEmptyGroup()){var i=e.getUniqueId(),o;r&&(o=r.get(i),r.delete(i));var s=o&&o.getColumnGroupChild()!=e;if(s&&(this.destroyBean(o),o=void 0),o==null)switch(this.type){case ye.FLOATING_FILTER:o=this.createBean(new Cg(e,this));break;case ye.COLUMN_GROUP:o=this.createBean(new xg(e,this));break;default:o=this.createBean(new Tg(e,this));break}this.headerCellCtrls.set(i,o)}},t.prototype.getColumnsInViewport=function(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()},t.prototype.getColumnsInViewportPrintLayout=function(){var e=this;if(this.pinned!=null)return[];var r=[],i=this.getActualDepth();return["left",null,"right"].forEach(function(o){var s=e.columnModel.getVirtualHeaderGroupRow(o,i);r=r.concat(s)}),r},t.prototype.getActualDepth=function(){return this.type==ye.FLOATING_FILTER?this.rowIndex-1:this.rowIndex},t.prototype.getColumnsInViewportNormalLayout=function(){return this.columnModel.getVirtualHeaderGroupRow(this.pinned,this.getActualDepth())},t.prototype.focusHeader=function(e,r){if(!this.headerCellCtrls)return!1;var i=Array.from(this.headerCellCtrls.values()),o=i.find(function(s){return s.getColumnGroupChild()==e});return o?o.focus(r):!1},t.prototype.destroy=function(){var e=this;this.headerCellCtrls&&this.headerCellCtrls.forEach(function(r){e.destroyBean(r)}),this.headerCellCtrls=void 0,n.prototype.destroy.call(this)},Eo([f("columnModel")],t.prototype,"columnModel",void 0),Eo([f("focusService")],t.prototype,"focusService",void 0),Eo([f("filterManager")],t.prototype,"filterManager",void 0),Eo([b],t.prototype,"postConstruct",null),t}(D),Vg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Ir=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Hg=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},Bg=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},kg=function(n){Vg(t,n);function t(e){var r=n.call(this)||this;return r.hidden=!1,r.includeFloatingFilter=!1,r.groupsRowCtrls=[],r.pinned=e,r}return t.prototype.setComp=function(e,r){this.comp=e,this.eViewport=r,this.setupCenterWidth(),this.setupPinnedWidth(),this.setupDragAndDrop(this.eViewport),this.addManagedListener(this.eventService,g.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.ctrlsService.registerHeaderContainer(this,this.pinned),this.columnModel.isReady()&&this.refresh()},t.prototype.setupDragAndDrop=function(e){var r=new ng(this.pinned,e);this.createManagedBean(r)},t.prototype.refresh=function(e){var r=this;e===void 0&&(e=!1);var i=new Tr,o=this.focusService.getFocusHeaderToUseAfterRefresh(),s=function(){var c=r.columnModel.getHeaderRowCount()-1;r.groupsRowCtrls=r.destroyBeans(r.groupsRowCtrls);for(var p=0;p<c;p++){var d=r.createBean(new Ds(i.next(),r.pinned,ye.COLUMN_GROUP));r.groupsRowCtrls.push(d)}},a=function(){var c=i.next(),p=!r.hidden&&(r.columnsRowCtrl==null||!e||r.columnsRowCtrl.getRowIndex()!==c),d=p||r.hidden;d&&(r.columnsRowCtrl=r.destroyBean(r.columnsRowCtrl)),p&&(r.columnsRowCtrl=r.createBean(new Ds(c,r.pinned,ye.COLUMN)))},l=function(){r.includeFloatingFilter=r.filterManager.hasFloatingFilters()&&!r.hidden;var c=function(){r.filtersRowCtrl=r.destroyBean(r.filtersRowCtrl)};if(!r.includeFloatingFilter){c();return}var p=i.next();if(r.filtersRowCtrl){var d=r.filtersRowCtrl.getRowIndex()!==p;(!e||d)&&c()}r.filtersRowCtrl||(r.filtersRowCtrl=r.createBean(new Ds(p,r.pinned,ye.FLOATING_FILTER)))};s(),a(),l();var u=this.getAllCtrls();this.comp.setCtrls(u),this.restoreFocusOnHeader(o)},t.prototype.restoreFocusOnHeader=function(e){e==null||e.column.getPinned()!=this.pinned||this.focusService.focusHeaderPosition({headerPosition:e})},t.prototype.getAllCtrls=function(){var e=Bg([],Hg(this.groupsRowCtrls),!1);return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e},t.prototype.onGridColumnsChanged=function(){this.refresh(!0)},t.prototype.onDisplayedColumnsChanged=function(){var e=this.filterManager.hasFloatingFilters()&&!this.hidden;this.includeFloatingFilter!==e&&this.refresh(!0)},t.prototype.setupCenterWidth=function(){var e=this;this.pinned==null&&this.createManagedBean(new ws(function(r){return e.comp.setCenterWidth("".concat(r,"px"))},!0))},t.prototype.setHorizontalScroll=function(e){this.comp.setViewportScrollLeft(e)},t.prototype.setupPinnedWidth=function(){var e=this;if(this.pinned!=null){var r=this.pinned==="left",i=this.pinned==="right";this.hidden=!0;var o=function(){var s=r?e.pinnedWidthService.getPinnedLeftWidth():e.pinnedWidthService.getPinnedRightWidth();if(s!=null){var a=s==0,l=e.hidden!==a,u=e.gridOptionsService.get("enableRtl"),c=e.gridOptionsService.getScrollbarWidth(),p=e.scrollVisibleService.isVerticalScrollShowing()&&(u&&r||!u&&i),d=p?s+c:s;e.comp.setPinnedContainerWidth("".concat(d,"px")),e.comp.setDisplayed(!a),l&&(e.hidden=a,e.refresh())}};this.addManagedListener(this.eventService,g.EVENT_LEFT_PINNED_WIDTH_CHANGED,o),this.addManagedListener(this.eventService,g.EVENT_RIGHT_PINNED_WIDTH_CHANGED,o),this.addManagedListener(this.eventService,g.EVENT_SCROLL_VISIBILITY_CHANGED,o),this.addManagedListener(this.eventService,g.EVENT_SCROLLBAR_WIDTH_CHANGED,o)}},t.prototype.getHeaderCtrlForColumn=function(e){if(e instanceof Z)return this.columnsRowCtrl?this.columnsRowCtrl.getHeaderCellCtrl(e):void 0;if(this.groupsRowCtrls.length!==0)for(var r=0;r<this.groupsRowCtrls.length;r++){var i=this.groupsRowCtrls[r].getHeaderCellCtrl(e);if(i)return i}},t.prototype.getHtmlElementForColumnHeader=function(e){var r=this.getHeaderCtrlForColumn(e);return r?r.getGui():null},t.prototype.getRowType=function(e){var r=this.getAllCtrls(),i=r[e];return i?i.getType():void 0},t.prototype.focusHeader=function(e,r,i){var o=this.getAllCtrls(),s=o[e];return s?s.focusHeader(r,i):!1},t.prototype.getViewport=function(){return this.eViewport},t.prototype.getRowCount=function(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)},t.prototype.destroy=function(){this.filtersRowCtrl&&(this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)),this.columnsRowCtrl&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),this.groupsRowCtrls&&this.groupsRowCtrls.length&&(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls)),n.prototype.destroy.call(this)},Ir([f("ctrlsService")],t.prototype,"ctrlsService",void 0),Ir([f("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),Ir([f("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),Ir([f("columnModel")],t.prototype,"columnModel",void 0),Ir([f("focusService")],t.prototype,"focusService",void 0),Ir([f("filterManager")],t.prototype,"filterManager",void 0),t}(D),Wg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),As=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},bs=function(n){Wg(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(o){return e.setDisplayed(o)},setCtrls:function(o){return e.setCtrls(o)},setCenterWidth:function(o){return e.eCenterContainer.style.width=o},setViewportScrollLeft:function(o){return e.getGui().scrollLeft=o},setPinnedContainerWidth:function(o){var s=e.getGui();s.style.width=o,s.style.maxWidth=o,s.style.minWidth=o}},i=this.createManagedBean(new kg(this.pinned));i.setComp(r,this.getGui())},t.prototype.selectAndSetTemplate=function(){var e=this.pinned=="left",r=this.pinned=="right",i=e?t.PINNED_LEFT_TEMPLATE:r?t.PINNED_RIGHT_TEMPLATE:t.CENTER_TEMPLATE;this.setTemplate(i),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,i=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];var o,s=function(a){var l=a.getGui(),u=l.parentElement!=r.eRowContainer;u&&r.eRowContainer.appendChild(l),o&&Hn(r.eRowContainer,l,o),o=l};e.forEach(function(a){var l=a.getInstanceId(),u=i[l];delete i[l];var c=u||r.createBean(new pg(a));r.headerRowComps[l]=c,r.rowCompsList.push(c),s(c)}),Ft(i).forEach(function(a){return r.destroyRowComp(a)})},t.PINNED_LEFT_TEMPLATE='<div class="ag-pinned-left-header" role="presentation"></div>',t.PINNED_RIGHT_TEMPLATE='<div class="ag-pinned-right-header" role="presentation"></div>',t.CENTER_TEMPLATE=`<div class="ag-header-viewport" role="presentation">
|
||
<div class="ag-header-container" ref="eCenterContainer" role="rowgroup"></div>
|
||
</div>`,As([L("eCenterContainer")],t.prototype,"eCenterContainer",void 0),As([b],t.prototype,"init",null),As([Se],t.prototype,"destroyRowComps",null),t}(W),jg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),di=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Ct;(function(n){n[n.UP=0]="UP",n[n.DOWN=1]="DOWN",n[n.LEFT=2]="LEFT",n[n.RIGHT=3]="RIGHT"})(Ct||(Ct={}));var Ug=function(n){jg(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,i){if(r||(r=this.focusService.getFocusedHeader()),!r)return!1;var o=r.headerRowIndex,s=r.column,a=this.getHeaderRowCount(),l=e===Ct.UP,u=l?this.headerPositionUtils.getColumnVisibleParent(s,o):this.headerPositionUtils.getColumnVisibleChild(s,o),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:i})},t.prototype.navigateHorizontally=function(e,r,i){r===void 0&&(r=!1);var o=this.focusService.getFocusedHeader(),s=e===Ct.LEFT,a=this.gridOptionsService.get("enableRtl"),l,u;return s!==a?(u="Before",l=this.headerPositionUtils.findHeader(o,u)):(u="After",l=this.headerPositionUtils.findHeader(o,u)),l||!r?this.focusService.focusHeaderPosition({headerPosition:l,direction:u,fromTab:r,allowUserOverride:!0,event:i}):this.focusNextHeaderRow(o,u,i)},t.prototype.focusNextHeaderRow=function(e,r,i){var o=e.headerRowIndex,s=null,a;return r==="Before"?o>0&&(a=o-1,s=this.headerPositionUtils.findColAtEdgeForHeaderRow(a,"end")):(a=o+1,s=this.headerPositionUtils.findColAtEdgeForHeaderRow(a,"start")),this.focusService.focusHeaderPosition({headerPosition:s,direction:r,fromTab:!0,allowUserOverride:!0,event:i})},t.prototype.scrollToColumn=function(e,r){if(r===void 0&&(r="After"),!e.getPinned()){var i;if(e instanceof ce){var o=e.getDisplayedLeafColumns();i=r==="Before"?Q(o):o[0]}else i=e;this.gridBodyCon.getScrollFeature().ensureColumnVisible(i)}},di([f("focusService")],t.prototype,"focusService",void 0),di([f("headerPositionUtils")],t.prototype,"headerPositionUtils",void 0),di([f("ctrlsService")],t.prototype,"ctrlsService",void 0),di([b],t.prototype,"postConstruct",null),t=di([I("headerNavigationService")],t),t}(D),zg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),hi=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},$g=function(n){zg(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.setComp=function(e,r,i){this.comp=e,this.eGui=r,this.createManagedBean(new Vt(i,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this)),this.addManagedListener(this.eventService,g.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,g.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_GRID_STYLES_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,e)},t.prototype.getHeaderHeight=function(){return this.headerHeight},t.prototype.setHeaderHeight=function(){var e=this.columnModel,r=0,i=e.getHeaderRowCount(),o,s=this.filterManager.hasFloatingFilters();s&&(i++,r=1);var a=this.columnModel.getColumnGroupHeaderRowHeight(),l=this.columnModel.getColumnHeaderRowHeight(),u=1+r,c=i-u;if(o=r*e.getFloatingFiltersHeight(),o+=c*a,o+=l,this.headerHeight!==o){this.headerHeight=o;var p="".concat(o+1,"px");this.comp.setHeightAndMinHeight(p),this.eventService.dispatchEvent({type:g.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(i){return i.isSpanHeaderHeight()});this.comp.addOrRemoveCssClass("ag-header-allow-overflow",r)},t.prototype.onTabKeyDown=function(e){var r=this.gridOptionsService.get("enableRtl"),i=e.shiftKey!==r?Ct.LEFT:Ct.RIGHT;(this.headerNavigationService.navigateHorizontally(i,!0,e)||this.focusService.focusNextGridCoreContainer(e.shiftKey))&&e.preventDefault()},t.prototype.handleKeyDown=function(e){var r=null;switch(e.key){case _.LEFT:r=Ct.LEFT;case _.RIGHT:P(r)||(r=Ct.RIGHT),this.headerNavigationService.navigateHorizontally(r,!1,e);break;case _.UP:r=Ct.UP;case _.DOWN:P(r)||(r=Ct.DOWN),this.headerNavigationService.navigateVertically(r,null,e)&&e.preventDefault();break;default:return}},t.prototype.onFocusOut=function(e){var r=this.gridOptionsService.getDocument(),i=e.relatedTarget;!i&&this.eGui.contains(r.activeElement)||this.eGui.contains(i)||this.focusService.clearFocusedHeader()},hi([f("headerNavigationService")],t.prototype,"headerNavigationService",void 0),hi([f("focusService")],t.prototype,"focusService",void 0),hi([f("columnModel")],t.prototype,"columnModel",void 0),hi([f("ctrlsService")],t.prototype,"ctrlsService",void 0),hi([f("filterManager")],t.prototype,"filterManager",void 0),t}(D),Kg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Yg=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},qg=function(n){Kg(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}},i=this.createManagedBean(new $g);i.setComp(r,this.getGui(),this.getFocusableElement());var o=function(s){e.createManagedBean(s),e.appendChild(s)};o(new bs("left")),o(new bs(null)),o(new bs("right"))},t.TEMPLATE='<div class="ag-header" role="presentation"/>',Yg([b],t.prototype,"postConstruct",null),t}(W),Qg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Fs=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Xg=function(n){Qg(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.addResizeBar=function(e){var r=this,i={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0};this.dragService.addDragSource(i);var o=function(){return r.dragService.removeDragSource(i)};return o},t.prototype.onDragStart=function(e,r){this.dragStartX=r.clientX,this.setResizeIcons();var i=r instanceof MouseEvent&&r.shiftKey===!0;e.onResizeStart(i)},t.prototype.setResizeIcons=function(){var e=this.ctrlsService.getGridCtrl();e.setResizeCursor(!0),e.disableUserSelect(!0)},t.prototype.onDragStop=function(e,r){e.onResizeEnd(this.resizeAmount),this.resetIcons()},t.prototype.resetIcons=function(){var e=this.ctrlsService.getGridCtrl();e.setResizeCursor(!1),e.disableUserSelect(!1)},t.prototype.onDragging=function(e,r){this.resizeAmount=r.clientX-this.dragStartX,e.onResizing(this.resizeAmount)},Fs([f("dragService")],t.prototype,"dragService",void 0),Fs([f("ctrlsService")],t.prototype,"ctrlsService",void 0),t=Fs([I("horizontalResizeService")],t),t}(D),Jg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),fi=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Zg=function(n){Jg(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.hideActiveMenu=function(){this.hidePopup&&this.hidePopup()},t.prototype.showMenuAfterMouseEvent=function(e,r){var i=this;this.showPopup(e,function(o){i.popupService.positionPopupUnderMouseEvent({column:e,type:"columnMenu",mouseEvent:r,ePopup:o})},"columnMenu",r.target)},t.prototype.showMenuAfterButtonClick=function(e,r,i){var o=this;this.showPopup(e,function(s){o.popupService.positionPopupByComponent({type:i,eventSource:r,ePopup:s,keepWithinBounds:!0,position:"under",column:e})},i,r)},t.prototype.showPopup=function(e,r,i,o){var s=this,a=this.filterManager.getOrCreateFilterWrapper(e,"COLUMN_MENU");if(!a)throw new Error("AG Grid - unable to show popup filter, filter instantiation failed");var l=document.createElement("div");pe(l,"presentation"),l.classList.add("ag-menu"),this.tabListener=this.addManagedListener(l,"keydown",function(y){return s.trapFocusWithin(y,l)}),a.guiPromise.then(function(y){return l.appendChild(y)});var u,c=function(){var y;return(y=a.filterPromise)===null||y===void 0?void 0:y.then(function(C){var m;return(m=C==null?void 0:C.afterGuiDetached)===null||m===void 0?void 0:m.call(C)})},p=o||this.ctrlsService.getGridBodyCtrl().getGui(),d=function(y){e.setMenuVisible(!1,"contextMenu");var C=y instanceof KeyboardEvent;if(s.tabListener&&(s.tabListener=s.tabListener()),C&&o&&Te(o)){var m=s.focusService.findTabbableParent(o);m&&m.focus()}c()},h=this.localeService.getLocaleTextFunc(),v=this.popupService.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:d,positionCallback:function(){return r(l)},anchorToElement:p,ariaLabel:h("ariaLabelColumnMenu","Column Menu")});v&&(this.hidePopup=u=v.hideFunc),a.filterPromise.then(function(y){r(l),y.afterGuiAttached&&y.afterGuiAttached({container:i,hidePopup:u})}),e.setMenuVisible(!0,"contextMenu")},t.prototype.trapFocusWithin=function(e,r){e.key!==_.TAB||e.defaultPrevented||this.focusService.findNextFocusableElement(r,!1,e.shiftKey)||(e.preventDefault(),this.focusService.focusInto(r,e.shiftKey))},t.prototype.isMenuEnabled=function(e){return e.isFilterAllowed()&&e.getMenuTabs(["filterMenuTab"]).includes("filterMenuTab")},fi([f("filterManager")],t.prototype,"filterManager",void 0),fi([f("popupService")],t.prototype,"popupService",void 0),fi([f("focusService")],t.prototype,"focusService",void 0),fi([f("ctrlsService")],t.prototype,"ctrlsService",void 0),t=fi([I("menuFactory")],t),t}(D),ey=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),_o=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o};(function(n){ey(t,n);function t(e){var r=n.call(this,t.getTemplate(e.cssClass))||this;return r.items=[],r.tabbedItemScrollMap=new Map,r.params=e,e.items&&e.items.forEach(function(i){return r.addItem(i)}),r}return t.prototype.postConstruct=function(){var e=this;this.createManagedBean(new Vt(this.getFocusableElement(),{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)})),this.addDestroyFunc(function(){var r,i,o;return(o=(i=(r=e.activeItem)===null||r===void 0?void 0:r.tabbedItem)===null||i===void 0?void 0:i.afterDetachedCallback)===null||o===void 0?void 0:o.call(i)})},t.getTemplate=function(e){return'<div class="ag-tabs '.concat(e,`">
|
||
<div ref="eHeader" role="tablist" class="ag-tabs-header `).concat(e?"".concat(e,"-header"):"",`"></div>
|
||
<div ref="eBody" role="presentation" class="ag-tabs-body `).concat(e?"".concat(e,"-body"):"",`"></div>
|
||
</div>`)},t.prototype.handleKeyDown=function(e){var r=this.gridOptionsService.getDocument();switch(e.key){case _.RIGHT:case _.LEFT:if(!this.eHeader.contains(r.activeElement))return;var i=e.key===_.RIGHT,o=this.gridOptionsService.get("enableRtl"),s=this.items.indexOf(this.activeItem),a=i!==o?Math.min(s+1,this.items.length-1):Math.max(s-1,0);if(s===a)return;e.preventDefault();var l=this.items[a];this.showItemWrapper(l),l.eHeaderButton.focus();break;case _.UP:case _.DOWN:e.stopPropagation();break}},t.prototype.onTabKeyDown=function(e){if(!e.defaultPrevented){var r=this,i=r.focusService,o=r.eHeader,s=r.eBody,a=r.activeItem,l=this.gridOptionsService.getDocument(),u=l.activeElement,c=e.target;if(e.preventDefault(),o.contains(u)){i.focusInto(s,e.shiftKey);return}var p=null;i.isTargetUnderManagedComponent(s,c)&&(e.shiftKey&&(p=this.focusService.findFocusableElementBeforeTabGuard(s,c)),p||(p=a.eHeaderButton)),!p&&s.contains(u)&&(p=i.findNextFocusableElement(s,!1,e.shiftKey),p||(p=a.eHeaderButton)),p&&p.focus()}},t.prototype.setAfterAttachedParams=function(e){this.afterAttachedParams=e},t.prototype.showFirstItem=function(){this.items.length>0&&this.showItemWrapper(this.items[0])},t.prototype.addItem=function(e){var r=document.createElement("span");pe(r,"tab"),r.setAttribute("tabindex","-1"),r.appendChild(e.title),r.classList.add("ag-tab"),this.eHeader.appendChild(r),Rt(r,e.titleLabel);var i={tabbedItem:e,eHeaderButton:r};this.items.push(i),r.addEventListener("click",this.showItemWrapper.bind(this,i))},t.prototype.showItem=function(e){var r=this.items.find(function(i){return i.tabbedItem===e});r&&this.showItemWrapper(r)},t.prototype.showItemWrapper=function(e){var r=this,i,o,s=e.tabbedItem,a=e.eHeaderButton;if(this.params.onItemClicked&&this.params.onItemClicked({item:s}),this.activeItem===e){ga(this.params.onActiveItemClicked);return}this.lastScrollListener&&(this.lastScrollListener=this.lastScrollListener()),he(this.eBody),s.bodyPromise.then(function(l){r.eBody.appendChild(l);var u=!r.focusService.isKeyboardMode();if(r.focusService.focusInto(r.eBody,!1,u),s.afterAttachedCallback&&s.afterAttachedCallback(r.afterAttachedParams),r.params.keepScrollPosition){var c=s.getScrollableContainer&&s.getScrollableContainer()||l;r.lastScrollListener=r.addManagedListener(c,"scroll",function(){r.tabbedItemScrollMap.set(s.name,c.scrollTop)});var p=r.tabbedItemScrollMap.get(s.name);p!==void 0&&setTimeout(function(){c.scrollTop=p},0)}}),this.activeItem&&(this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),(o=(i=this.activeItem.tabbedItem).afterDetachedCallback)===null||o===void 0||o.call(i)),a.classList.add("ag-tab-selected"),this.activeItem=e},_o([f("focusService")],t.prototype,"focusService",void 0),_o([L("eHeader")],t.prototype,"eHeader",void 0),_o([L("eBody")],t.prototype,"eBody",void 0),_o([b],t.prototype,"postConstruct",null),t})(W);var ty=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),ry=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},iy=50,oy=function(n){ty(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.polyfillFunctions=[],e}return t.prototype.observeResize=function(e,r){var i=this,o=this.gridOptionsService.getWindow(),s=function(){var c=new o.ResizeObserver(r);return c.observe(e),function(){return c.disconnect()}},a=function(){var c=Vn(e),p=Gn(e),d=!0,h=function(){if(d){var v=Vn(e),y=Gn(e),C=v!==c||y!==p;C&&(c=v,p=y,r()),i.doNextPolyfillTurn(h)}};return h(),function(){return d=!1}},l=this.gridOptionsService.get("suppressBrowserResizeObserver"),u=!!o.ResizeObserver;return u&&!l?s():a()},t.prototype.doNextPolyfillTurn=function(e){this.polyfillFunctions.push(e),this.schedulePolyfill()},t.prototype.schedulePolyfill=function(){var e=this;if(!this.polyfillScheduled){var r=function(){var i=e.polyfillFunctions;e.polyfillScheduled=!1,e.polyfillFunctions=[],i.forEach(function(o){return o()})};this.polyfillScheduled=!0,this.getFrameworkOverrides().setTimeout(r,iy)}},t=ry([I("resizeObserverService")],t),t}(D),ny=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Ro=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},sy=function(n){ny(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.createTasksP1={list:[],sorted:!1},e.createTasksP2={list:[],sorted:!1},e.destroyTasks=[],e.ticking=!1,e.scrollGoingDown=!0,e.lastPage=0,e.lastScrollTop=0,e.taskCount=0,e.cancelledTasks=new Set,e}return t.prototype.setScrollTop=function(e){var r=this.gridOptionsService.get("pagination");if(this.scrollGoingDown=e>=this.lastScrollTop,r&&e===0){var i=this.paginationProxy.getCurrentPage();i!==this.lastPage&&(this.lastPage=i,this.scrollGoingDown=!0)}this.lastScrollTop=e},t.prototype.init=function(){this.useAnimationFrame=!this.gridOptionsService.get("suppressAnimationFrame")},t.prototype.isOn=function(){return this.useAnimationFrame},t.prototype.verifyAnimationFrameOn=function(e){this.useAnimationFrame===!1&&console.warn("AG Grid: AnimationFrameService.".concat(e," called but animation frames are off"))},t.prototype.createTask=function(e,r,i){this.verifyAnimationFrameOn(i);var o={task:e,index:r,createOrder:++this.taskCount};this.addTaskToList(this[i],o),this.schedule()},t.prototype.cancelTask=function(e){this.cancelledTasks.add(e)},t.prototype.addTaskToList=function(e,r){e.list.push(r),e.sorted=!1},t.prototype.sortTaskList=function(e){if(!e.sorted){var r=this.scrollGoingDown?1:-1;e.list.sort(function(i,o){return i.index!==o.index?r*(o.index-i.index):o.createOrder-i.createOrder}),e.sorted=!0}},t.prototype.addDestroyTask=function(e){this.verifyAnimationFrameOn("createTasksP3"),this.destroyTasks.push(e),this.schedule()},t.prototype.executeFrame=function(e){this.verifyAnimationFrameOn("executeFrame");for(var r=this.createTasksP1,i=r.list,o=this.createTasksP2,s=o.list,a=this.destroyTasks,l=new Date().getTime(),u=new Date().getTime()-l,c=e<=0,p=this.ctrlsService.getGridBodyCtrl();c||u<e;){var d=p.getScrollFeature().scrollGridIfNeeded();if(!d){var h=void 0;if(i.length)this.sortTaskList(r),h=i.pop().task;else if(s.length)this.sortTaskList(o),h=s.pop().task;else if(a.length)h=a.pop();else{this.cancelledTasks.clear();break}this.cancelledTasks.has(h)||h()}u=new Date().getTime()-l}i.length||s.length||a.length?this.requestFrame():this.stopTicking()},t.prototype.stopTicking=function(){this.ticking=!1},t.prototype.flushAllFrames=function(){this.useAnimationFrame&&this.executeFrame(-1)},t.prototype.schedule=function(){this.useAnimationFrame&&(this.ticking||(this.ticking=!0,this.requestFrame()))},t.prototype.requestFrame=function(){var e=this.executeFrame.bind(this,60);this.requestAnimationFrame(e)},t.prototype.requestAnimationFrame=function(e){var r=this.gridOptionsService.getWindow();r.requestAnimationFrame?r.requestAnimationFrame(e):r.webkitRequestAnimationFrame?r.webkitRequestAnimationFrame(e):r.setTimeout(e,0)},t.prototype.isQueueEmpty=function(){return!this.ticking},t.prototype.debounce=function(e){var r=this,i=!1;return function(){if(!r.isOn()){r.getFrameworkOverrides().setTimeout(e,0);return}i||(i=!0,r.addDestroyTask(function(){i=!1,e()}))}},Ro([f("ctrlsService")],t.prototype,"ctrlsService",void 0),Ro([f("paginationProxy")],t.prototype,"paginationProxy",void 0),Ro([b],t.prototype,"init",null),t=Ro([I("animationFrameService")],t),t}(D),K;(function(n){n.EVERYTHING="group",n.FILTER="filter",n.SORT="sort",n.MAP="map",n.AGGREGATE="aggregate",n.FILTER_AGGREGATES="filter_aggregates",n.PIVOT="pivot",n.NOTHING="nothing"})(K||(K={}));var ay=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Ls=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},ly=function(n){ay(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.postConstruct=function(){this.isClientSideRowModel=this.rowModel.getType()==="clientSide"},t.prototype.expandRows=function(e){if(this.isClientSideRowModel){var r=new Set(e);this.rowModel.forEachNode(function(i){i.id&&r.has(i.id)&&(i.expanded=!0)}),this.onGroupExpandedOrCollapsed()}},t.prototype.getExpandedRows=function(){var e=[];return this.rowModel.forEachNode(function(r){var i=r.expanded,o=r.id;i&&o&&e.push(o)}),e},t.prototype.expandAll=function(e){this.isClientSideRowModel&&this.rowModel.expandOrCollapseAll(e)},t.prototype.setRowNodeExpanded=function(e,r,i){e&&(i&&e.parent&&e.parent.level!==-1&&this.setRowNodeExpanded(e.parent,r,i),e.setExpanded(r))},t.prototype.onGroupExpandedOrCollapsed=function(){this.isClientSideRowModel&&this.rowModel.refreshModel({step:K.MAP})},Ls([f("rowModel")],t.prototype,"rowModel",void 0),Ls([b],t.prototype,"postConstruct",null),t=Ls([I("expansionService")],t),t}(D),uy=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),vi=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},cy=function(n){uy(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.centerRowContainerCtrl=r.centerRowContainerCtrl})},t.prototype.getPreferredWidthForColumn=function(e,r){var i=this.getHeaderCellForColumn(e);if(!i)return-1;var o=this.rowRenderer.getAllCellsForColumn(e);return r||o.push(i),this.addElementsToContainerAndGetWidth(o)},t.prototype.getPreferredWidthForColumnGroup=function(e){var r=this.getHeaderCellForColumn(e);return r?this.addElementsToContainerAndGetWidth([r]):-1},t.prototype.addElementsToContainerAndGetWidth=function(e){var r=this,i=document.createElement("form");i.style.position="fixed";var o=this.centerRowContainerCtrl.getContainerElement();e.forEach(function(l){return r.cloneItemIntoDummy(l,i)}),o.appendChild(i);var s=i.offsetWidth;o.removeChild(i);var a=this.getAutoSizePadding();return s+a},t.prototype.getAutoSizePadding=function(){return this.gridOptionsService.get("autoSizePadding")},t.prototype.getHeaderCellForColumn=function(e){var r=null;return this.ctrlsService.getHeaderRowContainerCtrls().forEach(function(i){var o=i.getHtmlElementForColumnHeader(e);o!=null&&(r=o)}),r},t.prototype.cloneItemIntoDummy=function(e,r){var i=e.cloneNode(!0);i.style.width="",i.style.position="static",i.style.left="";var o=document.createElement("div"),s=o.classList,a=["ag-header-cell","ag-header-group-cell"].some(function(d){return i.classList.contains(d)});a?(s.add("ag-header","ag-header-row"),o.style.position="static"):s.add("ag-row");for(var l=e.parentElement;l;){var u=["ag-header-row","ag-row"].some(function(d){return l.classList.contains(d)});if(u){for(var c=0;c<l.classList.length;c++){var p=l.classList[c];p!="ag-row-position-absolute"&&s.add(p)}break}l=l.parentElement}o.appendChild(i),r.appendChild(o)},vi([f("rowRenderer")],t.prototype,"rowRenderer",void 0),vi([f("ctrlsService")],t.prototype,"ctrlsService",void 0),vi([f("rowCssClassCalculator")],t.prototype,"rowCssClassCalculator",void 0),vi([b],t.prototype,"postConstruct",null),t=vi([I("autoWidthCalculator")],t),t}(D),py=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Oo=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},dy=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.")},hy=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},fy=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},vy=function(n){py(t,n);function t(e,r){var i=n.call(this)||this;return i.createRowCon=e,i.destroyRowCtrls=r,i.stickyRowCtrls=[],i.containerHeight=0,i}return t.prototype.postConstruct=function(){var e=this;this.isClientSide=this.rowModel.getType()==="clientSide",this.ctrlsService.whenReady(function(r){e.gridBodyCtrl=r.gridBodyCtrl})},t.prototype.getStickyRowCtrls=function(){return this.stickyRowCtrls},t.prototype.checkStickyRows=function(){var e=this,r=0;if(!this.gridOptionsService.isGroupRowsSticky())return this.refreshNodesAndContainerHeight([],r);for(var i=[],o=this.rowRenderer.getFirstVisibleVerticalPixel(),s=function(h){var v,y,C;i.push(h);var m;if(e.isClientSide){for(var w=h;w.isExpandable()&&w.expanded;)if(w.master)w=w.detailNode;else if(w.childrenAfterSort){if(w.childrenAfterSort.length===0)break;w=Q(w.childrenAfterSort)}m=w.rowTop+w.rowHeight}else if(h.master)m=h.detailNode.rowTop+h.detailNode.rowHeight;else{var E=(v=h.childStore)===null||v===void 0?void 0:v.getStoreBounds();m=((y=E==null?void 0:E.heightPx)!==null&&y!==void 0?y:0)+((C=E==null?void 0:E.topPx)!==null&&C!==void 0?C:0)}var S=o+r+h.rowHeight;m<S?h.stickyRowTop=r+(m-S):h.stickyRowTop=r,r=0,i.forEach(function(R){var T=R.stickyRowTop+R.rowHeight;r<T&&(r=T)})};;){var a=o+r,l=this.rowModel.getRowIndexAtPixel(a),u=this.rowModel.getRow(l);if(u==null||u.level<0)break;for(var c=[],p=u.parent;p.level>=0;)c.push(p),p=p.parent;var d=c.reverse().find(function(h){return i.indexOf(h)<0&&h.displayed});if(d){s(d);continue}if(u.isExpandable()&&u.expanded&&u.rowTop<a){s(u);continue}break}return this.refreshNodesAndContainerHeight(i,r)},t.prototype.refreshStickyNode=function(e){for(var r=[],i=0;i<this.stickyRowCtrls.length;i++){var o=this.stickyRowCtrls[i].getRowNode();o!==e&&r.push(o)}this.refreshNodesAndContainerHeight(r,this.containerHeight)&&this.checkStickyRows()},t.prototype.refreshNodesAndContainerHeight=function(e,r){var i,o,s,a=this,l=!1,u=this.stickyRowCtrls.filter(function(C){return e.indexOf(C.getRowNode())===-1}),c=e.filter(function(C){return a.stickyRowCtrls.findIndex(function(m){return m.getRowNode()===C})===-1});(u.length||c.length)&&(l=!0);var p={};u.forEach(function(C){p[C.getRowNode().id]=C,a.stickyRowCtrls=a.stickyRowCtrls.filter(function(m){return m!==C})});try{for(var d=dy(Object.values(p)),h=d.next();!h.done;h=d.next()){var v=h.value;v.getRowNode().sticky=!1}}catch(C){i={error:C}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}this.destroyRowCtrls(p,!1);var y=c.map(function(C){return C.sticky=!0,a.createRowCon(C,!1,!1)});return(s=this.stickyRowCtrls).push.apply(s,fy([],hy(y),!1)),this.stickyRowCtrls.forEach(function(C){return C.setRowTop(C.getRowNode().stickyRowTop)}),this.stickyRowCtrls.sort(function(C,m){return m.getRowNode().rowIndex-C.getRowNode().rowIndex}),this.containerHeight!==r&&(this.containerHeight=r,this.gridBodyCtrl.setStickyTopHeight(r),l=!0),l},Oo([f("rowModel")],t.prototype,"rowModel",void 0),Oo([f("rowRenderer")],t.prototype,"rowRenderer",void 0),Oo([f("ctrlsService")],t.prototype,"ctrlsService",void 0),Oo([b],t.prototype,"postConstruct",null),t}(D),gy=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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 i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Wt=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},jt=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},yy=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.")},Cy=function(n){gy(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.destroyFuncsForColumnListeners=[],e.rowCtrlsByRowIndex={},e.zombieRowCtrls={},e.allRowCtrls=[],e.topRowCtrls=[],e.bottomRowCtrls=[],e.refreshInProgress=!1,e.dataFirstRenderedFired=!1,e.setupRangeSelectionListeners=function(){var r=function(){e.getAllCellCtrls().forEach(function(l){return l.onRangeSelectionChanged()})},i=function(){e.getAllCellCtrls().forEach(function(l){return l.updateRangeBordersIfRangeCount()})},o=function(){e.eventService.addEventListener(g.EVENT_RANGE_SELECTION_CHANGED,r),e.eventService.addEventListener(g.EVENT_COLUMN_MOVED,i),e.eventService.addEventListener(g.EVENT_COLUMN_PINNED,i),e.eventService.addEventListener(g.EVENT_COLUMN_VISIBLE,i)},s=function(){e.eventService.removeEventListener(g.EVENT_RANGE_SELECTION_CHANGED,r),e.eventService.removeEventListener(g.EVENT_COLUMN_MOVED,i),e.eventService.removeEventListener(g.EVENT_COLUMN_PINNED,i),e.eventService.removeEventListener(g.EVENT_COLUMN_VISIBLE,i)};e.addDestroyFunc(function(){return s()}),e.addManagedPropertyListener("enableRangeSelection",function(l){var u=l.currentValue;u?o():s()});var a=e.gridOptionsService.get("enableRangeSelection");a&&o()},e}return t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady(function(){e.gridBodyCtrl=e.ctrlsService.getGridBodyCtrl(),e.initialise()})},t.prototype.initialise=function(){var e=this;if(this.addManagedListener(this.eventService,g.EVENT_PAGINATION_CHANGED,this.onPageLoaded.bind(this)),this.addManagedListener(this.eventService,g.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL,this.onBodyScroll.bind(this)),this.addManagedListener(this.eventService,g.EVENT_BODY_HEIGHT_CHANGED,this.redraw.bind(this)),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],function(){return e.onDomLayoutChanged()}),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],function(){return e.redraw()}),this.addManagedPropertyListeners(["suppressCellFocus","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],function(){return e.redrawRows()}),this.gridOptionsService.isGroupRowsSticky()){var r=this.rowModel.getType();(r==="clientSide"||r==="serverSide")&&(this.stickyRowFeature=this.createManagedBean(new vy(this.createRowCon.bind(this),this.destroyRowCtrls.bind(this))))}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=this.gridOptionsService.isDomLayout("print"),this.embedFullWidthRows=this.printLayout||this.gridOptionsService.get("embedFullWidthRows"),this.redrawAfterModelUpdate()},t.prototype.initialiseCache=function(){if(this.gridOptionsService.get("keepDetailRows")){var e=this.getKeepDetailRowsCount(),r=e??3;this.cachedRowCtrls=new my(r)}},t.prototype.getKeepDetailRowsCount=function(){return this.gridOptionsService.get("keepDetailRowsCount")},t.prototype.getStickyTopRowCtrls=function(){return this.stickyRowFeature?this.stickyRowFeature.getStickyRowCtrls():[]},t.prototype.updateAllRowCtrls=function(){var e=Ft(this.rowCtrlsByRowIndex),r=this.gridOptionsService.get("ensureDomOrder"),i=this.gridOptionsService.isDomLayout("print");(r||i)&&e.sort(function(a,l){return a.getRowNode().rowIndex-l.getRowNode.rowIndex});var o=Ft(this.zombieRowCtrls),s=this.cachedRowCtrls?this.cachedRowCtrls.getEntries():[];o.length>0||s.length>0?this.allRowCtrls=jt(jt(jt([],Wt(e),!1),Wt(o),!1),Wt(s),!1):this.allRowCtrls=e},t.prototype.onCellFocusChanged=function(e){this.getAllCellCtrls().forEach(function(r){return r.onCellFocused(e)}),this.getFullWidthRowCtrls().forEach(function(r){return r.onFullWidthRowFocused(e)})},t.prototype.registerCellEventListeners=function(){var e=this;this.addManagedListener(this.eventService,g.EVENT_CELL_FOCUSED,function(r){e.onCellFocusChanged(r)}),this.addManagedListener(this.eventService,g.EVENT_CELL_FOCUS_CLEARED,function(){e.onCellFocusChanged()}),this.addManagedListener(this.eventService,g.EVENT_FLASH_CELLS,function(r){e.getAllCellCtrls().forEach(function(i){return i.onFlashCells(r)})}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_HOVER_CHANGED,function(){e.getAllCellCtrls().forEach(function(r){return r.onColumnHover()})}),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,function(){e.getAllCellCtrls().forEach(function(r){return r.onDisplayedColumnsChanged()})}),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,function(){e.printLayout&&e.getAllCellCtrls().forEach(function(r){return r.onLeftChanged()})}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedListener(this.eventService,g.EVENT_GRID_COLUMNS_CHANGED,this.refreshListenersToColumnsForCellComps.bind(this)),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))},t.prototype.removeGridColumnListeners=function(){this.destroyFuncsForColumnListeners.forEach(function(e){return e()}),this.destroyFuncsForColumnListeners.length=0},t.prototype.refreshListenersToColumnsForCellComps=function(){var e=this;this.removeGridColumnListeners();var r=this.columnModel.getAllGridColumns();r.forEach(function(i){var o=function(p){e.getAllCellCtrls().forEach(function(d){d.getColumn()===i&&p(d)})},s=function(){o(function(p){return p.onLeftChanged()})},a=function(){o(function(p){return p.onWidthChanged()})},l=function(){o(function(p){return p.onFirstRightPinnedChanged()})},u=function(){o(function(p){return p.onLastLeftPinnedChanged()})},c=function(){o(function(p){return p.onColDefChanged()})};i.addEventListener("leftChanged",s),i.addEventListener("widthChanged",a),i.addEventListener("firstRightPinnedChanged",l),i.addEventListener("lastLeftPinnedChanged",u),i.addEventListener("colDefChanged",c),e.destroyFuncsForColumnListeners.push(function(){i.removeEventListener("leftChanged",s),i.removeEventListener("widthChanged",a),i.removeEventListener("firstRightPinnedChanged",l),i.removeEventListener("lastLeftPinnedChanged",u),i.removeEventListener("colDefChanged",c)})})},t.prototype.onDomLayoutChanged=function(){var e=this.gridOptionsService.isDomLayout("print"),r=e||this.gridOptionsService.get("embedFullWidthRows"),i=r!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=r,i&&this.redrawAfterModelUpdate({domLayoutChanged:!0})},t.prototype.datasourceChanged=function(){this.firstRenderedRow=0,this.lastRenderedRow=-1;var e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)},t.prototype.onPageLoaded=function(e){var r={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(r)},t.prototype.getAllCellsForColumn=function(e){var r=[];return this.getAllRowCtrls().forEach(function(i){var o=i.getCellElement(e);o&&r.push(o)}),r},t.prototype.refreshFloatingRowComps=function(){this.refreshFloatingRows(this.topRowCtrls,this.pinnedRowModel.getPinnedTopRowData()),this.refreshFloatingRows(this.bottomRowCtrls,this.pinnedRowModel.getPinnedBottomRowData())},t.prototype.getTopRowCtrls=function(){return this.topRowCtrls},t.prototype.getCentreRowCtrls=function(){return this.allRowCtrls},t.prototype.getBottomRowCtrls=function(){return this.bottomRowCtrls},t.prototype.refreshFloatingRows=function(e,r){var i=this;e.forEach(function(o){o.destroyFirstPass(),o.destroySecondPass()}),e.length=0,r&&r.forEach(function(o){var s=new hr(o,i.beans,!1,!1,i.printLayout);e.push(s)})},t.prototype.onPinnedRowDataChanged=function(){var e={recycleRows:!0};this.redrawAfterModelUpdate(e)},t.prototype.redrawRow=function(e,r){var i=this;if(r===void 0&&(r=!1),e.sticky)this.stickyRowFeature.refreshStickyNode(e);else{var o=function(s){var a=s[e.rowIndex];a&&a.getRowNode()===e&&(a.destroyFirstPass(),a.destroySecondPass(),s[e.rowIndex]=i.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":o(this.topRowCtrls);case"bottom":o(this.bottomRowCtrls);default:o(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}r||this.dispatchDisplayedRowsChanged(!1)},t.prototype.redrawRows=function(e){var r=this,i=e!=null;if(i){e==null||e.forEach(function(o){return r.redrawRow(o,!0)}),this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()},t.prototype.getCellToRestoreFocusToAfterRefresh=function(e){var r=e!=null&&e.suppressKeepFocus?null:this.focusService.getFocusCellToUseAfterRefresh();if(r==null)return null;var i=this.gridOptionsService.getDocument(),o=i.activeElement,s=this.gridOptionsService.getDomData(o,dr.DOM_DATA_KEY_CELL_CTRL),a=this.gridOptionsService.getDomData(o,hr.DOM_DATA_KEY_ROW_CTRL),l=s||a;return l?r:null},t.prototype.redrawAfterModelUpdate=function(e){e===void 0&&(e={}),this.getLockOnRefresh();var r=this.getCellToRestoreFocusToAfterRefresh(e);this.updateContainerHeights(),this.scrollToTopIfNewData(e);var i=!e.domLayoutChanged&&!!e.recycleRows,o=e.animate&&this.gridOptionsService.isAnimateRows(),s=i?this.getRowsToRecycle():null;i||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender(),this.stickyRowFeature&&this.stickyRowFeature.checkStickyRows(),this.recycleRows(s,o),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),r!=null&&this.restoreFocusedCell(r),this.releaseLockOnRefresh()},t.prototype.scrollToTopIfNewData=function(e){var r=e.newData||e.newPage,i=this.gridOptionsService.get("suppressScrollOnNewData");r&&!i&&this.gridBodyCtrl.getScrollFeature().scrollToTop()},t.prototype.updateContainerHeights=function(){if(this.printLayout){this.rowContainerHeightService.setModelHeight(null);return}var e=this.paginationProxy.getCurrentPageHeight();e===0&&(e=1),this.rowContainerHeightService.setModelHeight(e)},t.prototype.getLockOnRefresh=function(){if(this.refreshInProgress)throw new Error("AG Grid: cannot get grid to draw rows when it is in the middle of drawing rows. Your code probably called a grid API method while the grid was in the render stage. To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0). To see what part of your code that caused the refresh check this stacktrace.");this.refreshInProgress=!0},t.prototype.releaseLockOnRefresh=function(){this.refreshInProgress=!1},t.prototype.isRefreshInProgress=function(){return this.refreshInProgress},t.prototype.restoreFocusedCell=function(e){e&&(this.focusService.setRestoreFocusedCell(e),this.onCellFocusChanged({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,api:this.beans.gridApi,columnApi:this.beans.columnApi,context:this.beans.gridOptionsService.context,type:"mock"}))},t.prototype.stopEditing=function(e){e===void 0&&(e=!1),this.getAllRowCtrls().forEach(function(r){r.stopEditing(e)})},t.prototype.getAllCellCtrls=function(){for(var e=[],r=this.getAllRowCtrls(),i=r.length,o=0;o<i;o++)for(var s=r[o].getAllCellCtrls(),a=s.length,l=0;l<a;l++)e.push(s[l]);return e},t.prototype.getAllRowCtrls=function(){var e,r,i=this.stickyRowFeature&&this.stickyRowFeature.getStickyRowCtrls()||[],o=jt(jt(jt([],Wt(this.topRowCtrls),!1),Wt(this.bottomRowCtrls),!1),Wt(i),!1);try{for(var s=yy(Object.keys(this.rowCtrlsByRowIndex)),a=s.next();!a.done;a=s.next()){var l=a.value;o.push(this.rowCtrlsByRowIndex[l])}}catch(u){e={error:u}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return o},t.prototype.addRenderedRowListener=function(e,r,i){var o=this.rowCtrlsByRowIndex[r];o&&o.addEventListener(e,i)},t.prototype.flashCells=function(e){e===void 0&&(e={});var r=e.flashDelay,i=e.fadeDelay;this.getCellCtrls(e.rowNodes,e.columns).forEach(function(o){return o.flashCell({flashDelay:r,fadeDelay:i})})},t.prototype.refreshCells=function(e){var r=this;e===void 0&&(e={});var i={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};this.getCellCtrls(e.rowNodes,e.columns).forEach(function(o){return o.refreshOrDestroyCell(i)}),e.rowNodes&&(this.getRowCtrls(e.rowNodes).forEach(function(o){if(o.isFullWidth()){var s=o.refreshFullWidth();s||r.redrawRow(o.getRowNode(),!0)}}),this.dispatchDisplayedRowsChanged(!1))},t.prototype.getCellRendererInstances=function(e){var r=this,i,o=this.getCellCtrls(e.rowNodes,e.columns).map(function(l){return l.getCellRenderer()}).filter(function(l){return l!=null});if(!((i=e.columns)===null||i===void 0)&&i.length)return o;var s=[],a=this.mapRowNodes(e.rowNodes);return this.getAllRowCtrls().forEach(function(l){if(!(a&&!r.isRowInMap(l.getRowNode(),a))&&l.isFullWidth()){var u=l.getFullWidthCellRenderer();u&&s.push(u)}}),jt(jt([],Wt(s),!1),Wt(o),!1)},t.prototype.getCellEditorInstances=function(e){var r=[];return this.getCellCtrls(e.rowNodes,e.columns).forEach(function(i){var o=i.getCellEditor();o&&r.push(o)}),r},t.prototype.getEditingCells=function(){var e=[];return this.getAllCellCtrls().forEach(function(r){if(r.isEditing()){var i=r.getCellPosition();e.push(i)}}),e},t.prototype.mapRowNodes=function(e){if(e){var r={top:{},bottom:{},normal:{}};return e.forEach(function(i){var o=i.id;i.rowPinned==="top"?r.top[o]=i:i.rowPinned==="bottom"?r.bottom[o]=i:r.normal[o]=i}),r}},t.prototype.isRowInMap=function(e,r){var i=e.id,o=e.rowPinned;return o==="bottom"?r.bottom[i]!=null:o==="top"?r.top[i]!=null:r.normal[i]!=null},t.prototype.getRowCtrls=function(e){var r=this,i=this.mapRowNodes(e),o=this.getAllRowCtrls();return!e||!i?o:o.filter(function(s){var a=s.getRowNode();return r.isRowInMap(a,i)})},t.prototype.getCellCtrls=function(e,r){var i=this,o;P(r)&&(o={},r.forEach(function(a){var l=i.columnModel.getGridColumn(a);P(l)&&(o[l.getId()]=!0)}));var s=[];return this.getRowCtrls(e).forEach(function(a){a.getAllCellCtrls().forEach(function(l){var u=l.getColumn().getId(),c=o&&!o[u];c||s.push(l)})}),s},t.prototype.destroy=function(){this.removeAllRowComps(),n.prototype.destroy.call(this)},t.prototype.removeAllRowComps=function(){var e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)},t.prototype.getRowsToRecycle=function(){var e=[];Ce(this.rowCtrlsByRowIndex,function(i,o){var s=o.getRowNode().id==null;s&&e.push(i)}),this.removeRowCtrls(e);var r={};return Ce(this.rowCtrlsByRowIndex,function(i,o){var s=o.getRowNode();r[s.id]=o}),this.rowCtrlsByRowIndex={},r},t.prototype.removeRowCtrls=function(e){var r=this;e.forEach(function(i){var o=r.rowCtrlsByRowIndex[i];o&&(o.destroyFirstPass(),o.destroySecondPass()),delete r.rowCtrlsByRowIndex[i]})},t.prototype.onBodyScroll=function(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})},t.prototype.redraw=function(e){e===void 0&&(e={});var r=e.afterScroll,i;this.stickyRowFeature&&Ki()&&(i=this.getCellToRestoreFocusToAfterRefresh()||void 0);var o=this.firstRenderedRow,s=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();var a=!1;this.stickyRowFeature&&(a=this.stickyRowFeature.checkStickyRows());var l=this.firstRenderedRow!==o||this.lastRenderedRow!==s;if(!(r&&!a&&!l)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,r),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(r),i!=null)){var u=this.getCellToRestoreFocusToAfterRefresh();i!=null&&u==null&&(this.animationFrameService.flushAllFrames(),this.restoreFocusedCell(i))}},t.prototype.removeRowCompsNotToDraw=function(e){var r={};e.forEach(function(s){return r[s]=!0});var i=Object.keys(this.rowCtrlsByRowIndex),o=i.filter(function(s){return!r[s]});this.removeRowCtrls(o)},t.prototype.calculateIndexesToDraw=function(e){var r=this,i=il(this.firstRenderedRow,this.lastRenderedRow),o=function(c,p){var d=p.getRowNode().rowIndex;d!=null&&(d<r.firstRenderedRow||d>r.lastRenderedRow)&&r.doNotUnVirtualiseRow(p)&&i.push(d)};Ce(this.rowCtrlsByRowIndex,o),Ce(e,o),i.sort(function(c,p){return c-p});for(var s=[],a=0;a<i.length;a++){var l=i[a],u=this.paginationProxy.getRow(l);u&&!u.sticky&&s.push(l)}return s},t.prototype.recycleRows=function(e,r,i){var o=this;r===void 0&&(r=!1),i===void 0&&(i=!1);var s=this.calculateIndexesToDraw(e);if(this.removeRowCompsNotToDraw(s),this.printLayout&&(r=!1),s.forEach(function(l){var u=o.createOrUpdateRowCtrl(l,e,r,i);P(u)}),e){var a=i&&!this.gridOptionsService.get("suppressAnimationFrame")&&!this.printLayout;a?this.beans.animationFrameService.addDestroyTask(function(){o.destroyRowCtrls(e,r),o.updateAllRowCtrls(),o.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,r)}this.updateAllRowCtrls()},t.prototype.dispatchDisplayedRowsChanged=function(e){e===void 0&&(e=!1);var r={type:g.EVENT_DISPLAYED_ROWS_CHANGED,afterScroll:e};this.eventService.dispatchEvent(r)},t.prototype.onDisplayedColumnsChanged=function(){var e=this.columnModel.isPinningLeft(),r=this.columnModel.isPinningRight(),i=this.pinningLeft!==e||r!==this.pinningRight;i&&(this.pinningLeft=e,this.pinningRight=r,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())},t.prototype.redrawFullWidthEmbeddedRows=function(){var e=[];this.getFullWidthRowCtrls().forEach(function(r){var i=r.getRowNode().rowIndex;e.push(i.toString())}),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})},t.prototype.getFullWidthRowCtrls=function(e){var r=this,i=this.mapRowNodes(e);return this.getAllRowCtrls().filter(function(o){if(!o.isFullWidth())return!1;var s=o.getRowNode();return!(i!=null&&!r.isRowInMap(s,i))})},t.prototype.createOrUpdateRowCtrl=function(e,r,i,o){var s,a=this.rowCtrlsByRowIndex[e];a||(s=this.paginationProxy.getRow(e),P(s)&&P(r)&&r[s.id]&&s.alreadyRendered&&(a=r[s.id],r[s.id]=null));var l=!a;if(l)if(s||(s=this.paginationProxy.getRow(e)),P(s))a=this.createRowCon(s,i,o);else return;return s&&(s.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=a,a},t.prototype.destroyRowCtrls=function(e,r){var i=this,o=[];Ce(e,function(s,a){if(a){if(i.cachedRowCtrls&&a.isCacheable()){i.cachedRowCtrls.addRow(a);return}a.destroyFirstPass(),r?(i.zombieRowCtrls[a.getInstanceId()]=a,o.push(function(){a.destroySecondPass(),delete i.zombieRowCtrls[a.getInstanceId()]})):a.destroySecondPass()}}),r&&(o.push(function(){i.updateAllRowCtrls(),i.dispatchDisplayedRowsChanged()}),fa(o))},t.prototype.getRowBuffer=function(){return this.gridOptionsService.get("rowBuffer")},t.prototype.getRowBufferInPixels=function(){var e=this.getRowBuffer(),r=this.gridOptionsService.getRowHeightAsNumber();return e*r},t.prototype.workOutFirstAndLastRowsToRender=function(){this.rowContainerHeightService.updateOffset();var e,r;if(!this.paginationProxy.isRowsToRender())e=0,r=-1;else if(this.printLayout)this.environment.refreshRowHeightVariable(),e=this.paginationProxy.getPageFirstRow(),r=this.paginationProxy.getPageLastRow();else{var i=this.getRowBufferInPixels(),o=this.ctrlsService.getGridBodyCtrl(),s=this.gridOptionsService.get("suppressRowVirtualisation"),a=!1,l=void 0,u=void 0;do{var c=this.paginationProxy.getPixelOffset(),p=this.paginationProxy.getCurrentPagePixelRange(),d=p.pageFirstPixel,h=p.pageLastPixel,v=this.rowContainerHeightService.getDivStretchOffset(),y=o.getScrollFeature().getVScrollPosition(),C=y.top,m=y.bottom;s?(l=d+v,u=h+v):(l=Math.max(C+c-i,d)+v,u=Math.min(m+c+i,h)+v),this.firstVisibleVPixel=Math.max(C+c,d)+v,a=this.ensureAllRowsInRangeHaveHeightsCalculated(l,u)}while(a);var w=this.paginationProxy.getRowIndexAtPixel(l),E=this.paginationProxy.getRowIndexAtPixel(u),S=this.paginationProxy.getPageFirstRow(),R=this.paginationProxy.getPageLastRow();w<S&&(w=S),E>R&&(E=R),e=w,r=E}var T=this.gridOptionsService.isDomLayout("normal"),F=this.gridOptionsService.get("suppressMaxRenderedRowRestriction"),A=Math.max(this.getRowBuffer(),500);T&&!F&&r-e>A&&(r=e+A);var x=e!==this.firstRenderedRow,G=r!==this.lastRenderedRow;if(x||G){this.firstRenderedRow=e,this.lastRenderedRow=r;var N={type:g.EVENT_VIEWPORT_CHANGED,firstRow:e,lastRow:r};this.eventService.dispatchEvent(N)}},t.prototype.dispatchFirstDataRenderedEvent=function(){var e=this;if(!this.dataFirstRenderedFired){this.dataFirstRenderedFired=!0;var r={type:g.EVENT_FIRST_DATA_RENDERED,firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow};window.requestAnimationFrame(function(){e.beans.eventService.dispatchEvent(r)})}},t.prototype.ensureAllRowsInRangeHaveHeightsCalculated=function(e,r){var i=this.paginationProxy.ensureRowHeightsValid(e,r,-1,-1);return i&&this.updateContainerHeights(),i},t.prototype.getFirstVisibleVerticalPixel=function(){return this.firstVisibleVPixel},t.prototype.getFirstVirtualRenderedRow=function(){return this.firstRenderedRow},t.prototype.getLastVirtualRenderedRow=function(){return this.lastRenderedRow},t.prototype.doNotUnVirtualiseRow=function(e){var r=!1,i=!0,o=e.getRowNode(),s=this.focusService.isRowNodeFocused(o),a=e.isEditing(),l=o.detail,u=s||a||l;if(!u)return r;var c=this.paginationProxy.isRowPresent(o);return c?i:r},t.prototype.createRowCon=function(e,r,i){var o=this.cachedRowCtrls?this.cachedRowCtrls.getRow(e):null;if(o)return o;var s=this.gridOptionsService.get("suppressAnimationFrame"),a=i&&!s&&!this.printLayout,l=new hr(e,this.beans,r,a,this.printLayout);return l},t.prototype.getRenderedNodes=function(){var e=this.rowCtrlsByRowIndex;return Object.keys(e).map(function(r){return e[r].getRowNode()})},t.prototype.getRowByPosition=function(e){var r,i=e.rowIndex;switch(e.rowPinned){case"top":r=this.topRowCtrls[i];break;case"bottom":r=this.bottomRowCtrls[i];break;default:r=this.rowCtrlsByRowIndex[i],r||(r=this.getStickyTopRowCtrls().find(function(o){return o.getRowNode().rowIndex===i})||null);break}return r},t.prototype.getRowNode=function(e){switch(e.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case"bottom":return this.pinnedRowModel.getPinnedBottomRowData()[e.rowIndex];default:return this.rowModel.getRow(e.rowIndex)}},t.prototype.isRangeInRenderedViewport=function(e,r){var i=e==null||r==null;if(i)return!1;var o=e>this.lastRenderedRow,s=r<this.firstRenderedRow,a=!s&&!o;return a},at([f("animationFrameService")],t.prototype,"animationFrameService",void 0),at([f("paginationProxy")],t.prototype,"paginationProxy",void 0),at([f("columnModel")],t.prototype,"columnModel",void 0),at([f("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),at([f("rowModel")],t.prototype,"rowModel",void 0),at([f("focusService")],t.prototype,"focusService",void 0),at([f("beans")],t.prototype,"beans",void 0),at([f("rowContainerHeightService")],t.prototype,"rowContainerHeightService",void 0),at([f("ctrlsService")],t.prototype,"ctrlsService",void 0),at([b],t.prototype,"postConstruct",null),t=at([I("rowRenderer")],t),t}(D),my=function(){function n(t){this.entriesMap={},this.entriesList=[],this.maxCount=t}return n.prototype.addRow=function(t){if(this.entriesMap[t.getRowNode().id]=t,this.entriesList.push(t),t.setCached(!0),this.entriesList.length>this.maxCount){var e=this.entriesList[0];e.destroyFirstPass(),e.destroySecondPass(),this.removeFromCache(e)}},n.prototype.getRow=function(t){if(t==null||t.id==null)return null;var e=this.entriesMap[t.id];if(!e)return null;this.removeFromCache(e),e.setCached(!1);var r=e.getRowNode()!=t;return r?null:e},n.prototype.removeFromCache=function(t){var e=t.getRowNode().id;delete this.entriesMap[e],Ve(this.entriesList,t)},n.prototype.getEntries=function(){return this.entriesList},n}(),Sy=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),mu=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},wy=function(n){Sy(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.formatValue=function(e,r,i,o,s){s===void 0&&(s=!0);var a=null,l,u=e.getColDef();if(o?l=o:s&&(l=u.valueFormatter),l){var c={value:i,node:r,data:r?r.data:null,colDef:u,column:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};typeof l=="function"?a=l(c):a=this.expressionService.evaluate(l,c)}else if(u.refData)return u.refData[i]||"";return a==null&&Array.isArray(i)&&(a=i.join(", ")),a},mu([f("expressionService")],t.prototype,"expressionService",void 0),t=mu([I("valueFormatterService")],t),t}(D),Ey=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},_y=function(n){Ey(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.init=function(){var e=this;this.setPinnedTopRowData(),this.setPinnedBottomRowData(),this.addManagedPropertyListener("pinnedTopRowData",function(){return e.setPinnedTopRowData()}),this.addManagedPropertyListener("pinnedBottomRowData",function(){return e.setPinnedBottomRowData()})},t.prototype.isEmpty=function(e){var r=e==="top"?this.pinnedTopRows:this.pinnedBottomRows;return _e(r)},t.prototype.isRowsToRender=function(e){return!this.isEmpty(e)},t.prototype.getRowAtPixel=function(e,r){var i=r==="top"?this.pinnedTopRows:this.pinnedBottomRows;if(_e(i))return 0;for(var o=0;o<i.length;o++){var s=i[o],a=s.rowTop+s.rowHeight-1;if(a>=e)return o}return i.length-1},t.prototype.setPinnedTopRowData=function(){var e=this.gridOptionsService.get("pinnedTopRowData");this.pinnedTopRows=this.createNodesFromData(e,!0);var r={type:g.EVENT_PINNED_ROW_DATA_CHANGED};this.eventService.dispatchEvent(r)},t.prototype.setPinnedBottomRowData=function(){var e=this.gridOptionsService.get("pinnedBottomRowData");this.pinnedBottomRows=this.createNodesFromData(e,!1);var r={type:g.EVENT_PINNED_ROW_DATA_CHANGED};this.eventService.dispatchEvent(r)},t.prototype.createNodesFromData=function(e,r){var i=this,o=[];if(e){var s=0;e.forEach(function(a,l){var u=new U(i.beans);u.data=a;var c=r?U.ID_PREFIX_TOP_PINNED:U.ID_PREFIX_BOTTOM_PINNED;u.id=c+l,u.rowPinned=r?"top":"bottom",u.setRowTop(s),u.setRowHeight(i.gridOptionsService.getRowHeightForNode(u).height),u.setRowIndex(l),s+=u.rowHeight,o.push(u)})}return o},t.prototype.getPinnedTopRowData=function(){return this.pinnedTopRows},t.prototype.getPinnedBottomRowData=function(){return this.pinnedBottomRows},t.prototype.getPinnedTopTotalHeight=function(){return this.getTotalHeight(this.pinnedTopRows)},t.prototype.getPinnedTopRowCount=function(){return this.pinnedTopRows?this.pinnedTopRows.length:0},t.prototype.getPinnedBottomRowCount=function(){return this.pinnedBottomRows?this.pinnedBottomRows.length:0},t.prototype.getPinnedTopRow=function(e){return this.pinnedTopRows[e]},t.prototype.getPinnedBottomRow=function(e){return this.pinnedBottomRows[e]},t.prototype.forEachPinnedTopRow=function(e){_e(this.pinnedTopRows)||this.pinnedTopRows.forEach(e)},t.prototype.forEachPinnedBottomRow=function(e){_e(this.pinnedBottomRows)||this.pinnedBottomRows.forEach(e)},t.prototype.getPinnedBottomTotalHeight=function(){return this.getTotalHeight(this.pinnedBottomRows)},t.prototype.getTotalHeight=function(e){if(!e||e.length===0)return 0;var r=Q(e);return r.rowTop+r.rowHeight},Is([f("beans")],t.prototype,"beans",void 0),Is([b],t.prototype,"init",null),t=Is([I("pinnedRowModel")],t),t}(D),Su;(function(n){n.Applied="Applied",n.StoreNotFound="StoreNotFound",n.StoreLoading="StoreLoading",n.StoreWaitingToLoad="StoreWaitingToLoad",n.StoreLoadingFailed="StoreLoadingFailed",n.StoreWrongType="StoreWrongType",n.Cancelled="Cancelled",n.StoreNotStarted="StoreNotStarted"})(Su||(Su={}));var To=function(){function n(t,e){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=t,this.pathRoot={rowNode:e,children:null},this.mapToItems[e.id]=this.pathRoot}return n.prototype.setInactive=function(){this.active=!1},n.prototype.isActive=function(){return this.active},n.prototype.depthFirstSearchChangedPath=function(t,e){if(t.children)for(var r=0;r<t.children.length;r++)this.depthFirstSearchChangedPath(t.children[r],e);e(t.rowNode)},n.prototype.depthFirstSearchEverything=function(t,e,r){if(t.childrenAfterGroup)for(var i=0;i<t.childrenAfterGroup.length;i++){var o=t.childrenAfterGroup[i];o.childrenAfterGroup?this.depthFirstSearchEverything(t.childrenAfterGroup[i],e,r):r&&e(o)}e(t)},n.prototype.forEachChangedNodeDepthFirst=function(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!1),this.active&&!r?this.depthFirstSearchChangedPath(this.pathRoot,t):this.depthFirstSearchEverything(this.pathRoot.rowNode,t,e)},n.prototype.executeFromRootNode=function(t){t(this.pathRoot.rowNode)},n.prototype.createPathItems=function(t){for(var e=t,r=0;!this.mapToItems[e.id];){var i={rowNode:e,children:null};this.mapToItems[e.id]=i,r++,e=e.parent}return r},n.prototype.populateColumnsMap=function(t,e){var r=this;if(!(!this.keepingColumns||!e))for(var i=t;i;)this.nodeIdsToColumns[i.id]||(this.nodeIdsToColumns[i.id]={}),e.forEach(function(o){return r.nodeIdsToColumns[i.id][o.getId()]=!0}),i=i.parent},n.prototype.linkPathItems=function(t,e){for(var r=t,i=0;i<e;i++){var o=this.mapToItems[r.id],s=this.mapToItems[r.parent.id];s.children||(s.children=[]),s.children.push(o),r=r.parent}},n.prototype.addParentNode=function(t,e){if(!(!t||t.isRowPinned())){var r=this.createPathItems(t);this.linkPathItems(t,r),this.populateColumnsMap(t,e)}},n.prototype.canSkip=function(t){return this.active&&!this.mapToItems[t.id]},n.prototype.getValueColumnsForNode=function(t,e){if(!this.keepingColumns)return e;var r=this.nodeIdsToColumns[t.id],i=e.filter(function(o){return r[o.getId()]});return i},n.prototype.getNotValueColumnsForNode=function(t,e){if(!this.keepingColumns)return null;var r=this.nodeIdsToColumns[t.id],i=e.filter(function(o){return!r[o.getId()]});return i},n}(),Ry=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),xs=function(n){Ry(t,n);function t(e){var r=n.call(this)||this;return r.state=t.STATE_WAITING_TO_LOAD,r.version=0,r.id=e,r}return t.prototype.getId=function(){return this.id},t.prototype.load=function(){this.state=t.STATE_LOADING,this.loadFromDatasource()},t.prototype.getVersion=function(){return this.version},t.prototype.setStateWaitingToLoad=function(){this.version++,this.state=t.STATE_WAITING_TO_LOAD},t.prototype.getState=function(){return this.state},t.prototype.pageLoadFailed=function(e){var r=this.isRequestMostRecentAndLive(e);r&&(this.state=t.STATE_FAILED,this.processServerFail()),this.dispatchLoadCompleted(!1)},t.prototype.success=function(e,r){this.successCommon(e,r)},t.prototype.pageLoaded=function(e,r,i){this.successCommon(e,{rowData:r,rowCount:i})},t.prototype.isRequestMostRecentAndLive=function(e){var r=e===this.version,i=this.isAlive();return r&&i},t.prototype.successCommon=function(e,r){this.dispatchLoadCompleted();var i=this.isRequestMostRecentAndLive(e);i&&(this.state=t.STATE_LOADED,this.processServerResult(r))},t.prototype.dispatchLoadCompleted=function(e){e===void 0&&(e=!0);var r={type:t.EVENT_LOAD_COMPLETE,success:e,block:this};this.dispatchEvent(r)},t.EVENT_LOAD_COMPLETE="loadComplete",t.STATE_WAITING_TO_LOAD="needsLoading",t.STATE_LOADING="loading",t.STATE_LOADED="loaded",t.STATE_FAILED="failed",t}(D),Oy=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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 i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Ty=function(n,t){return function(e,r){t(e,r,n)}},Py=function(n){Oy(t,n);function t(){var r=n!==null&&n.apply(this,arguments)||this;return r.activeBlockLoadsCount=0,r.blocks=[],r.active=!0,r}e=t,t.prototype.postConstruct=function(){this.maxConcurrentRequests=this.getMaxConcurrentDatasourceRequests();var r=this.gridOptionsService.get("blockLoadDebounceMillis");r&&r>0&&(this.checkBlockToLoadDebounce=z.debounce(this.performCheckBlocksToLoad.bind(this),r))},t.prototype.setBeans=function(r){this.logger=r.create("RowNodeBlockLoader")},t.prototype.getMaxConcurrentDatasourceRequests=function(){var r=this.gridOptionsService.get("maxConcurrentDatasourceRequests");if(r==null)return 2;if(!(r<=0))return r},t.prototype.addBlock=function(r){this.blocks.push(r),r.addEventListener(xs.EVENT_LOAD_COMPLETE,this.loadComplete.bind(this)),this.checkBlockToLoad()},t.prototype.removeBlock=function(r){z.removeFromArray(this.blocks,r)},t.prototype.destroy=function(){n.prototype.destroy.call(this),this.active=!1},t.prototype.loadComplete=function(){this.activeBlockLoadsCount--,this.checkBlockToLoad(),this.dispatchEvent({type:e.BLOCK_LOADED_EVENT}),this.activeBlockLoadsCount==0&&this.dispatchEvent({type:e.BLOCK_LOADER_FINISHED_EVENT})},t.prototype.checkBlockToLoad=function(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()},t.prototype.performCheckBlocksToLoad=function(){if(this.active){if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){this.logger.log("checkBlockToLoad: max loads exceeded");return}var r=this.getAvailableLoadingCount(),i=this.blocks.filter(function(o){return o.getState()===xs.STATE_WAITING_TO_LOAD}).slice(0,r);this.registerLoads(i.length),i.forEach(function(o){return o.load()}),this.printCacheStatus()}},t.prototype.getBlockState=function(){if(this.gridOptionsService.isRowModelType("serverSide")){var r=this.rowModel;return r.getBlockStates()}var i={};return this.blocks.forEach(function(o){var s=o.getBlockStateJson(),a=s.id,l=s.state;i[a]=l}),i},t.prototype.printCacheStatus=function(){this.logger.isLogging()&&this.logger.log("printCacheStatus: activePageLoadsCount = ".concat(this.activeBlockLoadsCount,",")+" blocks = ".concat(JSON.stringify(this.getBlockState())))},t.prototype.isLoading=function(){return this.activeBlockLoadsCount>0},t.prototype.registerLoads=function(r){this.activeBlockLoadsCount+=r},t.prototype.getAvailableLoadingCount=function(){return this.maxConcurrentRequests!==void 0?this.maxConcurrentRequests-this.activeBlockLoadsCount:void 0};var e;return t.BLOCK_LOADED_EVENT="blockLoaded",t.BLOCK_LOADER_FINISHED_EVENT="blockLoaderFinished",Po([f("rowModel")],t.prototype,"rowModel",void 0),Po([b],t.prototype,"postConstruct",null),Po([Ty(0,Re("loggerFactory"))],t.prototype,"setBeans",null),t=e=Po([I("rowNodeBlockLoader")],t),t}(D),Dy=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Ms=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Ay=function(n){Dy(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.currentPage=0,e.topDisplayedRowIndex=0,e.bottomDisplayedRowIndex=0,e.pixelOffset=0,e.masterRowCount=0,e}return t.prototype.postConstruct=function(){this.active=this.gridOptionsService.get("pagination"),this.pageSizeFromGridOptions=this.gridOptionsService.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedListener(this.eventService,g.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this)),this.onModelUpdated()},t.prototype.ensureRowHeightsValid=function(e,r,i,o){var s=this.rowModel.ensureRowHeightsValid(e,r,this.getPageFirstRow(),this.getPageLastRow());return s&&this.calculatePages(),s},t.prototype.isPaginateChildRows=function(){var e=this.gridOptionsService.get("groupRemoveSingleChildren")||this.gridOptionsService.get("groupRemoveLowestSingleChildren");return e?!0:this.gridOptionsService.get("paginateChildRows")},t.prototype.onModelUpdated=function(e){this.calculatePages();var r={type:g.EVENT_PAGINATION_CHANGED,animate:e?e.animate:!1,newData:e?e.newData:!1,newPage:e?e.newPage:!1,newPageSize:e?e.newPageSize:!1,keepRenderedRows:e?e.keepRenderedRows:!1};this.eventService.dispatchEvent(r)},t.prototype.onPaginationGridOptionChanged=function(){this.active=this.gridOptionsService.get("pagination"),this.calculatePages();var e={type:g.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!1,keepRenderedRows:!0};this.eventService.dispatchEvent(e)},t.prototype.onPageSizeGridOptionChanged=function(){this.setPageSize(this.gridOptionsService.get("paginationPageSize"),"gridOptions")},t.prototype.goToPage=function(e){if(!(!this.active||this.currentPage===e||typeof this.currentPage!="number")){this.currentPage=e;var r={type:g.EVENT_MODEL_UPDATED,animate:!1,keepRenderedRows:!1,newData:!1,newPage:!0,newPageSize:!1};this.onModelUpdated(r)}},t.prototype.getPixelOffset=function(){return this.pixelOffset},t.prototype.getRow=function(e){return this.rowModel.getRow(e)},t.prototype.getRowNode=function(e){return this.rowModel.getRowNode(e)},t.prototype.getRowIndexAtPixel=function(e){return this.rowModel.getRowIndexAtPixel(e)},t.prototype.getCurrentPageHeight=function(){return V(this.topRowBounds)||V(this.bottomRowBounds)?0:Math.max(this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight-this.topRowBounds.rowTop,0)},t.prototype.getCurrentPagePixelRange=function(){var e=this.topRowBounds?this.topRowBounds.rowTop:0,r=this.bottomRowBounds?this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight:0;return{pageFirstPixel:e,pageLastPixel:r}},t.prototype.isRowPresent=function(e){if(!this.rowModel.isRowPresent(e))return!1;var r=e.rowIndex>=this.topDisplayedRowIndex&&e.rowIndex<=this.bottomDisplayedRowIndex;return r},t.prototype.isEmpty=function(){return this.rowModel.isEmpty()},t.prototype.isRowsToRender=function(){return this.rowModel.isRowsToRender()},t.prototype.forEachNode=function(e){return this.rowModel.forEachNode(e)},t.prototype.forEachNodeOnPage=function(e){for(var r=this.getPageFirstRow(),i=this.getPageLastRow(),o=r;o<=i;o++){var s=this.getRow(o);s&&e(s)}},t.prototype.getType=function(){return this.rowModel.getType()},t.prototype.getRowBounds=function(e){var r=this.rowModel.getRowBounds(e);return r.rowIndex=e,r},t.prototype.getPageFirstRow=function(){return this.topRowBounds?this.topRowBounds.rowIndex:-1},t.prototype.getPageLastRow=function(){return this.bottomRowBounds?this.bottomRowBounds.rowIndex:-1},t.prototype.getRowCount=function(){return this.rowModel.getRowCount()},t.prototype.getPageForIndex=function(e){return Math.floor(e/this.pageSize)},t.prototype.goToPageWithIndex=function(e){if(this.active){var r=this.getPageForIndex(e);this.goToPage(r)}},t.prototype.isRowInPage=function(e){if(!this.active)return!0;var r=this.getPageForIndex(e.rowIndex);return r===this.currentPage},t.prototype.isLastPageFound=function(){return this.rowModel.isLastRowIndexKnown()},t.prototype.getCurrentPage=function(){return this.currentPage},t.prototype.goToNextPage=function(){this.goToPage(this.currentPage+1)},t.prototype.goToPreviousPage=function(){this.goToPage(this.currentPage-1)},t.prototype.goToFirstPage=function(){this.goToPage(0)},t.prototype.goToLastPage=function(){var e=this.rowModel.getRowCount(),r=Math.floor(e/this.pageSize);this.goToPage(r)},t.prototype.getPageSize=function(){return this.pageSize},t.prototype.getTotalPages=function(){return this.totalPages},t.prototype.setPage=function(e){this.currentPage=e},Object.defineProperty(t.prototype,"pageSize",{get:function(){return P(this.pageSizeAutoCalculated)?this.pageSizeAutoCalculated:P(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:P(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:P(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize},enumerable:!1,configurable:!0}),t.prototype.unsetAutoCalculatedPageSize=function(){if(this.pageSizeAutoCalculated!==void 0){var e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&this.onModelUpdated({type:g.EVENT_MODEL_UPDATED,animate:!1,keepRenderedRows:!1,newData:!1,newPage:!1,newPageSize:!0})}},t.prototype.setPageSize=function(e,r){var i=this.pageSize;switch(r){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}if(i!==this.pageSize){var o={type:g.EVENT_MODEL_UPDATED,animate:!1,keepRenderedRows:!1,newData:!1,newPage:!1,newPageSize:!0};this.onModelUpdated(o)}},t.prototype.calculatePages=function(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.topRowBounds=this.rowModel.getRowBounds(this.topDisplayedRowIndex),this.topRowBounds&&(this.topRowBounds.rowIndex=this.topDisplayedRowIndex),this.bottomRowBounds=this.rowModel.getRowBounds(this.bottomDisplayedRowIndex),this.bottomRowBounds&&(this.bottomRowBounds.rowIndex=this.bottomDisplayedRowIndex),this.setPixelOffset(P(this.topRowBounds)?this.topRowBounds.rowTop:0)},t.prototype.setPixelOffset=function(e){this.pixelOffset!==e&&(this.pixelOffset=e,this.eventService.dispatchEvent({type:g.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED}))},t.prototype.setZeroRows=function(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0},t.prototype.adjustCurrentPageIfInvalid=function(){this.currentPage>=this.totalPages&&(this.currentPage=this.totalPages-1),(!isFinite(this.currentPage)||isNaN(this.currentPage)||this.currentPage<0)&&(this.currentPage=0)},t.prototype.calculatePagesMasterRowsOnly=function(){if(this.masterRowCount=this.rowModel.getTopLevelRowCount(),this.masterRowCount<=0){this.setZeroRows();return}var e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid();var r=this.pageSize*this.currentPage,i=this.pageSize*(this.currentPage+1)-1;if(i>e&&(i=e),this.topDisplayedRowIndex=this.rowModel.getTopLevelRowDisplayedIndex(r),i===e)this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1;else{var o=this.rowModel.getTopLevelRowDisplayedIndex(i+1);this.bottomDisplayedRowIndex=o-1}},t.prototype.getMasterRowCount=function(){return this.masterRowCount},t.prototype.calculatePagesAllRows=function(){if(this.masterRowCount=this.rowModel.getRowCount(),this.masterRowCount===0){this.setZeroRows();return}var e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=this.pageSize*this.currentPage,this.bottomDisplayedRowIndex=this.pageSize*(this.currentPage+1)-1,this.bottomDisplayedRowIndex>e&&(this.bottomDisplayedRowIndex=e)},t.prototype.calculatedPagesNotActive=function(){this.setPageSize(this.masterRowCount,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1},Ms([f("rowModel")],t.prototype,"rowModel",void 0),Ms([b],t.prototype,"postConstruct",null),t=Ms([I("paginationProxy")],t),t}(D),by=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),wu=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Fy=function(n){by(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.processAllCellClasses=function(e,r,i,o){this.processClassRules(void 0,e.cellClassRules,r,i,o),this.processStaticCellClasses(e,r,i)},t.prototype.processClassRules=function(e,r,i,o,s){if(!(r==null&&e==null)){var a={},l={},u=function(v,y){v.split(" ").forEach(function(C){C.trim()!=""&&y(C)})};if(r)for(var c=Object.keys(r),p=function(v){var y=c[v],C=r[y],m;typeof C=="string"?m=d.expressionService.evaluate(C,i):typeof C=="function"&&(m=C(i)),u(y,function(w){m?a[w]=!0:l[w]=!0})},d=this,h=0;h<c.length;h++)p(h);e&&s&&Object.keys(e).forEach(function(v){return u(v,function(y){a[y]||(l[y]=!0)})}),s&&Object.keys(l).forEach(s),Object.keys(a).forEach(o)}},t.prototype.getStaticCellClasses=function(e,r){var i=e.cellClass;if(!i)return[];var o;if(typeof i=="function"){var s=i;o=s(r)}else o=i;return typeof o=="string"&&(o=[o]),o||[]},t.prototype.processStaticCellClasses=function(e,r,i){var o=this.getStaticCellClasses(e,r);o.forEach(function(s){i(s)})},wu([f("expressionService")],t.prototype,"expressionService",void 0),t=wu([I("stylingService")],t),t}(D),Ly=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Iy=function(n){Ly(t,n);function t(e){return n.call(this,e,"ag-toggle-button")||this}return t.prototype.setValue=function(e,r){return n.prototype.setValue.call(this,e,r),this.addOrRemoveCssClass("ag-selected",this.getValue()),this},t}(to),xy=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),My=function(n){xy(t,n);function t(e){return n.call(this,e,"ag-text-area",null,"textarea")||this}return t.prototype.setValue=function(e,r){var i=n.prototype.setValue.call(this,e,r);return this.eInput.value=e,i},t.prototype.setCols=function(e){return this.eInput.cols=e,this},t.prototype.setRows=function(e){return this.eInput.rows=e,this},t}(Ht),Ny=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Gy=function(n){Ny(t,n);function t(e){return n.call(this,e,"ag-date-field","date")||this}return t.prototype.postConstruct=function(){var e=this;n.prototype.postConstruct.call(this),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this));var r=nt();this.addManagedListener(this.eInput,"mousedown",function(){e.isDisabled()||r||e.eInput.focus()}),this.eInput.step="any"},t.prototype.onWheel=function(e){document.activeElement===this.eInput&&e.preventDefault()},t.prototype.setMin=function(e){var r,i=e instanceof Date?(r=Ye(e??null,!1))!==null&&r!==void 0?r:void 0:e;return this.min===i?this:(this.min=i,ft(this.eInput,"min",i),this)},t.prototype.setMax=function(e){var r,i=e instanceof Date?(r=Ye(e??null,!1))!==null&&r!==void 0?r:void 0:e;return this.max===i?this:(this.max=i,ft(this.eInput,"max",i),this)},t.prototype.setStep=function(e){return this.step===e?this:(this.step=e,ft(this.eInput,"step",e),this)},t.prototype.getDate=function(){var e;if(this.eInput.validity.valid)return(e=Oe(this.getValue()))!==null&&e!==void 0?e:void 0},t.prototype.setDate=function(e,r){this.setValue(Ye(e??null,!1),r)},t}(sr),Vy=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Hy=function(n){Vy(t,n);function t(e){return n.call(this,e,"ag-range-field","range")||this}return t.prototype.postConstruct=function(){n.prototype.postConstruct.call(this);var e=this.config,r=e.min,i=e.max,o=e.step;r!=null&&this.setMinValue(r),i!=null&&this.setMaxValue(i),this.setStep(o||1)},t.prototype.addInputListeners=function(){var e=this;this.addManagedListener(this.eInput,"input",function(r){var i=r.target.value;e.setValue(i)})},t.prototype.setMinValue=function(e){return this.min=e,this.eInput.setAttribute("min",e.toString()),this},t.prototype.setMaxValue=function(e){return this.max=e,this.eInput.setAttribute("max",e.toString()),this},t.prototype.setStep=function(e){return this.eInput.setAttribute("step",e.toString()),this},t.prototype.setValue=function(e,r){this.min!=null&&(e=Math.max(parseFloat(e),this.min).toString()),this.max!=null&&(e=Math.min(parseFloat(e),this.max).toString());var i=n.prototype.setValue.call(this,e,r);return this.eInput.value=e,i},t}(Ht),By=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Eu=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},ky=function(n){By(t,n);function t(e,r){var i=n.call(this,'<div class="ag-rich-select-row" role="presentation"></div>')||this;return i.params=e,i.wrapperEl=r,i}return t.prototype.postConstruct=function(){this.addManagedListener(this.getGui(),"mouseup",this.onMouseUp.bind(this))},t.prototype.setState=function(e){var r="";this.params.valueFormatter&&(r=this.params.valueFormatter(e));var i=this.populateWithRenderer(e,r);i||this.populateWithoutRenderer(e,r),this.value=e},t.prototype.highlightString=function(e){var r=this.parsedValue;if(!(this.params.cellRenderer||!P(r))){var i=P(e);if(i){var o=r==null?void 0:r.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(o>=0){var s=o+e.length,a=se(r.slice(0,o),!0),l=se(r.slice(o,s),!0),u=se(r.slice(s));this.renderValueWithoutRenderer("".concat(a,'<span class="ag-rich-select-row-text-highlight">').concat(l,"</span>").concat(u))}else i=!1}i||this.renderValueWithoutRenderer(r)}},t.prototype.updateHighlighted=function(e){var r,i=this.getGui(),o="ag-rich-select-row-".concat(this.getCompId());if((r=i.parentElement)===null||r===void 0||r.setAttribute("id",o),e){var s=this.getParentComponent().getAriaElement();dn(s,o),this.wrapperEl.setAttribute("data-active-option",o)}Er(i.parentElement,e),this.addOrRemoveCssClass("ag-rich-select-row-selected",e)},t.prototype.populateWithoutRenderer=function(e,r){var i=this.gridOptionsService.getDocument(),o=this.getGui(),s=i.createElement("span");s.style.overflow="hidden",s.style.textOverflow="ellipsis";var a=se(P(r)?r:e,!0);this.parsedValue=P(a)?a:null,o.appendChild(s),this.renderValueWithoutRenderer(a)},t.prototype.renderValueWithoutRenderer=function(e){var r=this.getGui().querySelector("span");r&&(r.innerHTML=P(e)?e:" ")},t.prototype.populateWithRenderer=function(e,r){var i=this,o,s;return this.params.cellRenderer&&(s=this.userComponentFactory.getCellRendererDetails(this.params,{value:e,valueFormatted:r,api:this.gridOptionsService.api})),s&&(o=s.newAgStackInstance()),o&&jn(o,this.getGui()),o?(o.then(function(a){i.addDestroyFunc(function(){i.getContext().destroyBean(a)})}),!0):!1},t.prototype.onMouseUp=function(){var e=this.getParentComponent(),r={type:g.EVENT_FIELD_PICKER_VALUE_SELECTED,fromEnterKey:!1,value:this.value};e==null||e.dispatchEvent(r)},Eu([f("userComponentFactory")],t.prototype,"userComponentFactory",void 0),Eu([b],t.prototype,"postConstruct",null),t}(W),Wy=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),_u=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},xr;(function(n){n.TAB_GUARD="ag-tab-guard",n.TAB_GUARD_TOP="ag-tab-guard-top",n.TAB_GUARD_BOTTOM="ag-tab-guard-bottom"})(xr||(xr={}));var jy=function(n){Wy(t,n);function t(e){var r=n.call(this)||this;r.skipTabGuardFocus=!1;var i=e.comp,o=e.eTopGuard,s=e.eBottomGuard,a=e.focusInnerElement,l=e.onFocusIn,u=e.onFocusOut,c=e.shouldStopEventPropagation,p=e.onTabKeyDown,d=e.handleKeyDown,h=e.eFocusableElement;return r.comp=i,r.eTopGuard=o,r.eBottomGuard=s,r.providedFocusInnerElement=a,r.eFocusableElement=h,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 Vt(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.get("tabIndex");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 i=this.tabGuardsAreActive();i&&this.deactivateTabGuards();var o=this.getNextFocusableElement(e.shiftKey);i&&setTimeout(function(){return r.activateTabGuards()},0),o&&(o.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()},_u([f("focusService")],t.prototype,"focusService",void 0),_u([b],t.prototype,"postConstruct",null),t}(D),Uy=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),zy=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},$y=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},Do=function(n){Uy(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.initialiseTabGuard=function(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.getFocusableElement();var r=[this.eTopGuard,this.eBottomGuard],i={setTabIndex:function(o){r.forEach(function(s){return o!=null?s.setAttribute("tabindex",o):s.removeAttribute("tabindex")})}};this.addTabGuards(this.eTopGuard,this.eBottomGuard),this.tabGuardCtrl=this.createManagedBean(new jy({comp:i,eTopGuard:this.eTopGuard,eBottomGuard:this.eBottomGuard,eFocusableElement:this.eFocusableElement,onFocusIn:e.onFocusIn,onFocusOut:e.onFocusOut,focusInnerElement:e.focusInnerElement,handleKeyDown:e.handleKeyDown,onTabKeyDown:e.onTabKeyDown,shouldStopEventPropagation:e.shouldStopEventPropagation}))},t.prototype.createTabGuard=function(e){var r=document.createElement("div"),i=e==="top"?xr.TAB_GUARD_TOP:xr.TAB_GUARD_BOTTOM;return r.classList.add(xr.TAB_GUARD,i),pe(r,"presentation"),r},t.prototype.addTabGuards=function(e,r){this.eFocusableElement.insertAdjacentElement("afterbegin",e),this.eFocusableElement.insertAdjacentElement("beforeend",r)},t.prototype.removeAllChildrenExceptTabGuards=function(){var e=[this.eTopGuard,this.eBottomGuard];he(this.getFocusableElement()),this.addTabGuards.apply(this,$y([],zy(e),!1))},t.prototype.forceFocusOutOfContainer=function(e){e===void 0&&(e=!1),this.tabGuardCtrl.forceFocusOutOfContainer(e)},t.prototype.appendChild=function(e,r){Xr(e)||(e=e.getGui());var i=this.eBottomGuard;i?i.insertAdjacentElement("beforebegin",e):n.prototype.appendChild.call(this,e,r)},t}(W),Ky=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Ao=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Ru=function(n){Ky(t,n);function t(e){var r=n.call(this,t.getTemplate((e==null?void 0:e.cssIdentifier)||"default"))||this;r.renderedRows=new Map,r.rowHeight=20;var i=e||{},o=i.cssIdentifier,s=o===void 0?"default":o,a=i.ariaRole,l=a===void 0?"listbox":a,u=i.listName;return r.cssIdentifier=s,r.ariaRole=l,r.listName=u,r}return t.prototype.postConstruct=function(){var e=this;this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:function(r){return e.onFocusIn(r)},onFocusOut:function(r){return e.onFocusOut(r)},focusInnerElement:function(r){return e.focusInnerElement(r)},onTabKeyDown:function(r){return e.onTabKeyDown(r)},handleKeyDown:function(r){return e.handleKeyDown(r)}}),this.setAriaProperties(),this.addManagedListener(this.eventService,g.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanged.bind(this))},t.prototype.onGridStylesChanged=function(){this.rowHeight=this.getItemHeight(),this.refresh()},t.prototype.setAriaProperties=function(){var e=this.localeService.getLocaleTextFunc(),r=e("ariaDefaultListName",this.listName||"List"),i=this.eContainer;pe(i,this.ariaRole),Rt(i,r)},t.prototype.addResizeObserver=function(){var e=this,r=function(){return e.animationFrameService.requestAnimationFrame(function(){return e.drawVirtualRows()})},i=this.resizeObserverService.observeResize(this.getGui(),r);this.addDestroyFunc(i)},t.prototype.focusInnerElement=function(e){this.focusRow(e?this.model.getRowCount()-1:0)},t.prototype.onFocusIn=function(e){var r=e.target;return r.classList.contains("ag-virtual-list-item")&&(this.lastFocusedRowIndex=ka(r)-1),!1},t.prototype.onFocusOut=function(e){return this.getFocusableElement().contains(e.relatedTarget)||(this.lastFocusedRowIndex=null),!1},t.prototype.handleKeyDown=function(e){switch(e.key){case _.UP:case _.DOWN:this.navigate(e.key===_.UP)&&e.preventDefault();break}},t.prototype.onTabKeyDown=function(e){this.navigate(e.shiftKey)?e.preventDefault():(dt(e),this.forceFocusOutOfContainer(e.shiftKey))},t.prototype.navigate=function(e){if(this.lastFocusedRowIndex==null)return!1;var r=this.lastFocusedRowIndex+(e?-1:1);return r<0||r>=this.model.getRowCount()?!1:(this.focusRow(r),!0)},t.prototype.getLastFocusedRow=function(){return this.lastFocusedRowIndex},t.prototype.focusRow=function(e){var r=this;this.ensureIndexVisible(e),window.setTimeout(function(){if(r.isAlive()){var i=r.renderedRows.get(e);i&&i.eDiv.focus()}},10)},t.prototype.getComponentAt=function(e){var r=this.renderedRows.get(e);return r&&r.rowComponent},t.prototype.forEachRenderedRow=function(e){this.renderedRows.forEach(function(r,i){return e(r.rowComponent,i)})},t.getTemplate=function(e){return'<div class="ag-virtual-list-viewport ag-'.concat(e,`-virtual-list-viewport" role="presentation">
|
||
<div class="ag-virtual-list-container ag-`).concat(e,`-virtual-list-container" ref="eContainer"></div>
|
||
</div>`)},t.prototype.getItemHeight=function(){return this.environment.getListItemHeight()},t.prototype.ensureIndexVisible=function(e,r){r===void 0&&(r=!0);var i=this.model.getRowCount();if(typeof e!="number"||e<0||e>=i)return console.warn("AG Grid: invalid row index for ensureIndexVisible: "+e),!1;var o=e*this.rowHeight,s=o+this.rowHeight,a=this.getGui(),l=a.scrollTop,u=a.offsetHeight,c=l+u,p=r?0:this.rowHeight,d=l>o+p,h=c<s-p;if(d)return a.scrollTop=o,!0;if(h){var v=s-u;return a.scrollTop=v,!0}return!1},t.prototype.setComponentCreator=function(e){this.componentCreator=e},t.prototype.setComponentUpdater=function(e){this.componentUpdater=e},t.prototype.getRowHeight=function(){return this.rowHeight},t.prototype.getScrollTop=function(){return this.getGui().scrollTop},t.prototype.setRowHeight=function(e){this.rowHeight=e,this.refresh()},t.prototype.refresh=function(e){var r=this;if(!(this.model==null||!this.isAlive())){var i=this.model.getRowCount();this.eContainer.style.height="".concat(i*this.rowHeight,"px"),en(function(){return r.eContainer.clientHeight>=i*r.rowHeight},function(){r.isAlive()&&(r.canSoftRefresh(e)?r.drawVirtualRows(!0):(r.clearVirtualRows(),r.drawVirtualRows()))})}},t.prototype.canSoftRefresh=function(e){return!!(e&&this.renderedRows.size&&typeof this.model.areRowsEqual=="function"&&this.componentUpdater)},t.prototype.clearVirtualRows=function(){var e=this;this.renderedRows.forEach(function(r,i){return e.removeRow(i)})},t.prototype.drawVirtualRows=function(e){if(!(!this.isAlive()||!this.model)){var r=this.getGui(),i=r.scrollTop,o=i+r.offsetHeight,s=Math.floor(i/this.rowHeight),a=Math.floor(o/this.rowHeight);this.ensureRowsRendered(s,a,e)}},t.prototype.ensureRowsRendered=function(e,r,i){var o=this;this.renderedRows.forEach(function(a,l){(l<e||l>r)&&l!==o.lastFocusedRowIndex&&o.removeRow(l)}),i&&this.refreshRows();for(var s=e;s<=r;s++)this.renderedRows.has(s)||s<this.model.getRowCount()&&this.insertRow(s)},t.prototype.insertRow=function(e){var r=this,i=this.model.getRow(e),o=document.createElement("div");o.classList.add("ag-virtual-list-item","ag-".concat(this.cssIdentifier,"-virtual-list-item")),pe(o,this.ariaRole==="tree"?"treeitem":"option"),hn(o,this.model.getRowCount()),fn(o,e+1),o.setAttribute("tabindex","-1"),o.style.height="".concat(this.rowHeight,"px"),o.style.top="".concat(this.rowHeight*e,"px");var s=this.componentCreator(i,o);s.addGuiEventListener("focusin",function(){return r.lastFocusedRowIndex=e}),o.appendChild(s.getGui()),this.renderedRows.has(e-1)?this.renderedRows.get(e-1).eDiv.insertAdjacentElement("afterend",o):this.renderedRows.has(e+1)?this.renderedRows.get(e+1).eDiv.insertAdjacentElement("beforebegin",o):this.eContainer.appendChild(o),this.renderedRows.set(e,{rowComponent:s,eDiv:o,value:i})},t.prototype.removeRow=function(e){var r=this.renderedRows.get(e);this.eContainer.removeChild(r.eDiv),this.destroyBean(r.rowComponent),this.renderedRows.delete(e)},t.prototype.refreshRows=function(){var e=this,r=this.model.getRowCount();this.renderedRows.forEach(function(i,o){var s,a;if(o>=r)e.removeRow(o);else{var l=e.model.getRow(o);!((a=(s=e.model).areRowsEqual)===null||a===void 0)&&a.call(s,i.value,l)?e.componentUpdater(l,i.rowComponent):e.removeRow(o)}})},t.prototype.addScrollListener=function(){var e=this;this.addGuiEventListener("scroll",function(){return e.drawVirtualRows()},{passive:!0})},t.prototype.setModel=function(e){this.model=e},t.prototype.getAriaElement=function(){return this.eContainer},t.prototype.destroy=function(){this.isAlive()&&(this.clearVirtualRows(),n.prototype.destroy.call(this))},Ao([f("resizeObserverService")],t.prototype,"resizeObserverService",void 0),Ao([f("animationFrameService")],t.prototype,"animationFrameService",void 0),Ao([L("eContainer")],t.prototype,"eContainer",void 0),Ao([b],t.prototype,"postConstruct",null),t}(Do),Yy=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),bo=function(){return bo=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},bo.apply(this,arguments)},Ou=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},qy=`
|
||
<div class="ag-picker-field" role="presentation">
|
||
<div ref="eLabel"></div>
|
||
<div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-rich-select-value ag-picker-collapsed">
|
||
<div ref="eDisplayField" class="ag-picker-field-display"></div>
|
||
<ag-input-text-field ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>
|
||
<div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
|
||
</div>
|
||
</div>`,Qy=function(n){Yy(t,n);function t(e){var r=this,i,o;r=n.call(this,bo(bo({pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"ag-list",className:"ag-rich-select",pickerIcon:"smallDown",ariaRole:"combobox",template:(i=e==null?void 0:e.template)!==null&&i!==void 0?i:qy,modalPicker:!1},e),{maxPickerHeight:(o=e==null?void 0:e.maxPickerHeight)!==null&&o!==void 0?o:"calc(var(--ag-row-height) * 6.5)"}))||this,r.searchString="",r.highlightedItem=-1,r.lastRowHovered=-1,r.searchStringCreator=null;var s=e||{},a=s.cellRowHeight,l=s.value,u=s.valueList,c=s.searchStringCreator;return a!=null&&(r.cellRowHeight=a),l!==void 0&&(r.value=l),u!=null&&(r.values=u),c&&(r.searchStringCreator=c),r}return t.prototype.postConstruct=function(){var e=this;n.prototype.postConstruct.call(this),this.createLoadingElement(),this.createListComponent();var r=this.config,i=r.allowTyping,o=r.placeholder;i?(this.eInput.setAutoComplete(!1).setInputPlaceholder(o),this.eDisplayField.classList.add("ag-hidden")):this.eInput.setDisplayed(!1),this.eWrapper.tabIndex=this.gridOptionsService.get("tabIndex");var s=this.config.searchDebounceDelay,a=s===void 0?300:s;this.clearSearchString=ze(this.clearSearchString,a),this.renderSelectedValue(),i&&(this.eInput.onValueChange(function(l){return e.searchTextFromString(l)}),this.addManagedListener(this.eWrapper,"focus",this.onWrapperFocus.bind(this))),this.addManagedListener(this.eWrapper,"focusout",this.onWrapperFocusOut.bind(this))},t.prototype.createLoadingElement=function(){var e=this.gridOptionsService.getDocument(),r=this.localeService.getLocaleTextFunc(),i=e.createElement("div");i.classList.add("ag-loading-text"),i.innerText=r("loadingOoo","Loading..."),this.eLoading=i},t.prototype.createListComponent=function(){var e=this;this.listComponent=this.createBean(new Ru({cssIdentifier:"rich-select"})),this.listComponent.setComponentCreator(this.createRowComponent.bind(this)),this.listComponent.setParentComponent(this),this.addManagedListener(this.listComponent,g.EVENT_FIELD_PICKER_VALUE_SELECTED,function(u){e.onListValueSelected(u.value,u.fromEnterKey)});var r=this.cellRowHeight;r&&this.listComponent.setRowHeight(r);var i=this.listComponent.getGui(),o=this.listComponent.getAriaElement();this.addManagedListener(i,"mousemove",this.onPickerMouseMove.bind(this)),this.addManagedListener(i,"mousedown",function(u){return u.preventDefault()}),i.classList.add("ag-rich-select-list");var s="ag-rich-select-list-".concat(this.listComponent.getCompId());o.setAttribute("id",s);var a=this.localeService.getLocaleTextFunc(),l=a(this.config.pickerAriaLabelKey,this.config.pickerAriaLabelValue);Rt(o,l),yn(this.eWrapper,o)},t.prototype.renderSelectedValue=function(){var e=this,r=this,i=r.value,o=r.eDisplayField,s=r.config,a=this.config,l=a.allowTyping,u=a.initialInputValue,c=this.config.valueFormatter?this.config.valueFormatter(i):i;if(l){this.eInput.setValue(u??c);return}var p;s.cellRenderer&&(p=this.userComponentFactory.getCellRendererDetails(this.config,{value:i,valueFormatted:c,api:this.gridOptionsService.api}));var d;if(p&&(d=p.newAgStackInstance()),d)he(o),jn(d,o),d.then(function(v){e.addDestroyFunc(function(){return e.getContext().destroyBean(v)})});else if(P(this.value))o.innerText=c,o.classList.remove("ag-display-as-placeholder");else{var h=s.placeholder;P(h)?(o.innerHTML="".concat(se(h)),o.classList.add("ag-display-as-placeholder")):he(o)}},t.prototype.getCurrentValueIndex=function(){var e=this,r=e.currentList,i=e.value;if(i==null||!r)return-1;for(var o=0;o<r.length;o++)if(r[o]===i)return o;return-1},t.prototype.highlightFilterMatch=function(){var e=this,r;(r=this.listComponent)===null||r===void 0||r.forEachRenderedRow(function(i,o){i.highlightString(e.searchString)})},t.prototype.highlightSelectedValue=function(e){var r=this,i;e==null&&(e=this.getCurrentValueIndex()),this.highlightedItem=e,(i=this.listComponent)===null||i===void 0||i.forEachRenderedRow(function(o,s){var a=e===-1?!1:r.highlightedItem===s;o.updateHighlighted(a)})},t.prototype.setRowHeight=function(e){e!==this.cellRowHeight&&(this.cellRowHeight=e),this.listComponent&&this.listComponent.setRowHeight(e)},t.prototype.createPickerComponent=function(){var e=this.values;return e&&this.setValueList({valueList:e}),this.listComponent},t.prototype.setSearchStringCreator=function(e){this.searchStringCreator=e},t.prototype.setValueList=function(e){var r=e.valueList,i=e.refresh;this.listComponent&&this.currentList!==r&&(this.currentList=r,this.listComponent.setModel({getRowCount:function(){return r.length},getRow:function(o){return r[o]}}),i&&(this.values?this.listComponent.refresh():(this.values=r,this.isPickerDisplayed&&this.showCurrentValueInPicker())))},t.prototype.showPicker=function(){n.prototype.showPicker.call(this),this.showCurrentValueInPicker(),this.displayOrHidePicker()},t.prototype.showCurrentValueInPicker=function(){var e,r;if(this.listComponent){if(!this.currentList){this.isPickerDisplayed&&this.eLoading&&this.listComponent.appendChild(this.eLoading);return}!((e=this.eLoading)===null||e===void 0)&&e.offsetParent&&((r=this.eLoading.parentElement)===null||r===void 0||r.removeChild(this.eLoading));var i=this.getCurrentValueIndex();i!==-1?(this.listComponent.refresh(),this.listComponent.ensureIndexVisible(i),this.listComponent.refresh(!0),this.highlightSelectedValue(i)):this.listComponent.refresh()}},t.prototype.beforeHidePicker=function(){this.highlightedItem=-1,n.prototype.beforeHidePicker.call(this)},t.prototype.onWrapperFocus=function(){if(this.eInput){var e=this.eInput.getFocusableElement();e.focus(),e.select()}},t.prototype.onWrapperFocusOut=function(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()},t.prototype.buildSearchStringFromKeyboardEvent=function(e){var r=e.key;if(r===_.BACKSPACE)this.searchString=this.searchString.slice(0,-1),r="";else if(!Xi(e))return;e.preventDefault(),this.searchTextFromCharacter(r)},t.prototype.searchTextFromCharacter=function(e){this.searchString+=e,this.runSearch(),this.clearSearchString()},t.prototype.searchTextFromString=function(e){e==null&&(e=""),this.searchString=e,this.runSearch()},t.prototype.buildSearchStrings=function(e){var r=this.config.valueFormatter,i=r===void 0?function(s){return s}:r,o;return typeof e[0]=="number"||typeof e[0]=="string"?o=e.map(function(s){return i(s)}):typeof e[0]=="object"&&this.searchStringCreator&&(o=this.searchStringCreator(e)),o},t.prototype.getSuggestionsAndFilteredValues=function(e,r){var i=this,o=[],s=[];if(!e.length)return{suggestions:o,filteredValues:s};var a=this.config,l=a.searchType,u=l===void 0?"fuzzy":l,c=a.filterList;if(u==="fuzzy"){var p=Jr(this.searchString,r,!0);o=p.values;var d=p.indices;if(c&&d.length)for(var h=0;h<d.length;h++)s.push(this.values[d[h]])}else o=r.filter(function(v,y){var C=v.toLocaleLowerCase(),m=i.searchString.toLocaleLowerCase(),w=u==="match"?C.startsWith(m):C.indexOf(m)!==-1;return c&&w&&s.push(i.values[y]),w});return{suggestions:o,filteredValues:s}},t.prototype.filterListModel=function(e){var r=this.config.filterList;r&&(this.setValueList({valueList:e,refresh:!0}),this.alignPickerToComponent())},t.prototype.runSearch=function(){var e,r,i=this.values,o=this.buildSearchStrings(i);if(!o){this.highlightSelectedValue(-1);return}var s=this.getSuggestionsAndFilteredValues(this.searchString,o),a=s.suggestions,l=s.filteredValues,u=this.config,c=u.filterList,p=u.highlightMatch,d=u.searchType,h=d===void 0?"fuzzy":d,v=l.length,y=!!(c&&this.searchString!=="");if(this.filterListModel(y?l:i),a.length){var C=y?0:o.indexOf(a[0]);this.selectListItem(C)}else if(this.highlightSelectedValue(-1),!y||v)(e=this.listComponent)===null||e===void 0||e.ensureIndexVisible(0);else if(y){this.getAriaElement().removeAttribute("data-active-option");var m=(r=this.listComponent)===null||r===void 0?void 0:r.getAriaElement();m&&dn(m,null)}p&&h!=="fuzzy"&&this.highlightFilterMatch(),this.displayOrHidePicker()},t.prototype.displayOrHidePicker=function(){var e,r=(e=this.listComponent)===null||e===void 0?void 0:e.getGui(),i=this.currentList?this.currentList.length===0:!1;r==null||r.classList.toggle("ag-hidden",i)},t.prototype.clearSearchString=function(){this.searchString=""},t.prototype.selectListItem=function(e,r){if(!(!this.isPickerDisplayed||!this.currentList||!this.listComponent||e<0||e>=this.currentList.length)){var i=this.listComponent.ensureIndexVisible(e,!r);i&&!r&&this.listComponent.refresh(!0),this.highlightSelectedValue(e)}},t.prototype.setValue=function(e,r,i){var o=this.currentList?this.currentList.indexOf(e):-1;return o===-1?this:(this.value=e,i||this.selectListItem(o),this.renderSelectedValue(),n.prototype.setValue.call(this,e,r))},t.prototype.createRowComponent=function(e){var r=new ky(this.config,this.eWrapper);r.setParentComponent(this.listComponent),this.getContext().createBean(r),r.setState(e);var i=this.config,o=i.highlightMatch,s=i.searchType,a=s===void 0?"fuzzy":s;return o&&a!=="fuzzy"&&r.highlightString(this.searchString),r},t.prototype.getRowForMouseEvent=function(e){var r=this.listComponent;if(!r)return-1;var i=r==null?void 0:r.getGui(),o=i.getBoundingClientRect(),s=r.getScrollTop(),a=e.clientY-o.top+s;return Math.floor(a/r.getRowHeight())},t.prototype.onPickerMouseMove=function(e){if(this.listComponent){var r=this.getRowForMouseEvent(e);r!==-1&&r!=this.lastRowHovered&&(this.lastRowHovered=r,this.selectListItem(r,!0))}},t.prototype.onNavigationKeyDown=function(e,r){e.preventDefault();var i=r===_.DOWN;if(!this.isPickerDisplayed&&i){this.showPicker();return}var o=this.highlightedItem,s=i?1:-1,a=o===-1?0:o+s;this.selectListItem(a)},t.prototype.onEnterKeyDown=function(e){this.isPickerDisplayed&&(e.preventDefault(),this.currentList&&this.onListValueSelected(this.currentList[this.highlightedItem],!0))},t.prototype.onTabKeyDown=function(){!this.isPickerDisplayed||!this.currentList||this.setValue(this.currentList[this.highlightedItem],!1,!0)},t.prototype.onListValueSelected=function(e,r){this.setValue(e,!1,!0),this.dispatchPickerEvent(e,r),this.hidePicker()},t.prototype.dispatchPickerEvent=function(e,r){var i={type:g.EVENT_FIELD_PICKER_VALUE_SELECTED,fromEnterKey:r,value:e};this.dispatchEvent(i)},t.prototype.getFocusableElement=function(){var e=this.config.allowTyping;return e?this.eInput.getFocusableElement():n.prototype.getFocusableElement.call(this)},t.prototype.onKeyDown=function(e){var r=e.key,i=this.config.allowTyping;switch(r){case _.LEFT:case _.RIGHT:case _.PAGE_HOME:case _.PAGE_END:i||e.preventDefault();break;case _.PAGE_UP:case _.PAGE_DOWN:e.preventDefault();break;case _.DOWN:case _.UP:this.onNavigationKeyDown(e,r);break;case _.ESCAPE:this.isPickerDisplayed&&(Te(this.listComponent.getGui())&&(e.preventDefault(),dt(e)),this.hidePicker());break;case _.ENTER:this.onEnterKeyDown(e);break;case _.TAB:this.onTabKeyDown();break;default:i||this.buildSearchStringFromKeyboardEvent(e)}},t.prototype.destroy=function(){this.listComponent&&(this.destroyBean(this.listComponent),this.listComponent=void 0),this.eLoading=void 0,n.prototype.destroy.call(this)},Ou([f("userComponentFactory")],t.prototype,"userComponentFactory",void 0),Ou([L("eInput")],t.prototype,"eInput",void 0),t}(Ol),Xy=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Fo=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Jy=function(n){Xy(t,n);function t(e){var r=n.call(this,e,t.TEMPLATE)||this;return r.labelAlignment="top",r}return t.prototype.init=function(){this.eSlider.addCssClass("ag-slider-field")},t.prototype.onValueChange=function(e){var r=this,i=g.EVENT_FIELD_VALUE_CHANGED;return this.addManagedListener(this.eText,i,function(){var o=parseFloat(r.eText.getValue());r.eSlider.setValue(o.toString(),!0),e(o||0)}),this.addManagedListener(this.eSlider,i,function(){var o=r.eSlider.getValue();r.eText.setValue(o,!0),e(parseFloat(o))}),this},t.prototype.setSliderWidth=function(e){return this.eSlider.setWidth(e),this},t.prototype.setTextFieldWidth=function(e){return this.eText.setWidth(e),this},t.prototype.setMinValue=function(e){return this.eSlider.setMinValue(e),this.eText.setMin(e),this},t.prototype.setMaxValue=function(e){return this.eSlider.setMaxValue(e),this.eText.setMax(e),this},t.prototype.getValue=function(){return this.eText.getValue()},t.prototype.setValue=function(e){return this.getValue()===e?this:(this.eText.setValue(e,!0),this.eSlider.setValue(e,!0),this.dispatchEvent({type:g.EVENT_FIELD_VALUE_CHANGED}),this)},t.prototype.setStep=function(e){return this.eSlider.setStep(e),this.eText.setStep(e),this},t.TEMPLATE=`<div class="ag-slider">
|
||
<label ref="eLabel"></label>
|
||
<div class="ag-wrapper ag-slider-wrapper">
|
||
<ag-input-range ref="eSlider"></ag-input-range>
|
||
<ag-input-number-field ref="eText"></ag-input-number-field>
|
||
</div>
|
||
</div>`,Fo([L("eLabel")],t.prototype,"eLabel",void 0),Fo([L("eSlider")],t.prototype,"eSlider",void 0),Fo([L("eText")],t.prototype,"eText",void 0),Fo([b],t.prototype,"init",null),t}(_l),Zy=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Ut=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},eC=function(n){Zy(t,n);function t(e){e===void 0&&(e={});var r=n.call(this,t.getTemplate(e))||this;r.suppressEnabledCheckbox=!0,r.suppressOpenCloseIcons=!1;var i=e.title,o=e.enabled,s=e.items,a=e.suppressEnabledCheckbox,l=e.suppressOpenCloseIcons;return r.title=i,r.cssIdentifier=e.cssIdentifier||"default",r.enabled=o??!0,r.items=s||[],r.alignItems=e.alignItems||"center",a!=null&&(r.suppressEnabledCheckbox=a),l!=null&&(r.suppressOpenCloseIcons=l),r}return t.getTemplate=function(e){var r=e.cssIdentifier||"default",i=e.direction||"vertical";return'<div class="ag-group ag-'.concat(r,`-group" role="presentation">
|
||
<div class="ag-group-title-bar ag-`).concat(r,`-group-title-bar ag-unselectable" ref="eTitleBar" role="button">
|
||
<span class="ag-group-title-bar-icon ag-`).concat(r,`-group-title-bar-icon" ref="eGroupOpenedIcon" role="presentation"></span>
|
||
<span class="ag-group-title-bar-icon ag-`).concat(r,`-group-title-bar-icon" ref="eGroupClosedIcon" role="presentation"></span>
|
||
<span ref="eTitle" class="ag-group-title ag-`).concat(r,`-group-title"></span>
|
||
</div>
|
||
<div ref="eToolbar" class="ag-group-toolbar ag-`).concat(r,`-group-toolbar">
|
||
<ag-checkbox ref="cbGroupEnabled"></ag-checkbox>
|
||
</div>
|
||
<div ref="eContainer" class="ag-group-container ag-group-container-`).concat(i," ag-").concat(r,`-group-container"></div>
|
||
</div>`)},t.prototype.postConstruct=function(){if(this.items.length){var e=this.items;this.items=[],this.addItems(e)}var r=this.localeService.getLocaleTextFunc();this.cbGroupEnabled.setLabel(r("enabled","Enabled")),this.title&&this.setTitle(this.title),this.enabled&&this.setEnabled(this.enabled),this.setAlignItems(this.alignItems),this.hideEnabledCheckbox(this.suppressEnabledCheckbox),this.hideOpenCloseIcons(this.suppressOpenCloseIcons),this.setupExpandContract(),this.refreshAriaStatus(),this.refreshChildDisplay()},t.prototype.setupExpandContract=function(){var e=this;this.eGroupClosedIcon.appendChild(Qe("columnSelectClosed",this.gridOptionsService,null)),this.eGroupOpenedIcon.appendChild(Qe("columnSelectOpen",this.gridOptionsService,null)),this.addManagedListener(this.eTitleBar,"click",function(){return e.toggleGroupExpand()}),this.addManagedListener(this.eTitleBar,"keydown",function(r){switch(r.key){case _.ENTER:case _.SPACE:r.preventDefault(),e.toggleGroupExpand();break;case _.RIGHT:case _.LEFT:r.preventDefault(),e.toggleGroupExpand(r.key===_.RIGHT);break}})},t.prototype.refreshAriaStatus=function(){this.suppressOpenCloseIcons||ot(this.eTitleBar,this.expanded)},t.prototype.refreshChildDisplay=function(){var e=!this.suppressOpenCloseIcons;q(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox),q(this.eGroupOpenedIcon,e&&this.expanded),q(this.eGroupClosedIcon,e&&!this.expanded)},t.prototype.isExpanded=function(){return this.expanded},t.prototype.setAlignItems=function(e){this.alignItems!==e&&this.removeCssClass("ag-group-item-alignment-".concat(this.alignItems)),this.alignItems=e;var r="ag-group-item-alignment-".concat(this.alignItems);return this.addCssClass(r),this},t.prototype.toggleGroupExpand=function(e){return this.suppressOpenCloseIcons?(this.expanded=!0,this.refreshChildDisplay(),q(this.eContainer,!0),this):(e=e??!this.expanded,this.expanded===e?this:(this.expanded=e,this.refreshAriaStatus(),this.refreshChildDisplay(),q(this.eContainer,e),this.dispatchEvent({type:this.expanded?t.EVENT_EXPANDED:t.EVENT_COLLAPSED}),this))},t.prototype.addItems=function(e){var r=this;e.forEach(function(i){return r.addItem(i)})},t.prototype.addItem=function(e){var r=this.eContainer,i=e instanceof W?e.getGui():e;i.classList.add("ag-group-item","ag-".concat(this.cssIdentifier,"-group-item")),r.appendChild(i),this.items.push(i)},t.prototype.hideItem=function(e,r){var i=this.items[r];q(i,!e)},t.prototype.setTitle=function(e){return this.eTitle.innerText=e,this},t.prototype.addCssClassToTitleBar=function(e){this.eTitleBar.classList.add(e)},t.prototype.setEnabled=function(e,r){return this.enabled=e,this.refreshDisabledStyles(),this.toggleGroupExpand(e),r||this.cbGroupEnabled.setValue(e),this},t.prototype.isEnabled=function(){return this.enabled},t.prototype.onEnableChange=function(e){var r=this;return this.cbGroupEnabled.onValueChange(function(i){r.setEnabled(i,!0),e(i)}),this},t.prototype.hideEnabledCheckbox=function(e){return this.suppressEnabledCheckbox=e,this.refreshChildDisplay(),this.refreshDisabledStyles(),this},t.prototype.hideOpenCloseIcons=function(e){return this.suppressOpenCloseIcons=e,e&&this.toggleGroupExpand(!0),this},t.prototype.refreshDisabledStyles=function(){this.addOrRemoveCssClass("ag-disabled",!this.enabled),this.suppressEnabledCheckbox&&!this.enabled?(this.eTitleBar.classList.add("ag-disabled-group-title-bar"),this.eTitleBar.removeAttribute("tabindex")):(this.eTitleBar.classList.remove("ag-disabled-group-title-bar"),this.eTitleBar.setAttribute("tabindex","0")),this.eContainer.classList.toggle("ag-disabled-group-container",!this.enabled)},t.EVENT_EXPANDED="expanded",t.EVENT_COLLAPSED="collapsed",Ut([L("eTitleBar")],t.prototype,"eTitleBar",void 0),Ut([L("eGroupOpenedIcon")],t.prototype,"eGroupOpenedIcon",void 0),Ut([L("eGroupClosedIcon")],t.prototype,"eGroupClosedIcon",void 0),Ut([L("eToolbar")],t.prototype,"eToolbar",void 0),Ut([L("cbGroupEnabled")],t.prototype,"cbGroupEnabled",void 0),Ut([L("eTitle")],t.prototype,"eTitle",void 0),Ut([L("eContainer")],t.prototype,"eContainer",void 0),Ut([b],t.prototype,"postConstruct",null),t}(W),tC=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Lo=function(){return Lo=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Lo.apply(this,arguments)},Tu=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},rC=function(n){tC(t,n);function t(e){e===void 0&&(e=1);var r=n.call(this,'<div class="ag-menu-list" role="tree"></div>')||this;return r.level=e,r.menuItems=[],r}return t.prototype.postConstruct=function(){var e=this;this.initialiseTabGuard({onTabKeyDown:function(r){return e.onTabKeyDown(r)},handleKeyDown:function(r){return e.handleKeyDown(r)}})},t.prototype.onTabKeyDown=function(e){var r=this.getParentComponent(),i=r&&r.getGui(),o=i&&i.classList.contains("ag-focus-managed");o||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)},t.prototype.handleKeyDown=function(e){switch(e.key){case _.UP:case _.RIGHT:case _.DOWN:case _.LEFT:e.preventDefault(),this.handleNavKey(e.key);break;case _.ESCAPE:var r=this.findTopMenu();r&&this.focusService.focusInto(r.getGui());break}},t.prototype.clearActiveItem=function(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)},t.prototype.addMenuItems=function(e){var r=this;e!=null&&e.forEach(function(i){i==="separator"?r.addSeparator():typeof i=="string"?console.warn("AG Grid: unrecognised menu item ".concat(i)):r.addItem(i)})},t.prototype.addItem=function(e){var r=this,i=this.createManagedBean(new gi(Lo(Lo({},e),{isAnotherSubMenuOpen:function(){return r.menuItems.some(function(o){return o.isSubMenuOpen()})}})));i.setParentComponent(this),Ua(i.getGui(),this.level),this.menuItems.push(i),this.appendChild(i.getGui()),this.addManagedListener(i,gi.EVENT_MENU_ITEM_SELECTED,function(o){r.dispatchEvent(o)}),this.addManagedListener(i,gi.EVENT_MENU_ITEM_ACTIVATED,function(o){r.activeMenuItem&&r.activeMenuItem!==o.menuItem&&r.activeMenuItem.deactivate(),r.activeMenuItem=o.menuItem})},t.prototype.activateFirstItem=function(){var e=this.menuItems.filter(function(r){return!r.isDisabled()})[0];e&&e.activate()},t.prototype.addSeparator=function(){var e=`
|
||
<div class="ag-menu-separator" aria-hidden="true">
|
||
<div class="ag-menu-separator-part"></div>
|
||
<div class="ag-menu-separator-part"></div>
|
||
<div class="ag-menu-separator-part"></div>
|
||
<div class="ag-menu-separator-part"></div>
|
||
</div>`;this.appendChild(ge(e))},t.prototype.findTopMenu=function(){var e=this.getParentComponent();if(!e&&this instanceof t)return this;for(;;){var r=e&&e.getParentComponent&&e.getParentComponent();if(!r||!(r instanceof t||r instanceof gi))break;e=r}return e instanceof t?e:void 0},t.prototype.handleNavKey=function(e){switch(e){case _.UP:case _.DOWN:var r=this.findNextItem(e===_.UP);r&&r!==this.activeMenuItem&&r.activate();return}var i=this.gridOptionsService.get("enableRtl")?_.RIGHT:_.LEFT;e===i?this.closeIfIsChild():this.openChild()},t.prototype.closeIfIsChild=function(e){var r=this.getParentComponent();r&&r instanceof gi&&(e&&e.preventDefault(),r.closeSubMenu(),r.getGui().focus())},t.prototype.openChild=function(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)},t.prototype.findNextItem=function(e){var r=this.menuItems.filter(function(l){return!l.isDisabled()});if(r.length){if(!this.activeMenuItem)return e?Q(r):r[0];e&&r.reverse();for(var i,o=!1,s=0;s<r.length;s++){var a=r[s];if(!o){a===this.activeMenuItem&&(o=!0);continue}i=a;break}return i||this.activeMenuItem}},t.prototype.destroy=function(){this.clearActiveItem(),n.prototype.destroy.call(this)},Tu([f("focusService")],t.prototype,"focusService",void 0),Tu([b],t.prototype,"postConstruct",null),t}(Do),iC=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),oC=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},nC=function(n){iC(t,n);function t(e){var r=n.call(this)||this;return r.wrappedComponent=e,r.setTemplateFromElement(e.getGui()),r}return t.prototype.postConstruct=function(){var e=this;this.initialiseTabGuard({onTabKeyDown:function(r){return e.onTabKeyDown(r)},handleKeyDown:function(r){return e.handleKeyDown(r)}})},t.prototype.handleKeyDown=function(e){e.key===_.ESCAPE&&this.closePanel()},t.prototype.onTabKeyDown=function(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())},t.prototype.closePanel=function(){var e=this.parentComponent;e.closeSubMenu(),setTimeout(function(){return e.getGui().focus()},0)},oC([b],t.prototype,"postConstruct",null),t}(Do),sC=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Pu=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},gi=function(n){sC(t,n);function t(e){var r=n.call(this)||this;return r.params=e,r.isActive=!1,r.subMenuIsOpen=!1,r.setTemplate('<div class="'.concat(r.getClassName(),'" tabindex="-1" role="treeitem"></div>')),r}return t.prototype.init=function(){var e=this;this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu(),this.addTooltip();var r=this.getGui();this.params.disabled?(this.addCssClass(this.getClassName("disabled")),pn(r,!0)):(this.addGuiEventListener("click",function(i){return e.onItemSelected(i)}),this.addGuiEventListener("keydown",function(i){(i.key===_.ENTER||i.key===_.SPACE)&&(i.preventDefault(),e.onItemSelected(i))}),this.addGuiEventListener("mousedown",function(i){i.stopPropagation(),i.preventDefault()}),this.addGuiEventListener("mouseenter",function(){return e.onMouseEnter()}),this.addGuiEventListener("mouseleave",function(){return e.onMouseLeave()})),this.params.cssClasses&&this.params.cssClasses.forEach(function(i){return e.addCssClass(i)})},t.prototype.isDisabled=function(){return!!this.params.disabled},t.prototype.openSubMenu=function(e){var r=this;if(e===void 0&&(e=!1),this.closeSubMenu(),!!this.params.subMenu){var i=ge('<div class="ag-menu" role="presentation"></div>'),o;if(this.params.subMenu instanceof Array){var s=Ba(this.getGui()),a=isNaN(s)?1:s+1,l=this.createBean(new rC(a));l.setParentComponent(this),l.addMenuItems(this.params.subMenu),i.appendChild(l.getGui()),this.addManagedListener(l,t.EVENT_MENU_ITEM_SELECTED,function(w){return r.dispatchEvent(w)}),l.addGuiEventListener("mouseenter",function(){return r.cancelDeactivate()}),o=function(){return r.destroyBean(l)},e&&setTimeout(function(){return l.activateFirstItem()},0)}else{var u=this.params.subMenu,c=this.createBean(new nC(u));c.setParentComponent(this);var p=c.getGui(),d="mouseenter",h=function(){return r.cancelDeactivate()};p.addEventListener(d,h),o=function(){return p.removeEventListener(d,h)},i.appendChild(p),u.afterGuiAttached&&setTimeout(function(){return u.afterGuiAttached()},0)}var v=this.getGui(),y=this.popupService.positionPopupForMenu.bind(this.popupService,{eventSource:v,ePopup:i}),C=this.localeService.getLocaleTextFunc(),m=this.popupService.addPopup({modal:!0,eChild:i,positionCallback:y,anchorToElement:v,ariaLabel:C("ariaLabelSubMenu","SubMenu")});this.subMenuIsOpen=!0,ot(v,!0),this.hideSubMenu=function(){m&&m.hideFunc(),r.subMenuIsOpen=!1,ot(v,!1),o()}}},t.prototype.closeSubMenu=function(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,ot(this.getGui(),!1))},t.prototype.isSubMenuOpen=function(){return this.subMenuIsOpen},t.prototype.activate=function(e){var r=this;this.cancelActivate(),!this.params.disabled&&(this.isActive=!0,this.addCssClass(this.getClassName("active")),this.getGui().focus(),e&&this.params.subMenu&&window.setTimeout(function(){r.isAlive()&&r.isActive&&r.openSubMenu()},300),this.onItemActivated())},t.prototype.deactivate=function(){this.cancelDeactivate(),this.removeCssClass(this.getClassName("active")),this.isActive=!1,this.subMenuIsOpen&&this.hideSubMenu()},t.prototype.addIcon=function(){if(!(!this.params.checked&&!this.params.icon&&this.params.isCompact)){var e=ge('<span ref="eIcon" class="'.concat(this.getClassName("part")," ").concat(this.getClassName("icon"),'" role="presentation"></span>'));this.params.checked?e.appendChild(ne("check",this.gridOptionsService)):this.params.icon&&(Xr(this.params.icon)?e.appendChild(this.params.icon):typeof this.params.icon=="string"?e.innerHTML=this.params.icon:console.warn("AG Grid: menu item icon must be DOM node or string")),this.getGui().appendChild(e)}},t.prototype.addName=function(){if(!(!this.params.name&&this.params.isCompact)){var e=ge('<span ref="eName" class="'.concat(this.getClassName("part")," ").concat(this.getClassName("text"),'">').concat(this.params.name||"","</span>"));this.getGui().appendChild(e)}},t.prototype.addTooltip=function(){this.params.tooltip&&(this.tooltip=this.params.tooltip,this.gridOptionsService.get("enableBrowserTooltips")?this.getGui().setAttribute("title",this.tooltip):this.createManagedBean(new Kn(this)))},t.prototype.getTooltipParams=function(){return{location:"menu",value:this.tooltip}},t.prototype.addShortcut=function(){if(!(!this.params.shortcut&&this.params.isCompact)){var e=ge('<span ref="eShortcut" class="'.concat(this.getClassName("part")," ").concat(this.getClassName("shortcut"),'">').concat(this.params.shortcut||"","</span>"));this.getGui().appendChild(e)}},t.prototype.addSubMenu=function(){if(!(!this.params.subMenu&&this.params.isCompact)){var e=ge('<span ref="ePopupPointer" class="'.concat(this.getClassName("part")," ").concat(this.getClassName("popup-pointer"),'"></span>')),r=this.getGui();if(this.params.subMenu){var i=this.gridOptionsService.get("enableRtl")?"smallLeft":"smallRight";ot(r,!1),e.appendChild(ne(i,this.gridOptionsService))}r.appendChild(e)}},t.prototype.onItemSelected=function(e){if(this.params.action?this.params.action():this.openSubMenu(e&&e.type==="keydown"),!(this.params.subMenu&&!this.params.action)){var r={type:t.EVENT_MENU_ITEM_SELECTED,action:this.params.action,checked:this.params.checked,cssClasses:this.params.cssClasses,disabled:this.params.disabled,icon:this.params.icon,name:this.params.name,shortcut:this.params.shortcut,subMenu:this.params.subMenu,tooltip:this.params.tooltip,event:e};this.dispatchEvent(r)}},t.prototype.onItemActivated=function(){var e={type:t.EVENT_MENU_ITEM_ACTIVATED,menuItem:this};this.dispatchEvent(e)},t.prototype.cancelActivate=function(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)},t.prototype.cancelDeactivate=function(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)},t.prototype.onMouseEnter=function(){var e=this;this.cancelDeactivate(),this.params.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout(function(){return e.activate(!0)},t.ACTIVATION_DELAY):this.activate(!0)},t.prototype.onMouseLeave=function(){var e=this;this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout(function(){return e.deactivate()},t.ACTIVATION_DELAY):this.deactivate()},t.prototype.getClassName=function(e){var r=this.params.isCompact?"ag-compact-menu-option":"ag-menu-option";return e?"".concat(r,"-").concat(e):r},t.EVENT_MENU_ITEM_SELECTED="menuItemSelected",t.EVENT_MENU_ITEM_ACTIVATED="menuItemActivated",t.ACTIVATION_DELAY=80,Pu([f("popupService")],t.prototype,"popupService",void 0),Pu([b],t.prototype,"init",null),t}(W),aC=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),yi=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Du=function(n){aC(t,n);function t(e){var r=n.call(this,t.getTemplate(e))||this;return r.closable=!0,r.config=e,r}return t.getTemplate=function(e){var r=e&&e.cssIdentifier||"default";return'<div class="ag-panel ag-'.concat(r,`-panel" tabindex="-1">
|
||
<div ref="eTitleBar" class="ag-panel-title-bar ag-`).concat(r,`-panel-title-bar ag-unselectable">
|
||
<span ref="eTitle" class="ag-panel-title-bar-title ag-`).concat(r,`-panel-title-bar-title"></span>
|
||
<div ref="eTitleBarButtons" class="ag-panel-title-bar-buttons ag-`).concat(r,`-panel-title-bar-buttons"></div>
|
||
</div>
|
||
<div ref="eContentWrapper" class="ag-panel-content-wrapper ag-`).concat(r,`-panel-content-wrapper"></div>
|
||
</div>`)},t.prototype.postConstruct=function(){var e=this,r=this.config,i=r.component,o=r.closable,s=r.hideTitleBar,a=r.title,l=r.minWidth,u=l===void 0?250:l,c=r.width,p=r.minHeight,d=p===void 0?250:p,h=r.height,v=r.centered,y=r.popup,C=r.x,m=r.y;this.positionableFeature=new El(this.getGui(),{minWidth:u,width:c,minHeight:d,height:h,centered:v,x:C,y:m,popup:y,calculateTopBuffer:function(){return e.positionableFeature.getHeight()-e.getBodyHeight()}}),this.createManagedBean(this.positionableFeature);var w=this.getGui();i&&this.setBodyComponent(i),s?q(this.eTitleBar,!1):(a&&this.setTitle(a),this.setClosable(o??this.closable)),this.addManagedListener(this.eTitleBar,"mousedown",function(E){var S=e.gridOptionsService.getDocument();if(w.contains(E.relatedTarget)||w.contains(S.activeElement)||e.eTitleBarButtons.contains(E.target)){E.preventDefault();return}var R=e.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");R&&R.focus()}),!(y&&this.positionableFeature.isPositioned())&&(this.renderComponent&&this.renderComponent(),this.positionableFeature.initialisePosition(),this.eContentWrapper.style.height="0")},t.prototype.renderComponent=function(){var e=this,r=this.getGui();r.focus(),this.close=function(){r.parentElement.removeChild(r),e.destroy()}},t.prototype.getHeight=function(){return this.positionableFeature.getHeight()},t.prototype.setHeight=function(e){this.positionableFeature.setHeight(e)},t.prototype.getWidth=function(){return this.positionableFeature.getWidth()},t.prototype.setWidth=function(e){this.positionableFeature.setWidth(e)},t.prototype.setClosable=function(e){if(e!==this.closable&&(this.closable=e),e){var r=this.closeButtonComp=new W(t.CLOSE_BTN_TEMPLATE);this.getContext().createBean(r);var i=r.getGui(),o=ne("close",this.gridOptionsService);o.classList.add("ag-panel-title-bar-button-icon"),i.appendChild(o),this.addTitleBarButton(r),r.addManagedListener(i,"click",this.onBtClose.bind(this))}else if(this.closeButtonComp){var i=this.closeButtonComp.getGui();i.parentElement.removeChild(i),this.closeButtonComp=this.destroyBean(this.closeButtonComp)}},t.prototype.setBodyComponent=function(e){e.setParentComponent(this),this.eContentWrapper.appendChild(e.getGui())},t.prototype.addTitleBarButton=function(e,r){var i=this.eTitleBarButtons,o=i.children,s=o.length;r==null&&(r=s),r=Math.max(0,Math.min(r,s)),e.addCssClass("ag-panel-title-bar-button");var a=e.getGui();r===0?i.insertAdjacentElement("afterbegin",a):r===s?i.insertAdjacentElement("beforeend",a):o[r-1].insertAdjacentElement("afterend",a),e.setParentComponent(this)},t.prototype.getBodyHeight=function(){return zr(this.eContentWrapper)},t.prototype.getBodyWidth=function(){return ir(this.eContentWrapper)},t.prototype.setTitle=function(e){this.eTitle.innerText=e},t.prototype.onBtClose=function(){this.close()},t.prototype.destroy=function(){this.closeButtonComp&&(this.closeButtonComp=this.destroyBean(this.closeButtonComp));var e=this.getGui();e&&Te(e)&&this.close(),n.prototype.destroy.call(this)},t.CLOSE_BTN_TEMPLATE='<div class="ag-button"></div>',yi([L("eContentWrapper")],t.prototype,"eContentWrapper",void 0),yi([L("eTitleBar")],t.prototype,"eTitleBar",void 0),yi([L("eTitleBarButtons")],t.prototype,"eTitleBarButtons",void 0),yi([L("eTitle")],t.prototype,"eTitle",void 0),yi([b],t.prototype,"postConstruct",null),t}(W),lC=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Io=function(){return Io=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Io.apply(this,arguments)},uC=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},cC=function(n){lC(t,n);function t(e){var r=n.call(this,Io(Io({},e),{popup:!0}))||this;return r.isMaximizable=!1,r.isMaximized=!1,r.maximizeListeners=[],r.resizeListenerDestroy=null,r.lastPosition={x:0,y:0,width:0,height:0},r}return t.prototype.postConstruct=function(){var e=this,r=this.getGui(),i=this.config,o=i.movable,s=i.resizable,a=i.maximizable;this.addCssClass("ag-dialog"),n.prototype.postConstruct.call(this),this.addManagedListener(r,"focusin",function(l){r.contains(l.relatedTarget)||e.popupService.bringPopupToFront(r)}),o&&this.setMovable(o),a&&this.setMaximizable(a),s&&this.setResizable(s)},t.prototype.renderComponent=function(){var e=this.getGui(),r=this.config,i=r.alwaysOnTop,o=r.modal,s=r.title,a=r.afterGuiAttached,l=this.localeService.getLocaleTextFunc(),u=this.popupService.addPopup({modal:o,eChild:e,closeOnEsc:!0,closedCallback:this.destroy.bind(this),alwaysOnTop:i,ariaLabel:s||l("ariaLabelDialog","Dialog"),afterGuiAttached:a});u&&(this.close=u.hideFunc)},t.prototype.toggleMaximize=function(){var e=this.positionableFeature.getPosition();if(this.isMaximized){var r=this.lastPosition,i=r.x,o=r.y,s=r.width,a=r.height;this.setWidth(s),this.setHeight(a),this.positionableFeature.offsetElement(i,o)}else this.lastPosition.width=this.getWidth(),this.lastPosition.height=this.getHeight(),this.lastPosition.x=e.x,this.lastPosition.y=e.y,this.positionableFeature.offsetElement(0,0),this.setHeight("100%"),this.setWidth("100%");this.isMaximized=!this.isMaximized,this.refreshMaximizeIcon()},t.prototype.refreshMaximizeIcon=function(){q(this.maximizeIcon,!this.isMaximized),q(this.minimizeIcon,this.isMaximized)},t.prototype.clearMaximizebleListeners=function(){this.maximizeListeners.length&&(this.maximizeListeners.forEach(function(e){return e()}),this.maximizeListeners.length=0),this.resizeListenerDestroy&&(this.resizeListenerDestroy(),this.resizeListenerDestroy=null)},t.prototype.destroy=function(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),n.prototype.destroy.call(this)},t.prototype.setResizable=function(e){this.positionableFeature.setResizable(e)},t.prototype.setMovable=function(e){this.positionableFeature.setMovable(e,this.eTitleBar)},t.prototype.setMaximizable=function(e){var r=this;if(!e){this.clearMaximizebleListeners(),this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0);return}var i=this.eTitleBar;if(!(!i||e===this.isMaximizable)){var o=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon(),o.addManagedListener(o.getGui(),"click",this.toggleMaximize.bind(this)),this.addTitleBarButton(o,0),this.maximizeListeners.push(this.addManagedListener(i,"dblclick",this.toggleMaximize.bind(this))),this.resizeListenerDestroy=this.addManagedListener(this,"resize",function(){r.isMaximized=!1,r.refreshMaximizeIcon()})}},t.prototype.buildMaximizeAndMinimizeElements=function(){var e=this.maximizeButtonComp=this.createBean(new W('<div class="ag-dialog-button"></span>')),r=e.getGui();return this.maximizeIcon=ne("maximize",this.gridOptionsService),r.appendChild(this.maximizeIcon),this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon"),this.minimizeIcon=ne("minimize",this.gridOptionsService),r.appendChild(this.minimizeIcon),this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon"),e},uC([f("popupService")],t.prototype,"popupService",void 0),t}(Du),pC=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),xo=function(){return xo=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},xo.apply(this,arguments)},Ci=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Au=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},bu=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},Fu=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.")},zt;(function(n){n[n.vertical=0]="vertical",n[n.horizontal=1]="horizontal"})(zt||(zt={}));var dC=0,hC=function(n){pC(t,n);function t(){var r=n!==null&&n.apply(this,arguments)||this;return r.popupList=[],r}e=t,t.prototype.postConstruct=function(){var r=this;this.ctrlsService.whenReady(function(i){r.gridCtrl=i.gridCtrl}),this.addManagedListener(this.eventService,g.EVENT_GRID_STYLES_CHANGED,this.handleThemeChange.bind(this))},t.prototype.getPopupParent=function(){var r=this.gridOptionsService.get("popupParent");return r||this.gridCtrl.getGui()},t.prototype.positionPopupForMenu=function(r){var i=r.eventSource,o=r.ePopup,s=this.getPopupIndex(o);if(s!==-1){var a=this.popupList[s];a.alignedToElement=i}var l=i.getBoundingClientRect(),u=this.getParentRect(),c=this.keepXYWithinBounds(o,l.top-u.top,zt.vertical),p=o.clientWidth>0?o.clientWidth:200;o.style.minWidth="".concat(p,"px");var d=u.right-u.left,h=d-p,v;this.gridOptionsService.get("enableRtl")?(v=C(),v<0&&(v=y(),this.setAlignedStyles(o,"left")),v>h&&(v=0,this.setAlignedStyles(o,"right"))):(v=y(),v>h&&(v=C(),this.setAlignedStyles(o,"right")),v<0&&(v=0,this.setAlignedStyles(o,"left"))),o.style.left="".concat(v,"px"),o.style.top="".concat(c,"px");function y(){return l.right-u.left-2}function C(){return l.left-u.left-p}},t.prototype.positionPopupUnderMouseEvent=function(r){var i=this,o=r.ePopup,s=r.nudgeX,a=r.nudgeY,l=r.skipObserver;this.positionPopup({ePopup:o,nudgeX:s,nudgeY:a,keepWithinBounds:!0,skipObserver:l,updatePosition:function(){return i.calculatePointerAlign(r.mouseEvent)},postProcessCallback:function(){return i.callPostProcessPopup(r.type,r.ePopup,null,r.mouseEvent,r.column,r.rowNode)}})},t.prototype.calculatePointerAlign=function(r){var i=this.getParentRect();return{x:r.clientX-i.left,y:r.clientY-i.top}},t.prototype.positionPopupByComponent=function(r){var i=this,o=r.ePopup,s=r.nudgeX,a=r.nudgeY,l=r.keepWithinBounds,u=r.eventSource,c=r.alignSide,p=c===void 0?"left":c,d=r.position,h=d===void 0?"over":d,v=r.column,y=r.rowNode,C=r.type,m=u.getBoundingClientRect(),w=this.getParentRect(),E=this.getPopupIndex(o);if(E!==-1){var S=this.popupList[E];S.alignedToElement=u}var R=function(){var T=m.left-w.left;p==="right"&&(T-=o.offsetWidth-m.width);var F;if(h==="over")F=m.top-w.top,i.setAlignedStyles(o,"over");else{i.setAlignedStyles(o,"under");var A=i.shouldRenderUnderOrAbove(o,m,w,r.nudgeY||0);A==="under"?F=m.top-w.top+m.height:F=m.top-o.offsetHeight-(a||0)*2-w.top}return{x:T,y:F}};this.positionPopup({ePopup:o,nudgeX:s,nudgeY:a,keepWithinBounds:l,updatePosition:R,postProcessCallback:function(){return i.callPostProcessPopup(C,o,u,null,v,y)}})},t.prototype.shouldRenderUnderOrAbove=function(r,i,o,s){var a=o.bottom-i.bottom,l=i.top-o.top,u=r.offsetHeight+s;return a>u?"under":l>u||l>a?"above":"under"},t.prototype.setAlignedStyles=function(r,i){var o=this.getPopupIndex(r);if(o!==-1){var s=this.popupList[o],a=s.alignedToElement;if(a){var l=["right","left","over","above","under"];l.forEach(function(u){a.classList.remove("ag-has-popup-positioned-".concat(u)),r.classList.remove("ag-popup-positioned-".concat(u))}),i&&(a.classList.add("ag-has-popup-positioned-".concat(i)),r.classList.add("ag-popup-positioned-".concat(i)))}}},t.prototype.callPostProcessPopup=function(r,i,o,s,a,l){var u=this.gridOptionsService.getCallback("postProcessPopup");if(u){var c={column:a,rowNode:l,ePopup:i,type:r,eventSource:o,mouseEvent:s};u(c)}},t.prototype.positionPopup=function(r){var i=this,o=r.ePopup,s=r.keepWithinBounds,a=r.nudgeX,l=r.nudgeY,u=r.skipObserver,c=r.updatePosition,p={width:0,height:0},d=function(v){v===void 0&&(v=!1);var y=c(),C=y.x,m=y.y;v&&o.clientWidth===p.width&&o.clientHeight===p.height||(p.width=o.clientWidth,p.height=o.clientHeight,a&&(C+=a),l&&(m+=l),s&&(C=i.keepXYWithinBounds(o,C,zt.horizontal),m=i.keepXYWithinBounds(o,m,zt.vertical)),o.style.left="".concat(C,"px"),o.style.top="".concat(m,"px"),r.postProcessCallback&&r.postProcessCallback())};if(d(),!u){var h=this.resizeObserverService.observeResize(o,function(){return d(!0)});setTimeout(function(){return h()},e.WAIT_FOR_POPUP_CONTENT_RESIZE)}},t.prototype.getActivePopups=function(){return this.popupList.map(function(r){return r.element})},t.prototype.getPopupList=function(){return this.popupList},t.prototype.getParentRect=function(){var r=this.gridOptionsService.getDocument(),i=this.getPopupParent();return i===r.body?i=r.documentElement:getComputedStyle(i).position==="static"&&(i=i.offsetParent),Nn(i)},t.prototype.keepXYWithinBounds=function(r,i,o){var s=o===zt.vertical,a=s?"clientHeight":"clientWidth",l=s?"top":"left",u=s?"offsetHeight":"offsetWidth",c=s?"scrollTop":"scrollLeft",p=this.gridOptionsService.getDocument(),d=p.documentElement,h=this.getPopupParent(),v=h.getBoundingClientRect(),y=p.documentElement.getBoundingClientRect(),C=h===p.body,m=r[u],w=s?Mn:$r,E=C?w(d)+d[c]:h[a];C&&(E-=Math.abs(y[l]-v[l]));var S=E-m;return Math.min(Math.max(i,0),Math.abs(S))},t.prototype.addPopup=function(r){var i=this.gridOptionsService.getDocument(),o=r.eChild,s=r.ariaLabel,a=r.alwaysOnTop,l=r.positionCallback,u=r.anchorToElement;if(!i)return console.warn("AG Grid: could not find the document, document is empty"),{hideFunc:function(){}};var c=this.getPopupIndex(o);if(c!==-1){var p=this.popupList[c];return{hideFunc:p.hideFunc}}this.initialisePopupPosition(o);var d=this.createPopupWrapper(o,s,!!a),h=this.addEventListenersToPopup(xo(xo({},r),{wrapperEl:d}));return l&&l(),this.addPopupToPopupList(o,d,h,u),{hideFunc:h}},t.prototype.initialisePopupPosition=function(r){var i=this.getPopupParent(),o=i.getBoundingClientRect();P(r.style.top)||(r.style.top="".concat(o.top*-1,"px")),P(r.style.left)||(r.style.left="".concat(o.left*-1,"px"))},t.prototype.createPopupWrapper=function(r,i,o){var s,a=this.getPopupParent(),l=document.createElement("div"),u=this.environment.getTheme().allThemes;return u.length&&(s=l.classList).add.apply(s,bu([],Au(u),!1)),l.classList.add("ag-popup"),r.classList.add(this.gridOptionsService.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),r.hasAttribute("role")||pe(r,"dialog"),Rt(r,i),l.appendChild(r),a.appendChild(l),o?this.setAlwaysOnTop(r,!0):this.bringPopupToFront(r),l},t.prototype.handleThemeChange=function(){var r,i,o,s,a,l=this.environment.getTheme().allThemes;try{for(var u=Fu(this.popupList),c=u.next();!c.done;c=u.next()){var p=c.value;try{for(var d=(o=void 0,Fu(Array.from(p.wrapper.classList))),h=d.next();!h.done;h=d.next()){var v=h.value;v.startsWith("ag-theme-")&&p.wrapper.classList.remove(v)}}catch(y){o={error:y}}finally{try{h&&!h.done&&(s=d.return)&&s.call(d)}finally{if(o)throw o.error}}l.length&&(a=p.wrapper.classList).add.apply(a,bu([],Au(l),!1))}}catch(y){r={error:y}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}},t.prototype.addEventListenersToPopup=function(r){var i=this,o=this.gridOptionsService.getDocument(),s=this.getPopupParent(),a=r.wrapperEl,l=r.eChild;r.click;var u=r.closedCallback,c=r.afterGuiAttached,p=r.closeOnEsc,d=r.modal,h=!1,v=function(w){if(a.contains(o.activeElement)){var E=w.key;E===_.ESCAPE&&!tt(w)&&m({keyboardEvent:w})}},y=function(w){return m({mouseEvent:w})},C=function(w){return m({touchEvent:w})},m=function(w){w===void 0&&(w={});var E=w.mouseEvent,S=w.touchEvent,R=w.keyboardEvent;i.isEventFromCurrentPopup({mouseEvent:E,touchEvent:S},l)||h||(h=!0,s.removeChild(a),o.removeEventListener("keydown",v),o.removeEventListener("mousedown",y),o.removeEventListener("touchstart",C),o.removeEventListener("contextmenu",y),i.eventService.removeEventListener(g.EVENT_DRAG_STARTED,y),u&&u(E||S||R),i.removePopupFromPopupList(l))};return c&&c({hidePopup:m}),window.setTimeout(function(){p&&o.addEventListener("keydown",v),d&&(o.addEventListener("mousedown",y),i.eventService.addEventListener(g.EVENT_DRAG_STARTED,y),o.addEventListener("touchstart",C),o.addEventListener("contextmenu",y))},0),m},t.prototype.addPopupToPopupList=function(r,i,o,s){this.popupList.push({element:r,wrapper:i,hideFunc:o,instanceId:dC++,isAnchored:!!s}),s&&this.setPopupPositionRelatedToElement(r,s)},t.prototype.getPopupIndex=function(r){return this.popupList.findIndex(function(i){return i.element===r})},t.prototype.setPopupPositionRelatedToElement=function(r,i){var o=this.getPopupIndex(r);if(o!==-1){var s=this.popupList[o];if(s.stopAnchoringPromise&&s.stopAnchoringPromise.then(function(l){return l&&l()}),s.stopAnchoringPromise=void 0,s.isAnchored=!1,!!i){var a=this.keepPopupPositionedRelativeTo({element:i,ePopup:r,hidePopup:s.hideFunc});return s.stopAnchoringPromise=a,s.isAnchored=!0,a}}},t.prototype.removePopupFromPopupList=function(r){this.setAlignedStyles(r,null),this.setPopupPositionRelatedToElement(r,null),this.popupList=this.popupList.filter(function(i){return i.element!==r})},t.prototype.keepPopupPositionedRelativeTo=function(r){var i=this,o=this.getPopupParent(),s=o.getBoundingClientRect(),a=r.element,l=r.ePopup,u=a.getBoundingClientRect(),c=s.top-u.top,p=s.left-u.left,d=c,h=p,v=l.style.top,y=parseInt(v.substring(0,v.length-1),10),C=l.style.left,m=parseInt(C.substring(0,C.length-1),10);return new vt(function(w){i.getFrameworkOverrides().setInterval(function(){var E=o.getBoundingClientRect(),S=a.getBoundingClientRect(),R=S.top==0&&S.left==0&&S.height==0&&S.width==0;if(R){r.hidePopup();return}var T=E.top-S.top;if(T!=d){var F=i.keepXYWithinBounds(l,y+c-T,zt.vertical);l.style.top="".concat(F,"px")}d=T;var A=E.left-S.left;if(A!=h){var x=i.keepXYWithinBounds(l,m+p-A,zt.horizontal);l.style.left="".concat(x,"px")}h=A},200).then(function(E){var S=function(){E!=null&&window.clearInterval(E)};w(S)})})},t.prototype.hasAnchoredPopup=function(){return this.popupList.some(function(r){return r.isAnchored})},t.prototype.isEventFromCurrentPopup=function(r,i){var o=r.mouseEvent,s=r.touchEvent,a=o||s;if(!a)return!1;var l=this.getPopupIndex(i);if(l===-1)return!1;for(var u=l;u<this.popupList.length;u++){var c=this.popupList[u];if(Bi(c.element,a))return!0}return this.isElementWithinCustomPopup(a.target)},t.prototype.isElementWithinCustomPopup=function(r){for(var i=this.gridOptionsService.getDocument();r&&r!==i.body;){if(r.classList.contains("ag-custom-component-popup")||r.parentElement===null)return!0;r=r.parentElement}return!1},t.prototype.getWrapper=function(r){for(;!r.classList.contains("ag-popup")&&r.parentElement;)r=r.parentElement;return r.classList.contains("ag-popup")?r:null},t.prototype.setAlwaysOnTop=function(r,i){var o=this.getWrapper(r);o&&(o.classList.toggle("ag-always-on-top",!!i),i&&this.bringPopupToFront(o))},t.prototype.bringPopupToFront=function(r){var i=this.getPopupParent(),o=Array.prototype.slice.call(i.querySelectorAll(".ag-popup")),s=o.length,a=Array.prototype.slice.call(i.querySelectorAll(".ag-popup.ag-always-on-top")),l=a.length,u=this.getWrapper(r);if(!(!u||s<=1||!i.contains(r))){var c=o.indexOf(u),p=u.querySelectorAll("div"),d=[];if(p.forEach(function(C){C.scrollTop!==0&&d.push([C,C.scrollTop])}),l){var h=u.classList.contains("ag-always-on-top");h?c!==s-1&&Q(a).insertAdjacentElement("afterend",u):c!==s-l-1&&a[0].insertAdjacentElement("beforebegin",u)}else c!==s-1&&Q(o).insertAdjacentElement("afterend",u);for(;d.length;){var v=d.pop();v[0].scrollTop=v[1]}var y={type:"popupToFront",api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,eWrapper:u};this.eventService.dispatchEvent(y)}};var e;return t.WAIT_FOR_POPUP_CONTENT_RESIZE=200,Ci([f("focusService")],t.prototype,"focusService",void 0),Ci([f("ctrlsService")],t.prototype,"ctrlsService",void 0),Ci([f("resizeObserverService")],t.prototype,"resizeObserverService",void 0),Ci([b],t.prototype,"postConstruct",null),t=e=Ci([I("popupService")],t),t}(D),fC=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),vC=function(n){fC(t,n);function t(){var e=n.call(this,`
|
||
<div class="ag-autocomplete-row" role="presentation">
|
||
<div class="ag-autocomplete-row-label"></div>
|
||
</div>`)||this;return e.hasHighlighting=!1,e}return t.prototype.setState=function(e,r){this.value=e,this.render(),this.updateSelected(r)},t.prototype.updateSelected=function(e){this.addOrRemoveCssClass("ag-autocomplete-row-selected",e)},t.prototype.setSearchString=function(e){var r,i=!1;if(P(e)){var o=(r=this.value)===null||r===void 0?void 0:r.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(o>=0){i=!0,this.hasHighlighting=!0;var s=o+e.length,a=se(this.value.slice(0,o)),l=se(this.value.slice(o,s)),u=se(this.value.slice(s));this.getGui().lastElementChild.innerHTML="".concat(a,"<b>").concat(l,"</b>").concat(u)}}!i&&this.hasHighlighting&&(this.hasHighlighting=!1,this.render())},t.prototype.render=function(){var e;this.getGui().lastElementChild.innerHTML=(e=se(this.value))!==null&&e!==void 0?e:" "},t}(W),gC=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Lu=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},yC=function(n){gC(t,n);function t(e){var r=n.call(this,t.TEMPLATE)||this;return r.params=e,r.searchString="",r}return t.prototype.destroy=function(){n.prototype.destroy.call(this)},t.prototype.init=function(){var e=this;this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList=this.createManagedBean(new Ru({cssIdentifier:"autocomplete"})),this.virtualList.setComponentCreator(this.createRowComponent.bind(this)),this.eList.appendChild(this.virtualList.getGui()),this.virtualList.setModel({getRowCount:function(){return e.autocompleteEntries.length},getRow:function(i){return e.autocompleteEntries[i]}});var r=this.virtualList.getGui();this.addManagedListener(r,"click",function(){return e.params.onConfirmed()}),this.addManagedListener(r,"mousemove",this.onMouseMove.bind(this)),this.addManagedListener(r,"mousedown",function(i){return i.preventDefault()}),this.setSelectedValue(0)},t.prototype.onNavigationKeyDown=function(e,r){e.preventDefault();var i=this.autocompleteEntries.indexOf(this.selectedValue),o=r===_.UP?i-1:i+1;this.checkSetSelectedValue(o)},t.prototype.setSearch=function(e){this.searchString=e,P(e)?this.runSearch():(this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList.refresh(),this.checkSetSelectedValue(0)),this.updateSearchInList()},t.prototype.runContainsSearch=function(e,r){var i,o=!1,s=e.toLocaleLowerCase(),a=r.filter(function(l){var u=l.toLocaleLowerCase(),c=u.indexOf(s),p=c===0,d=c>=0;return d&&(!i||!o&&p||o===p&&l.length<i.length)&&(i=l,o=p),d});return!i&&a.length&&(i=a[0]),{topMatch:i,allMatches:a}},t.prototype.runSearch=function(){var e,r,i=this.params.autocompleteEntries,o=i.map(function(p){var d;return(d=p.displayValue)!==null&&d!==void 0?d:p.key}),s,a;if(this.params.useFuzzySearch)s=Jr(this.searchString,o,!0).values,a=s.length?s[0]:void 0;else{var l=this.runContainsSearch(this.searchString,o);s=l.allMatches,a=l.topMatch}var u=i.filter(function(p){var d=p.key,h=p.displayValue;return s.includes(h??d)});if(!u.length&&this.selectedValue&&(!((r=(e=this.params)===null||e===void 0?void 0:e.forceLastSelection)===null||r===void 0)&&r.call(e,this.selectedValue,this.searchString))&&(u=[this.selectedValue]),this.autocompleteEntries=u,this.virtualList.refresh(),!!a){var c=s.indexOf(a);this.checkSetSelectedValue(c)}},t.prototype.updateSearchInList=function(){var e=this;this.virtualList.forEachRenderedRow(function(r){return r.setSearchString(e.searchString)})},t.prototype.checkSetSelectedValue=function(e){e>=0&&e<this.autocompleteEntries.length&&this.setSelectedValue(e)},t.prototype.setSelectedValue=function(e){var r=this.autocompleteEntries[e];this.selectedValue!==r&&(this.selectedValue=r,this.virtualList.ensureIndexVisible(e),this.virtualList.forEachRenderedRow(function(i,o){i.updateSelected(e===o)}))},t.prototype.createRowComponent=function(e){var r,i=new vC;return this.getContext().createBean(i),i.setState((r=e.displayValue)!==null&&r!==void 0?r:e.key,e===this.selectedValue),i},t.prototype.onMouseMove=function(e){var r=this.virtualList.getGui().getBoundingClientRect(),i=this.virtualList.getScrollTop(),o=e.clientY-r.top+i,s=Math.floor(o/this.virtualList.getRowHeight());this.checkSetSelectedValue(s)},t.prototype.afterGuiAttached=function(){this.virtualList.refresh()},t.prototype.getSelectedValue=function(){var e;return this.autocompleteEntries.length&&(e=this.selectedValue)!==null&&e!==void 0?e:null},t.TEMPLATE=`<div class="ag-autocomplete-list-popup">
|
||
<div ref="eList" class="ag-autocomplete-list"></div>
|
||
<div>`,Lu([L("eList")],t.prototype,"eList",void 0),Lu([b],t.prototype,"init",null),t}(lr),CC=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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 i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},mC=function(n){CC(t,n);function t(){var e=n.call(this,`
|
||
<div class="ag-autocomplete" role="presentation">
|
||
<ag-input-text-field ref="eAutocompleteInput"></ag-input-text-field>
|
||
</div>`)||this;return e.isListOpen=!1,e.lastPosition=0,e.valid=!0,e}return t.prototype.postConstruct=function(){var e=this;this.eAutocompleteInput.onValueChange(function(r){return e.onValueChanged(r)}),this.eAutocompleteInput.getInputElement().setAttribute("autocomplete","off"),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.addGuiEventListener("click",this.updatePositionAndList.bind(this)),this.addDestroyFunc(function(){e.destroyBean(e.autocompleteList)}),this.addGuiEventListener("focusout",function(){return e.onFocusOut()})},t.prototype.onValueChanged=function(e){var r=ct(e);this.updateValue(r),this.updateAutocompleteList(r)},t.prototype.updateValue=function(e){this.updateLastPosition(),this.dispatchEvent({type:t.EVENT_VALUE_CHANGED,value:e}),this.validate(e)},t.prototype.updateAutocompleteList=function(e){var r,i,o,s,a=(i=(r=this.listGenerator)===null||r===void 0?void 0:r.call(this,e,this.lastPosition))!==null&&i!==void 0?i:{enabled:!1};if((!a.type||a.type!==((o=this.autocompleteListParams)===null||o===void 0?void 0:o.type))&&this.isListOpen&&this.closeList(),this.autocompleteListParams=a,!((s=this.autocompleteListParams)===null||s===void 0)&&s.enabled){this.isListOpen||this.openList();var l=this.autocompleteListParams.searchString;this.autocompleteList.setSearch(l??"")}else this.isListOpen&&this.closeList()},t.prototype.onKeyDown=function(e){var r=this,i=e.key;switch(this.updateLastPosition(),i){case _.ENTER:this.onEnterKeyDown(e);break;case _.TAB:this.onTabKeyDown(e);break;case _.DOWN:case _.UP:this.onUpDownKeyDown(e,i);break;case _.LEFT:case _.RIGHT:case _.PAGE_HOME:case _.PAGE_END:setTimeout(function(){r.updatePositionAndList()});break;case _.ESCAPE:this.onEscapeKeyDown(e);break;case _.SPACE:e.ctrlKey&&!this.isListOpen&&(e.preventDefault(),this.forceOpenList());break}},t.prototype.confirmSelection=function(){var e,r=(e=this.autocompleteList)===null||e===void 0?void 0:e.getSelectedValue();r&&(this.closeList(),this.dispatchEvent({type:t.EVENT_OPTION_SELECTED,value:this.getValue(),position:this.lastPosition,updateEntry:r,autocompleteType:this.autocompleteListParams.type}))},t.prototype.onTabKeyDown=function(e){this.isListOpen&&(e.preventDefault(),e.stopPropagation(),this.confirmSelection())},t.prototype.onEnterKeyDown=function(e){e.preventDefault(),this.isListOpen?this.confirmSelection():this.onCompleted()},t.prototype.onUpDownKeyDown=function(e,r){var i;e.preventDefault(),this.isListOpen?(i=this.autocompleteList)===null||i===void 0||i.onNavigationKeyDown(e,r):this.forceOpenList()},t.prototype.onEscapeKeyDown=function(e){this.isListOpen&&(e.preventDefault(),e.stopPropagation(),this.closeList(),this.setCaret(this.lastPosition,!0))},t.prototype.onFocusOut=function(){this.isListOpen&&this.closeList()},t.prototype.updatePositionAndList=function(){var e;this.updateLastPosition(),this.updateAutocompleteList((e=this.eAutocompleteInput.getValue())!==null&&e!==void 0?e:null)},t.prototype.setCaret=function(e,r){var i=this.gridOptionsService.getDocument();r&&i.activeElement===i.body&&this.eAutocompleteInput.getFocusableElement().focus();var o=this.eAutocompleteInput.getInputElement();o.setSelectionRange(e,e),e===o.value.length&&(o.scrollLeft=o.scrollWidth)},t.prototype.forceOpenList=function(){this.onValueChanged(this.eAutocompleteInput.getValue())},t.prototype.updateLastPosition=function(){var e;this.lastPosition=(e=this.eAutocompleteInput.getInputElement().selectionStart)!==null&&e!==void 0?e:0},t.prototype.validate=function(e){var r;this.validator&&(this.validationMessage=this.validator(e),this.eAutocompleteInput.getInputElement().setCustomValidity((r=this.validationMessage)!==null&&r!==void 0?r:""),this.valid=!this.validationMessage,this.dispatchEvent({type:t.EVENT_VALID_CHANGED,isValid:this.valid,validationMessage:this.validationMessage}))},t.prototype.openList=function(){var e=this;this.isListOpen=!0,this.autocompleteList=this.createBean(new yC({autocompleteEntries:this.autocompleteListParams.entries,onConfirmed:function(){return e.confirmSelection()},forceLastSelection:this.forceLastSelection}));var r=this.autocompleteList.getGui(),i={ePopup:r,type:"autocomplete",eventSource:this.getGui(),position:"under",alignSide:this.gridOptionsService.get("enableRtl")?"right":"left",keepWithinBounds:!0},o=this.popupService.addPopup({eChild:r,anchorToElement:this.getGui(),positionCallback:function(){return e.popupService.positionPopupByComponent(i)},ariaLabel:this.listAriaLabel});this.hidePopup=o.hideFunc,this.autocompleteList.afterGuiAttached()},t.prototype.closeList=function(){this.isListOpen=!1,this.hidePopup(),this.destroyBean(this.autocompleteList),this.autocompleteList=null},t.prototype.onCompleted=function(){this.isListOpen&&this.closeList(),this.dispatchEvent({type:t.EVENT_VALUE_CONFIRMED,value:this.getValue(),isValid:this.isValid()})},t.prototype.getValue=function(){return ct(this.eAutocompleteInput.getValue())},t.prototype.setInputPlaceholder=function(e){return this.eAutocompleteInput.setInputPlaceholder(e),this},t.prototype.setInputAriaLabel=function(e){return this.eAutocompleteInput.setInputAriaLabel(e),this},t.prototype.setListAriaLabel=function(e){return this.listAriaLabel=e,this},t.prototype.setListGenerator=function(e){return this.listGenerator=e,this},t.prototype.setValidator=function(e){return this.validator=e,this},t.prototype.isValid=function(){return this.valid},t.prototype.setValue=function(e){var r=e.value,i=e.position,o=e.silent,s=e.updateListOnlyIfOpen,a=e.restoreFocus;this.eAutocompleteInput.setValue(r,!0),this.setCaret(i??this.lastPosition,a),o||this.updateValue(r),(!s||this.isListOpen)&&this.updateAutocompleteList(r)},t.prototype.setForceLastSelection=function(e){return this.forceLastSelection=e,this},t.prototype.setInputDisabled=function(e){return this.eAutocompleteInput.setDisabled(e),this},t.EVENT_VALUE_CHANGED="eventValueChanged",t.EVENT_VALUE_CONFIRMED="eventValueConfirmed",t.EVENT_OPTION_SELECTED="eventOptionSelected",t.EVENT_VALID_CHANGED="eventValidChanged",Ns([f("popupService")],t.prototype,"popupService",void 0),Ns([L("eAutocompleteInput")],t.prototype,"eAutocompleteInput",void 0),Ns([b],t.prototype,"postConstruct",null),t}(W),SC=["mouseover","mouseout","mouseenter","mouseleave","mousemove"],wC=["touchstart","touchend","touchmove","touchcancel"],EC=function(){function n(t){t===void 0&&(t="javascript"),this.frameworkName=t,this.renderingEngine="vanilla",this.isOutsideAngular=function(e){return $e(SC,e)}}return n.prototype.setTimeout=function(t,e){window.setTimeout(t,e)},n.prototype.setInterval=function(t,e){return new vt(function(r){r(window.setInterval(t,e))})},n.prototype.addEventListener=function(t,e,r,i){var o=$e(wC,e);t.addEventListener(e,r,{capture:!!i,passive:o})},n.prototype.dispatchEvent=function(t,e,r){e()},n.prototype.frameworkComponent=function(t){return null},n.prototype.isFrameworkComponent=function(t){return!1},n.prototype.getDocLink=function(t){var e=this.frameworkName==="solid"?"react":this.frameworkName;return"https://www.ag-grid.com/".concat(e,"-data-grid").concat(t?"/".concat(t):"")},n}(),_C=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},RC=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},OC=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},TC=function(n){_C(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.getNextCellToFocus=function(e,r,i){return i===void 0&&(i=!1),i?this.getNextCellToFocusWithCtrlPressed(e,r):this.getNextCellToFocusWithoutCtrlPressed(e,r)},t.prototype.getNextCellToFocusWithCtrlPressed=function(e,r){var i=e===_.UP,o=e===_.DOWN,s=e===_.LEFT,a,l;if(i||o)l=i?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow(),a=r.column;else{var u=this.columnModel.getAllDisplayedColumns(),c=this.gridOptionsService.get("enableRtl");l=r.rowIndex,a=s!==c?u[0]:Q(u)}return{rowIndex:l,rowPinned:null,column:a}},t.prototype.getNextCellToFocusWithoutCtrlPressed=function(e,r){for(var i=r,o=!1;!o;){switch(e){case _.UP:i=this.getCellAbove(i);break;case _.DOWN:i=this.getCellBelow(i);break;case _.RIGHT:this.gridOptionsService.get("enableRtl")?i=this.getCellToLeft(i):i=this.getCellToRight(i);break;case _.LEFT:this.gridOptionsService.get("enableRtl")?i=this.getCellToRight(i):i=this.getCellToLeft(i);break;default:i=null,console.warn("AG Grid: unknown key for navigation "+e);break}i?o=this.isCellGoodToFocusOn(i):o=!0}return i},t.prototype.isCellGoodToFocusOn=function(e){var r=e.column,i;switch(e.rowPinned){case"top":i=this.pinnedRowModel.getPinnedTopRow(e.rowIndex);break;case"bottom":i=this.pinnedRowModel.getPinnedBottomRow(e.rowIndex);break;default:i=this.rowModel.getRow(e.rowIndex);break}if(!i)return!1;var o=r.isSuppressNavigable(i);return!o},t.prototype.getCellToLeft=function(e){if(!e)return null;var r=this.columnModel.getDisplayedColBefore(e.column);return r?{rowIndex:e.rowIndex,column:r,rowPinned:e.rowPinned}:null},t.prototype.getCellToRight=function(e){if(!e)return null;var r=this.columnModel.getDisplayedColAfter(e.column);return r?{rowIndex:e.rowIndex,column:r,rowPinned:e.rowPinned}:null},t.prototype.getRowBelow=function(e){var r=e.rowIndex,i=e.rowPinned;if(this.isLastRowInContainer(e))switch(i){case"bottom":return null;case"top":return this.rowModel.isRowsToRender()?{rowIndex:this.paginationProxy.getPageFirstRow(),rowPinned:null}:this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;default:return this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null}var o=this.rowModel.getRow(e.rowIndex),s=this.getNextStickyPosition(o);return s||{rowIndex:r+1,rowPinned:i}},t.prototype.getNextStickyPosition=function(e,r){if(!(!this.gridOptionsService.isGroupRowsSticky()||!e||!e.sticky)){var i=OC([],RC(this.rowRenderer.getStickyTopRowCtrls()),!1).sort(function(l,u){return l.getRowNode().rowIndex-u.getRowNode().rowIndex}),o=r?-1:1,s=i.findIndex(function(l){return l.getRowNode().rowIndex===e.rowIndex}),a=i[s+o];if(a)return{rowIndex:a.getRowNode().rowIndex,rowPinned:null}}},t.prototype.getCellBelow=function(e){if(!e)return null;var r=this.getRowBelow(e);return r?{rowIndex:r.rowIndex,column:e.column,rowPinned:r.rowPinned}:null},t.prototype.isLastRowInContainer=function(e){var r=e.rowPinned,i=e.rowIndex;if(r==="top"){var o=this.pinnedRowModel.getPinnedTopRowData().length-1;return o<=i}if(r==="bottom"){var s=this.pinnedRowModel.getPinnedBottomRowData().length-1;return s<=i}var a=this.paginationProxy.getPageLastRow();return a<=i},t.prototype.getRowAbove=function(e){var r=e.rowIndex,i=e.rowPinned,o=i?r===0:r===this.paginationProxy.getPageFirstRow();if(o)return i==="top"?null:i?this.rowModel.isRowsToRender()?this.getLastBodyCell():this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null:this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null;var s=this.rowModel.getRow(e.rowIndex),a=this.getNextStickyPosition(s,!0);return a||{rowIndex:r-1,rowPinned:i}},t.prototype.getCellAbove=function(e){if(!e)return null;var r=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});return r?{rowIndex:r.rowIndex,column:e.column,rowPinned:r.rowPinned}:null},t.prototype.getLastBodyCell=function(){var e=this.paginationProxy.getPageLastRow();return{rowIndex:e,rowPinned:null}},t.prototype.getLastFloatingTopRow=function(){var e=this.pinnedRowModel.getPinnedTopRowData().length-1;return{rowIndex:e,rowPinned:"top"}},t.prototype.getNextTabbedCell=function(e,r){return r?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)},t.prototype.getNextTabbedCellForwards=function(e){var r=this.columnModel.getAllDisplayedColumns(),i=e.rowIndex,o=e.rowPinned,s=this.columnModel.getDisplayedColAfter(e.column);if(!s){s=r[0];var a=this.getRowBelow(e);if(V(a)||!a.rowPinned&&!this.paginationProxy.isRowInPage(a))return null;i=a?a.rowIndex:null,o=a?a.rowPinned:null}return{rowIndex:i,column:s,rowPinned:o}},t.prototype.getNextTabbedCellBackwards=function(e){var r=this.columnModel.getAllDisplayedColumns(),i=e.rowIndex,o=e.rowPinned,s=this.columnModel.getDisplayedColBefore(e.column);if(!s){s=Q(r);var a=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(V(a)||!a.rowPinned&&!this.paginationProxy.isRowInPage(a))return null;i=a?a.rowIndex:null,o=a?a.rowPinned:null}return{rowIndex:i,column:s,rowPinned:o}},Mr([f("columnModel")],t.prototype,"columnModel",void 0),Mr([f("rowModel")],t.prototype,"rowModel",void 0),Mr([f("rowRenderer")],t.prototype,"rowRenderer",void 0),Mr([f("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),Mr([f("paginationProxy")],t.prototype,"paginationProxy",void 0),t=Mr([I("cellNavigationService")],t),t}(D),PC=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),mi=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},DC=function(n,t){return function(e,r){t(e,r,n)}},AC=function(n){PC(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.consuming=!1,e}return t.prototype.setBeans=function(e){this.logger=e.create("AlignedGridsService")},t.prototype.getAlignedGridApis=function(){var e=this,r,i=(r=this.gridOptionsService.get("alignedGrids"))!==null&&r!==void 0?r:[],o=typeof i=="function";typeof i=="function"&&(i=i());var s=function(){return"See ".concat(e.getFrameworkOverrides().getDocLink("aligned-grids"))},a=i.map(function(l){var u;if(!l){pt("alignedGrids contains an undefined option."),o||pt(`You may want to configure via a callback to avoid setup race conditions:
|
||
"alignedGrids: () => [linkedGrid]"`),pt(s());return}if(l instanceof ru)return l;var c=l;return"current"in c?(u=c.current)===null||u===void 0?void 0:u.api:(c.api||pt("alignedGrids - No api found on the linked grid. If you are passing gridOptions to alignedGrids since v31 this is no longer valid. ".concat(s())),c.api)}).filter(function(l){return!!l&&!l.isDestroyed()});return a},t.prototype.init=function(){this.addManagedListener(this.eventService,g.EVENT_COLUMN_MOVED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VISIBLE,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PINNED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_GROUP_OPENED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_RESIZED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL,this.fireScrollEvent.bind(this))},t.prototype.fireEvent=function(e){this.consuming||this.getAlignedGridApis().forEach(function(r){var i=r.__getAlignedGridService();e(i)})},t.prototype.onEvent=function(e){this.consuming=!0,e(),this.consuming=!1},t.prototype.fireColumnEvent=function(e){this.fireEvent(function(r){r.onColumnEvent(e)})},t.prototype.fireScrollEvent=function(e){e.direction==="horizontal"&&this.fireEvent(function(r){r.onScrollEvent(e)})},t.prototype.onScrollEvent=function(e){var r=this;this.onEvent(function(){var i=r.ctrlsService.getGridBodyCtrl();i.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})},t.prototype.getMasterColumns=function(e){var r=[];return e.columns?e.columns.forEach(function(i){r.push(i)}):e.column&&r.push(e.column),r},t.prototype.getColumnIds=function(e){var r=[];return e.columns?e.columns.forEach(function(i){r.push(i.getColId())}):e.column&&r.push(e.column.getColId()),r},t.prototype.onColumnEvent=function(e){var r=this;this.onEvent(function(){switch(e.type){case g.EVENT_COLUMN_MOVED:case g.EVENT_COLUMN_VISIBLE:case g.EVENT_COLUMN_PINNED:case g.EVENT_COLUMN_RESIZED:var i=e;r.processColumnEvent(i);break;case g.EVENT_COLUMN_GROUP_OPENED:var o=e;r.processGroupOpenedEvent(o);break;case g.EVENT_COLUMN_PIVOT_CHANGED:console.warn("AG Grid: pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.");break}})},t.prototype.processGroupOpenedEvent=function(e){var r=this;e.columnGroups.forEach(function(i){var o=null;if(i){var s=i.getGroupId();o=r.columnModel.getProvidedColumnGroup(s)}i&&!o||(r.logger.log("onColumnEvent-> processing "+e+" expanded = "+i.isExpanded()),r.columnModel.setColumnGroupOpened(o,i.isExpanded(),"alignedGridChanged"))})},t.prototype.processColumnEvent=function(e){var r=this,i,o=e.column,s=null;if(o&&(s=this.columnModel.getPrimaryColumn(o.getColId())),!(o&&!s)){var a=this.getMasterColumns(e);switch(e.type){case g.EVENT_COLUMN_MOVED:{var l=e,u=e.api.getColumnState(),c=u.map(function(m){return{colId:m.colId}});this.columnModel.applyColumnState({state:c,applyOrder:!0},"alignedGridChanged"),this.logger.log("onColumnEvent-> processing ".concat(e.type," toIndex = ").concat(l.toIndex))}break;case g.EVENT_COLUMN_VISIBLE:{var p=e,u=e.api.getColumnState(),c=u.map(function(E){return{colId:E.colId,hide:E.hide}});this.columnModel.applyColumnState({state:c},"alignedGridChanged"),this.logger.log("onColumnEvent-> processing ".concat(e.type," visible = ").concat(p.visible))}break;case g.EVENT_COLUMN_PINNED:{var d=e,u=e.api.getColumnState(),c=u.map(function(E){return{colId:E.colId,pinned:E.pinned}});this.columnModel.applyColumnState({state:c},"alignedGridChanged"),this.logger.log("onColumnEvent-> processing ".concat(e.type," pinned = ").concat(d.pinned))}break;case g.EVENT_COLUMN_RESIZED:var h=e,v={};a.forEach(function(m){r.logger.log("onColumnEvent-> processing ".concat(e.type," actualWidth = ").concat(m.getActualWidth())),v[m.getId()]={key:m.getColId(),newWidth:m.getActualWidth()}}),(i=h.flexColumns)===null||i===void 0||i.forEach(function(m){v[m.getId()]&&delete v[m.getId()]}),this.columnModel.setColumnWidths(Object.values(v),!1,h.finished,"alignedGridChanged");break}var y=this.ctrlsService.getGridBodyCtrl(),C=y.isVerticalScrollShowing();this.getAlignedGridApis().forEach(function(m){m.setGridOption("alwaysShowVerticalScroll",C)})}},mi([f("columnModel")],t.prototype,"columnModel",void 0),mi([f("ctrlsService")],t.prototype,"ctrlsService",void 0),mi([DC(0,Re("loggerFactory"))],t.prototype,"setBeans",null),mi([b],t.prototype,"init",null),t=mi([I("alignedGridsService")],t),t}(D),bC=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Si=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},FC=function(n,t){return function(e,r){t(e,r,n)}},Iu=function(n){bC(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.selectedNodes=new Map,e}return t.prototype.setBeans=function(e){this.logger=e.create("selectionService"),this.resetNodes()},t.prototype.init=function(){var e=this;this.rowSelection=this.gridOptionsService.get("rowSelection"),this.groupSelectsChildren=this.gridOptionsService.get("groupSelectsChildren"),this.addManagedPropertyListeners(["groupSelectsChildren","rowSelection"],function(){e.groupSelectsChildren=e.gridOptionsService.get("groupSelectsChildren"),e.rowSelection=e.gridOptionsService.get("rowSelection"),e.deselectAllRowNodes({source:"api"})}),this.addManagedListener(this.eventService,g.EVENT_ROW_SELECTED,this.onRowSelected.bind(this))},t.prototype.isMultiselect=function(){return this.rowSelection==="multiple"},t.prototype.setNodesSelected=function(e){var r;if(e.nodes.length===0)return 0;var i=e.newValue,o=e.clearSelection,s=e.suppressFinishActions,a=e.rangeSelect;e.event;var l=e.source,u=l===void 0?"api":l;if(e.nodes.length>1&&!this.isMultiselect())return console.warn("AG Grid: cannot multi select while rowSelection='single'"),0;var c=this.groupSelectsChildren&&e.groupSelectsFiltered===!0,p=e.nodes.map(function(R){return R.footer?R.sibling:R});if(a){if(e.nodes.length>1)return console.warn("AG Grid: cannot range select while selecting multiple rows"),0;var d=this.getLastSelectedNode();if(d){var h=p[0],v=d!==h;if(v&&this.isMultiselect())return this.selectRange(h,d,e.newValue,u)}}for(var y=0,C=0;C<p.length;C++){var h=p[C],m=c&&h.group;if(!m){var w=h.selectThisNode(i,e.event,u);w&&y++}this.groupSelectsChildren&&(!((r=h.childrenAfterGroup)===null||r===void 0)&&r.length)&&(y+=this.selectChildren(h,i,c,u))}if(!s){var E=i&&(o||!this.isMultiselect());if(E&&(y+=this.clearOtherNodes(p[0],u)),y>0){this.updateGroupsFromChildrenSelections(u);var S={type:g.EVENT_SELECTION_CHANGED,source:u};this.eventService.dispatchEvent(S)}}return y},t.prototype.selectRange=function(e,r,i,o){var s=this;i===void 0&&(i=!0);var a=this.rowModel.getNodesInRangeForSelection(e,r),l=0;a.forEach(function(c){if(!(c.group&&s.groupSelectsChildren||i===!1&&e===c)){var p=c.selectThisNode(i,void 0,o);p&&l++}}),this.updateGroupsFromChildrenSelections(o);var u={type:g.EVENT_SELECTION_CHANGED,source:o};return this.eventService.dispatchEvent(u),l},t.prototype.selectChildren=function(e,r,i,o){var s=i?e.childrenAfterAggFilter:e.childrenAfterGroup;return V(s)?0:this.setNodesSelected({newValue:r,clearSelection:!1,suppressFinishActions:!0,groupSelectsFiltered:i,source:o,nodes:s})},t.prototype.getLastSelectedNode=function(){var e=Array.from(this.selectedNodes.keys());if(e.length==0)return null;var r=this.selectedNodes.get(Q(e));return r||null},t.prototype.getSelectedNodes=function(){var e=[];return this.selectedNodes.forEach(function(r){r&&e.push(r)}),e},t.prototype.getSelectedRows=function(){var e=[];return this.selectedNodes.forEach(function(r){r&&r.data&&e.push(r.data)}),e},t.prototype.getSelectionCount=function(){return this.selectedNodes.size},t.prototype.filterFromSelection=function(e){var r=new Map;this.selectedNodes.forEach(function(i,o){var s=i&&e(i);s&&r.set(o,i)}),this.selectedNodes=r},t.prototype.updateGroupsFromChildrenSelections=function(e,r){if(!this.groupSelectsChildren||this.rowModel.getType()!=="clientSide")return!1;var i=this.rowModel,o=i.getRootNode();r||(r=new To(!0,o),r.setInactive());var s=!1;return r.forEachChangedNodeDepthFirst(function(a){if(a!==o){var l=a.calculateSelectedFromChildren();s=a.selectThisNode(l===null?!1:l,void 0,e)||s}}),s},t.prototype.clearOtherNodes=function(e,r){var i=this,o=new Map,s=0;return this.selectedNodes.forEach(function(a){if(a&&a.id!==e.id){var l=i.selectedNodes.get(a.id);s+=l.setSelectedParams({newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:r}),i.groupSelectsChildren&&a.parent&&o.set(a.parent.id,a.parent)}}),o.forEach(function(a){var l=a.calculateSelectedFromChildren();a.selectThisNode(l===null?!1:l,void 0,r)}),s},t.prototype.onRowSelected=function(e){var r=e.node;this.groupSelectsChildren&&r.group||(r.isSelected()?this.selectedNodes.set(r.id,r):this.selectedNodes.delete(r.id))},t.prototype.syncInRowNode=function(e,r){this.syncInOldRowNode(e,r),this.syncInNewRowNode(e)},t.prototype.syncInOldRowNode=function(e,r){var i=P(r)&&e.id!==r.id;if(i&&r){var o=r.id,s=this.selectedNodes.get(o)==e;s&&this.selectedNodes.set(r.id,r)}},t.prototype.syncInNewRowNode=function(e){this.selectedNodes.has(e.id)?(e.setSelectedInitialValue(!0),this.selectedNodes.set(e.id,e)):e.setSelectedInitialValue(!1)},t.prototype.reset=function(e){var r=this.getSelectionCount();if(this.resetNodes(),r){var i={type:g.EVENT_SELECTION_CHANGED,source:e};this.eventService.dispatchEvent(i)}},t.prototype.resetNodes=function(){var e;this.logger.log("reset"),(e=this.selectedNodes)===null||e===void 0||e.clear()},t.prototype.getBestCostNodeSelection=function(){if(this.rowModel.getType()!=="clientSide")return;var e=this.rowModel,r=e.getTopLevelNodes();if(r===null)return;var i=[];function o(s){for(var a=0,l=s.length;a<l;a++){var u=s[a];if(u.isSelected())i.push(u);else{var c=u;c.group&&c.children&&o(c.children)}}}return o(r),i},t.prototype.isEmpty=function(){var e=0;return this.selectedNodes.forEach(function(r){r&&e++}),e===0},t.prototype.deselectAllRowNodes=function(e){var r=function(u){return u.selectThisNode(!1,void 0,o)},i=this.rowModel.getType()==="clientSide",o=e.source,s=e.justFiltered,a=e.justCurrentPage;if(a||s){if(!i){console.error("AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'");return}this.getNodesToSelect(s,a).forEach(r)}else this.selectedNodes.forEach(function(u){u&&r(u)}),this.reset(o);i&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(o);var l={type:g.EVENT_SELECTION_CHANGED,source:o};this.eventService.dispatchEvent(l)},t.prototype.getSelectedCounts=function(e,r){var i=this,o=0,s=0,a=function(l){i.groupSelectsChildren&&l.group||(l.isSelected()?o++:l.selectable&&s++)};return this.getNodesToSelect(e,r).forEach(a),{selectedCount:o,notSelectedCount:s}},t.prototype.getSelectAllState=function(e,r){var i=this.getSelectedCounts(e,r),o=i.selectedCount,s=i.notSelectedCount;return o===0&&s===0?!1:o>0&&s>0?null:o>0},t.prototype.getNodesToSelect=function(e,r){var i=this;if(e===void 0&&(e=!1),r===void 0&&(r=!1),this.rowModel.getType()!=="clientSide")throw new Error("selectAll only available when rowModelType='clientSide', ie not ".concat(this.rowModel.getType()));var o=[];if(r)return this.paginationProxy.forEachNodeOnPage(function(a){if(!a.group){o.push(a);return}if(!a.expanded){var l=function(u){var c;o.push(u),!((c=u.childrenAfterFilter)===null||c===void 0)&&c.length&&u.childrenAfterFilter.forEach(l)};l(a);return}i.groupSelectsChildren||o.push(a)}),o;var s=this.rowModel;return e?(s.forEachNodeAfterFilter(function(a){o.push(a)}),o):(s.forEachNode(function(a){o.push(a)}),o)},t.prototype.selectAllRowNodes=function(e){if(this.rowModel.getType()!=="clientSide")throw new Error("selectAll only available when rowModelType='clientSide', ie not ".concat(this.rowModel.getType()));var r=e.source,i=e.justFiltered,o=e.justCurrentPage,s=function(l){return l.selectThisNode(!0,void 0,r)};this.getNodesToSelect(i,o).forEach(s),this.rowModel.getType()==="clientSide"&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(r);var a={type:g.EVENT_SELECTION_CHANGED,source:r};this.eventService.dispatchEvent(a)},t.prototype.getSelectionState=function(){var e=[];return this.selectedNodes.forEach(function(r){r!=null&&r.id&&e.push(r.id)}),e.length?e:null},t.prototype.setSelectionState=function(e,r){if(Array.isArray(e)){var i=new Set(e),o=[];this.rowModel.forEachNode(function(s){i.has(s.id)&&o.push(s)}),this.setNodesSelected({newValue:!0,nodes:o,source:r})}},Si([f("rowModel")],t.prototype,"rowModel",void 0),Si([f("paginationProxy")],t.prototype,"paginationProxy",void 0),Si([FC(0,Re("loggerFactory"))],t.prototype,"setBeans",null),Si([b],t.prototype,"init",null),t=Si([I("selectionService")],t),t}(D),xu=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},LC=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},IC=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},Mu=function(){function n(t){var e=this;this.viaApi=function(r){for(var i,o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];return B("Since v31, 'columnApi.".concat(r,"' is deprecated and moved to 'api.").concat(r,"'.")),(i=e.api)[r].apply(i,IC([],LC(o),!1))},this.api=t}return n.prototype.sizeColumnsToFit=function(t){this.viaApi("sizeColumnsToFit",t)},n.prototype.setColumnGroupOpened=function(t,e){this.viaApi("setColumnGroupOpened",t,e)},n.prototype.getColumnGroup=function(t,e){return this.viaApi("getColumnGroup",t,e)},n.prototype.getProvidedColumnGroup=function(t){return this.viaApi("getProvidedColumnGroup",t)},n.prototype.getDisplayNameForColumn=function(t,e){return this.viaApi("getDisplayNameForColumn",t,e)},n.prototype.getDisplayNameForColumnGroup=function(t,e){return this.viaApi("getDisplayNameForColumnGroup",t,e)},n.prototype.getColumn=function(t){return this.viaApi("getColumn",t)},n.prototype.getColumns=function(){return this.viaApi("getColumns")},n.prototype.applyColumnState=function(t){return this.viaApi("applyColumnState",t)},n.prototype.getColumnState=function(){return this.viaApi("getColumnState")},n.prototype.resetColumnState=function(){this.viaApi("resetColumnState")},n.prototype.getColumnGroupState=function(){return this.viaApi("getColumnGroupState")},n.prototype.setColumnGroupState=function(t){this.viaApi("setColumnGroupState",t)},n.prototype.resetColumnGroupState=function(){this.viaApi("resetColumnGroupState")},n.prototype.isPinning=function(){return this.viaApi("isPinning")},n.prototype.isPinningLeft=function(){return this.viaApi("isPinningLeft")},n.prototype.isPinningRight=function(){return this.viaApi("isPinningRight")},n.prototype.getDisplayedColAfter=function(t){return this.viaApi("getDisplayedColAfter",t)},n.prototype.getDisplayedColBefore=function(t){return this.viaApi("getDisplayedColBefore",t)},n.prototype.setColumnVisible=function(t,e){this.viaApi("setColumnVisible",t,e)},n.prototype.setColumnsVisible=function(t,e){this.viaApi("setColumnsVisible",t,e)},n.prototype.setColumnPinned=function(t,e){this.viaApi("setColumnPinned",t,e)},n.prototype.setColumnsPinned=function(t,e){this.viaApi("setColumnsPinned",t,e)},n.prototype.getAllGridColumns=function(){return this.viaApi("getAllGridColumns")},n.prototype.getDisplayedLeftColumns=function(){return this.viaApi("getDisplayedLeftColumns")},n.prototype.getDisplayedCenterColumns=function(){return this.viaApi("getDisplayedCenterColumns")},n.prototype.getDisplayedRightColumns=function(){return this.viaApi("getDisplayedRightColumns")},n.prototype.getAllDisplayedColumns=function(){return this.viaApi("getAllDisplayedColumns")},n.prototype.getAllDisplayedVirtualColumns=function(){return this.viaApi("getAllDisplayedVirtualColumns")},n.prototype.moveColumn=function(t,e){this.viaApi("moveColumn",t,e)},n.prototype.moveColumnByIndex=function(t,e){this.viaApi("moveColumnByIndex",t,e)},n.prototype.moveColumns=function(t,e){this.viaApi("moveColumns",t,e)},n.prototype.moveRowGroupColumn=function(t,e){this.viaApi("moveRowGroupColumn",t,e)},n.prototype.setColumnAggFunc=function(t,e){this.viaApi("setColumnAggFunc",t,e)},n.prototype.setColumnWidth=function(t,e,r,i){r===void 0&&(r=!0),this.viaApi("setColumnWidth",t,e,r,i)},n.prototype.setColumnWidths=function(t,e,r){e===void 0&&(e=!0),this.viaApi("setColumnWidths",t,e,r)},n.prototype.setPivotMode=function(t){this.viaApi("setPivotMode",t)},n.prototype.isPivotMode=function(){return this.viaApi("isPivotMode")},n.prototype.getPivotResultColumn=function(t,e){return this.viaApi("getPivotResultColumn",t,e)},n.prototype.setValueColumns=function(t){this.viaApi("setValueColumns",t)},n.prototype.getValueColumns=function(){return this.viaApi("getValueColumns")},n.prototype.removeValueColumn=function(t){this.viaApi("removeValueColumn",t)},n.prototype.removeValueColumns=function(t){this.viaApi("removeValueColumns",t)},n.prototype.addValueColumn=function(t){this.viaApi("addValueColumn",t)},n.prototype.addValueColumns=function(t){this.viaApi("addValueColumns",t)},n.prototype.setRowGroupColumns=function(t){this.viaApi("setRowGroupColumns",t)},n.prototype.removeRowGroupColumn=function(t){this.viaApi("removeRowGroupColumn",t)},n.prototype.removeRowGroupColumns=function(t){this.viaApi("removeRowGroupColumns",t)},n.prototype.addRowGroupColumn=function(t){this.viaApi("addRowGroupColumn",t)},n.prototype.addRowGroupColumns=function(t){this.viaApi("addRowGroupColumns",t)},n.prototype.getRowGroupColumns=function(){return this.viaApi("getRowGroupColumns")},n.prototype.setPivotColumns=function(t){this.viaApi("setPivotColumns",t)},n.prototype.removePivotColumn=function(t){this.viaApi("removePivotColumn",t)},n.prototype.removePivotColumns=function(t){this.viaApi("removePivotColumns",t)},n.prototype.addPivotColumn=function(t){this.viaApi("addPivotColumn",t)},n.prototype.addPivotColumns=function(t){this.viaApi("addPivotColumns",t)},n.prototype.getPivotColumns=function(){return this.viaApi("getPivotColumns")},n.prototype.getLeftDisplayedColumnGroups=function(){return this.viaApi("getLeftDisplayedColumnGroups")},n.prototype.getCenterDisplayedColumnGroups=function(){return this.viaApi("getCenterDisplayedColumnGroups")},n.prototype.getRightDisplayedColumnGroups=function(){return this.viaApi("getRightDisplayedColumnGroups")},n.prototype.getAllDisplayedColumnGroups=function(){return this.viaApi("getAllDisplayedColumnGroups")},n.prototype.autoSizeColumn=function(t,e){return this.viaApi("autoSizeColumn",t,e)},n.prototype.autoSizeColumns=function(t,e){this.viaApi("autoSizeColumns",t,e)},n.prototype.autoSizeAllColumns=function(t){this.viaApi("autoSizeAllColumns",t)},n.prototype.setPivotResultColumns=function(t){this.viaApi("setPivotResultColumns",t)},n.prototype.getPivotResultColumns=function(){return this.viaApi("getPivotResultColumns")},xu([f("gridApi")],n.prototype,"api",void 0),n=xu([I("columnApi")],n),n}(),xC=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Nr=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},MC=function(n){xC(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.initialised=!1,e.isSsrm=!1,e}return t.prototype.init=function(){var e=this;this.isSsrm=this.gridOptionsService.isRowModelType("serverSide"),this.cellExpressions=this.gridOptionsService.get("enableCellExpressions"),this.isTreeData=this.gridOptionsService.get("treeData"),this.initialised=!0;var r=function(o){return e.callColumnCellValueChangedHandler(o)},i=this.gridOptionsService.useAsyncEvents();this.eventService.addEventListener(g.EVENT_CELL_VALUE_CHANGED,r,i),this.addDestroyFunc(function(){return e.eventService.removeEventListener(g.EVENT_CELL_VALUE_CHANGED,r,i)}),this.addManagedPropertyListener("treeData",function(o){return e.isTreeData=o.currentValue})},t.prototype.getValue=function(e,r,i,o){if(i===void 0&&(i=!1),o===void 0&&(o=!1),this.initialised||this.init(),!!r){var s=e.getColDef(),a=s.field,l=e.getColId(),u=r.data,c,p=r.groupData&&r.groupData[l]!==void 0,d=!o&&r.aggData&&r.aggData[l]!==void 0,h=this.isSsrm&&o&&!!e.getColDef().aggFunc,v=this.isSsrm&&r.footer&&r.field&&(e.getColDef().showRowGroup===!0||e.getColDef().showRowGroup===r.field);if(i&&s.filterValueGetter?c=this.executeFilterValueGetter(s.filterValueGetter,u,e,r):this.isTreeData&&d?c=r.aggData[l]:this.isTreeData&&s.valueGetter?c=this.executeValueGetter(s.valueGetter,u,e,r):this.isTreeData&&a&&u?c=Sr(u,a,e.isFieldContainsDots()):p?c=r.groupData[l]:d?c=r.aggData[l]:s.valueGetter?c=this.executeValueGetter(s.valueGetter,u,e,r):v?c=Sr(u,r.field,e.isFieldContainsDots()):a&&u&&!h&&(c=Sr(u,a,e.isFieldContainsDots())),this.cellExpressions&&typeof c=="string"&&c.indexOf("=")===0){var y=c.substring(1);c=this.executeValueGetter(y,u,e,r)}if(c==null){var C=this.getOpenedGroup(r,e);if(C!=null)return C}return c}},t.prototype.getOpenedGroup=function(e,r){if(this.gridOptionsService.get("showOpenedGroup")){var i=r.getColDef();if(i.showRowGroup)for(var o=r.getColDef().showRowGroup,s=e.parent;s!=null;){if(s.rowGroupColumn&&(o===!0||o===s.rowGroupColumn.getColId()))return s.key;s=s.parent}}},t.prototype.setValue=function(e,r,i,o){var s=this.columnModel.getPrimaryColumn(r);if(!e||!s)return!1;V(e.data)&&(e.data={});var a=s.getColDef(),l=a.field,u=a.valueSetter;if(V(l)&&V(u))return console.warn("AG Grid: you need either field or valueSetter set on colDef for editing to work"),!1;if(!this.dataTypeService.checkType(s,i))return console.warn("AG Grid: Data type of the new value does not match the cell data type of the column"),!1;var c={node:e,data:e.data,oldValue:this.getValue(s,e),newValue:i,colDef:s.getColDef(),column:s,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};c.newValue=i;var p;if(P(u)?typeof u=="function"?p=u(c):p=this.expressionService.evaluate(u,c):p=this.setValueUsingField(e.data,l,i,s.isFieldContainsDots()),p===void 0&&(p=!0),!p)return!1;e.resetQuickFilterAggregateText(),this.valueCache.onDataChanged(),c.newValue=this.getValue(s,e);var d={type:g.EVENT_CELL_VALUE_CHANGED,event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:c.column,api:c.api,columnApi:c.columnApi,colDef:c.colDef,context:c.context,data:e.data,node:e,oldValue:c.oldValue,newValue:c.newValue,value:c.newValue,source:o};return this.eventService.dispatchEvent(d),!0},t.prototype.callColumnCellValueChangedHandler=function(e){var r=e.colDef.onCellValueChanged;typeof r=="function"&&r({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,columnApi:e.columnApi,context:e.context})},t.prototype.setValueUsingField=function(e,r,i,o){if(!r)return!1;var s=!1;if(!o)s=e[r]===i,s||(e[r]=i);else for(var a=r.split("."),l=e;a.length>0&&l;){var u=a.shift();a.length===0?(s=l[u]===i,s||(l[u]=i)):l=l[u]}return!s},t.prototype.executeFilterValueGetter=function(e,r,i,o){var s={data:r,node:o,column:i,colDef:i.getColDef(),api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,getValue:this.getValueCallback.bind(this,o)};return typeof e=="function"?e(s):this.expressionService.evaluate(e,s)},t.prototype.executeValueGetter=function(e,r,i,o){var s=i.getColId(),a=this.valueCache.getValue(o,s);if(a!==void 0)return a;var l={data:r,node:o,column:i,colDef:i.getColDef(),api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,getValue:this.getValueCallback.bind(this,o)},u;return typeof e=="function"?u=e(l):u=this.expressionService.evaluate(e,l),this.valueCache.setValue(o,s,u),u},t.prototype.getValueCallback=function(e,r){var i=this.columnModel.getPrimaryColumn(r);return i?this.getValue(i,e):null},t.prototype.getKeyForNode=function(e,r){var i=this.getValue(e,r),o=e.getColDef().keyCreator,s=i;if(o){var a={value:i,colDef:e.getColDef(),column:e,node:r,data:r.data,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};s=o(a)}return typeof s=="string"||s==null||(s=String(s),s==="[object Object]"&&B("a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (se AG Grid docs) or b) to toString() on the object to return a key")),s},Nr([f("expressionService")],t.prototype,"expressionService",void 0),Nr([f("columnModel")],t.prototype,"columnModel",void 0),Nr([f("valueCache")],t.prototype,"valueCache",void 0),Nr([f("dataTypeService")],t.prototype,"dataTypeService",void 0),Nr([b],t.prototype,"init",null),t=Nr([I("valueService")],t),t}(D),NC=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Nu=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},GC=function(n,t){return function(e,r){t(e,r,n)}},VC=function(n){NC(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.expressionToFunctionCache={},e}return t.prototype.setBeans=function(e){this.logger=e.create("ExpressionService")},t.prototype.evaluate=function(e,r){if(typeof e=="string")return this.evaluateExpression(e,r);console.error("AG Grid: value should be either a string or a function",e)},t.prototype.evaluateExpression=function(e,r){try{var i=this.createExpressionFunction(e),o=i(r.value,r.context,r.oldValue,r.newValue,r.value,r.node,r.data,r.colDef,r.rowIndex,r.api,r.columnApi,r.getValue,r.column,r.columnGroup);return o}catch(s){return console.log("Processing of the expression failed"),console.log("Expression = "+e),console.log("Params =",r),console.log("Exception = "+s),null}},t.prototype.createExpressionFunction=function(e){if(this.expressionToFunctionCache[e])return this.expressionToFunctionCache[e];var r=this.createFunctionBody(e),i=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, columnApi, getValue, column, columnGroup",r);return this.expressionToFunctionCache[e]=i,i},t.prototype.createFunctionBody=function(e){return e.indexOf("return")>=0?e:"return "+e+";"},Nu([GC(0,Re("loggerFactory"))],t.prototype,"setBeans",null),t=Nu([I("expressionService")],t),t}(D),HC=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),BC=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},kC=function(n){HC(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.templateCache={},e.waitingCallbacks={},e}return t.prototype.getTemplate=function(e,r){var i=this.templateCache[e];if(i)return i;var o=this.waitingCallbacks[e],s=this;if(!o){o=[],this.waitingCallbacks[e]=o;var a=new XMLHttpRequest;a.onload=function(){s.handleHttpResult(this,e)},a.open("GET",e),a.send()}return r&&o.push(r),null},t.prototype.handleHttpResult=function(e,r){if(e.status!==200||e.response===null){console.warn("AG Grid: Unable to get template error ".concat(e.status," - ").concat(r));return}this.templateCache[r]=e.response||e.responseText;for(var i=this.waitingCallbacks[r],o=0;o<i.length;o++){var s=i[o];s()}},t=BC([I("templateService")],t),t}(D),WC=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Gu=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},jC=function(n,t){return function(e,r){t(e,r,n)}},UC=function(n){WC(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.setBeans=function(e){this.logging=e.get("debug")},t.prototype.create=function(e){return new Gs(e,this.isLogging.bind(this))},t.prototype.isLogging=function(){return this.logging},Gu([jC(0,Re("gridOptionsService"))],t.prototype,"setBeans",null),t=Gu([I("loggerFactory")],t),t}(D),Gs=function(){function n(t,e){this.name=t,this.isLoggingFunc=e}return n.prototype.isLogging=function(){return this.isLoggingFunc()},n.prototype.log=function(t){this.isLoggingFunc()&&console.log("AG Grid."+this.name+": "+t)},n}(),zC=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Gr=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},$C=function(n){zC(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.setComp=function(e,r,i){var o=this;this.view=e,this.eGridHostDiv=r,this.eGui=i,this.eGui.setAttribute("grid-id",this.context.getGridId()),this.dragAndDropService.addDropTarget({getContainer:function(){return o.eGui},isInterestedIn:function(a){return a===Pe.HeaderCell||a===Pe.ToolPanel},getIconName:function(){return fe.ICON_NOT_ALLOWED}}),this.mouseEventService.stampTopLevelGridCompWithGridInstance(r),this.createManagedBean(new fs(this.view)),this.addRtlSupport();var s=this.resizeObserverService.observeResize(this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(function(){return s()}),this.ctrlsService.registerGridCtrl(this)},t.prototype.isDetailGrid=function(){var e,r=this.focusService.findTabbableParent(this.getGui());return((e=r==null?void 0:r.getAttribute("row-id"))===null||e===void 0?void 0:e.startsWith("detail"))||!1},t.prototype.showDropZones=function(){return k.__isRegistered(M.RowGroupingModule,this.context.getGridId())},t.prototype.showSideBar=function(){return k.__isRegistered(M.SideBarModule,this.context.getGridId())},t.prototype.showStatusBar=function(){return k.__isRegistered(M.StatusBarModule,this.context.getGridId())},t.prototype.showWatermark=function(){return k.__isRegistered(M.EnterpriseCoreModule,this.context.getGridId())},t.prototype.onGridSizeChanged=function(){var e={type:g.EVENT_GRID_SIZE_CHANGED,clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight};this.eventService.dispatchEvent(e)},t.prototype.addRtlSupport=function(){var e=this.gridOptionsService.get("enableRtl")?"ag-rtl":"ag-ltr";this.view.setRtlClass(e)},t.prototype.destroyGridUi=function(){this.view.destroyGridUi()},t.prototype.getGui=function(){return this.eGui},t.prototype.setResizeCursor=function(e){this.view.setCursor(e?"ew-resize":null)},t.prototype.disableUserSelect=function(e){this.view.setUserSelect(e?"none":null)},t.prototype.focusNextInnerContainer=function(e){var r=this.gridOptionsService.getDocument(),i=this.view.getFocusableContainers(),o=i.findIndex(function(a){return a.contains(r.activeElement)}),s=o+(e?-1:1);return s<=0||s>=i.length?!1:this.focusService.focusInto(i[s])},t.prototype.focusInnerElement=function(e){var r=this.view.getFocusableContainers(),i=this.columnModel.getAllDisplayedColumns();if(e){if(r.length>1)return this.focusService.focusInto(Q(r),!0);var o=Q(i);if(this.focusService.focusGridView(o,!0))return!0}return this.gridOptionsService.get("headerHeight")===0?this.focusService.focusGridView(i[0]):this.focusService.focusFirstHeader()},t.prototype.forceFocusOutOfContainer=function(e){e===void 0&&(e=!1),this.view.forceFocusOutOfContainer(e)},Gr([f("focusService")],t.prototype,"focusService",void 0),Gr([f("resizeObserverService")],t.prototype,"resizeObserverService",void 0),Gr([f("columnModel")],t.prototype,"columnModel",void 0),Gr([f("ctrlsService")],t.prototype,"ctrlsService",void 0),Gr([f("mouseEventService")],t.prototype,"mouseEventService",void 0),Gr([f("dragAndDropService")],t.prototype,"dragAndDropService",void 0),t}(D),KC=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),wi=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},YC=function(n){KC(t,n);function t(e){var r=n.call(this)||this;return r.eGridDiv=e,r}return t.prototype.postConstruct=function(){var e=this;this.logger=this.loggerFactory.create("GridComp");var r={destroyGridUi:function(){return e.destroyBean(e)},setRtlClass:function(o){return e.addCssClass(o)},forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:function(o){e.getGui().style.userSelect=o??"",e.getGui().style.webkitUserSelect=o??""},setCursor:function(o){e.getGui().style.cursor=o??""}};this.ctrl=this.createManagedBean(new $C);var i=this.createTemplate();this.setTemplate(i),this.ctrl.setComp(r,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:function(){},focusInnerElement:function(o){return e.ctrl.focusInnerElement(o)}})},t.prototype.insertGridIntoDom=function(){var e=this,r=this.getGui();this.eGridDiv.appendChild(r),this.addDestroyFunc(function(){e.eGridDiv.removeChild(r),e.logger.log("Grid removed from DOM")})},t.prototype.updateLayoutClasses=function(e,r){var i=this.eRootWrapperBody.classList;i.toggle(ue.AUTO_HEIGHT,r.autoHeight),i.toggle(ue.NORMAL,r.normal),i.toggle(ue.PRINT,r.print),this.addOrRemoveCssClass(ue.AUTO_HEIGHT,r.autoHeight),this.addOrRemoveCssClass(ue.NORMAL,r.normal),this.addOrRemoveCssClass(ue.PRINT,r.print)},t.prototype.createTemplate=function(){var e=this.ctrl.showDropZones()?"<ag-grid-header-drop-zones></ag-grid-header-drop-zones>":"",r=this.ctrl.showSideBar()?'<ag-side-bar ref="sideBar"></ag-side-bar>':"",i=this.ctrl.showStatusBar()?'<ag-status-bar ref="statusBar"></ag-status-bar>':"",o=this.ctrl.showWatermark()?"<ag-watermark></ag-watermark>":"",s=`<div class="ag-root-wrapper" role="presentation">
|
||
`.concat(e,`
|
||
<div class="ag-root-wrapper-body" ref="rootWrapperBody" role="presentation">
|
||
<ag-grid-body ref="gridBody"></ag-grid-body>
|
||
`).concat(r,`
|
||
</div>
|
||
`).concat(i,`
|
||
<ag-pagination></ag-pagination>
|
||
`).concat(o,`
|
||
</div>`);return s},t.prototype.getFocusableElement=function(){return this.eRootWrapperBody},t.prototype.getFocusableContainers=function(){var e=[this.gridBodyComp.getGui()];return this.sideBarComp&&e.push(this.sideBarComp.getGui()),e.filter(function(r){return Te(r)})},wi([f("loggerFactory")],t.prototype,"loggerFactory",void 0),wi([L("gridBody")],t.prototype,"gridBodyComp",void 0),wi([L("sideBar")],t.prototype,"sideBarComp",void 0),wi([L("rootWrapperBody")],t.prototype,"eRootWrapperBody",void 0),wi([b],t.prototype,"postConstruct",null),t}(Do),qC=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Vu=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},$t=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},Vr=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},QC=function(n){qC(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}e=t,t.prototype.progressSort=function(r,i,o){var s=this.getNextSortDirection(r);this.setSortForColumn(r,s,i,o)},t.prototype.setSortForColumn=function(r,i,o,s){i!=="asc"&&i!=="desc"&&(i=null);var a=this.gridOptionsService.isColumnsSortingCoupledToGroup(),l=[r];if(a&&r.getColDef().showRowGroup){var u=this.columnModel.getSourceColumnsForGroupColumn(r),c=u==null?void 0:u.filter(function(d){return d.isSortable()});c&&(l=Vr([r],$t(c),!1))}l.forEach(function(d){return d.setSort(i,s)});var p=(o||this.gridOptionsService.get("alwaysMultiSort"))&&!this.gridOptionsService.get("suppressMultiSort");p||this.clearSortBarTheseColumns(l,s),this.updateSortIndex(r),this.dispatchSortChangedEvents(s)},t.prototype.updateSortIndex=function(r){var i=this.gridOptionsService.isColumnsSortingCoupledToGroup(),o=this.columnModel.getGroupDisplayColumnForGroup(r.getId()),s=i&&o||r,a=this.getColumnsWithSortingOrdered();this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach(function(c){return c.setSortIndex(null)});var l=a.filter(function(c){return c!==s}),u=s.getSort()?Vr(Vr([],$t(l),!1),[s],!1):l;u.forEach(function(c,p){return c.setSortIndex(p)})},t.prototype.onSortChanged=function(r){this.dispatchSortChangedEvents(r)},t.prototype.isSortActive=function(){var r=this.columnModel.getPrimaryAndSecondaryAndAutoColumns(),i=r.filter(function(o){return!!o.getSort()});return i&&i.length>0},t.prototype.dispatchSortChangedEvents=function(r){var i={type:g.EVENT_SORT_CHANGED,source:r};this.eventService.dispatchEvent(i)},t.prototype.clearSortBarTheseColumns=function(r,i){this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach(function(o){r.includes(o)||o.setSort(void 0,i)})},t.prototype.getNextSortDirection=function(r){var i;if(r.getColDef().sortingOrder?i=r.getColDef().sortingOrder:this.gridOptionsService.get("sortingOrder")?i=this.gridOptionsService.get("sortingOrder"):i=e.DEFAULT_SORTING_ORDER,!Array.isArray(i)||i.length<=0)return console.warn("AG Grid: sortingOrder must be an array with at least one element, currently it's ".concat(i)),null;var o=i.indexOf(r.getSort()),s=o<0,a=o==i.length-1,l;return s||a?l=i[0]:l=i[o+1],e.DEFAULT_SORTING_ORDER.indexOf(l)<0?(console.warn("AG Grid: invalid sort type "+l),null):l},t.prototype.getIndexedSortMap=function(){var r=this,i=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter(function(c){return!!c.getSort()});if(this.columnModel.isPivotMode()){var o=this.gridOptionsService.isColumnsSortingCoupledToGroup();i=i.filter(function(c){var p=!!c.getAggFunc(),d=!c.isPrimary(),h=o?r.columnModel.getGroupDisplayColumnForGroup(c.getId()):c.getColDef().showRowGroup;return p||d||h})}var s=this.columnModel.getRowGroupColumns().filter(function(c){return!!c.getSort()}),a=this.gridOptionsService.isColumnsSortingCoupledToGroup()&&!!s.length;a&&(i=Vr([],$t(new Set(i.map(function(c){var p;return(p=r.columnModel.getGroupDisplayColumnForGroup(c.getId()))!==null&&p!==void 0?p:c}))),!1));var l={};i.forEach(function(c,p){return l[c.getId()]=p}),i.sort(function(c,p){var d=c.getSortIndex(),h=p.getSortIndex();if(d!=null&&h!=null)return d-h;if(d==null&&h==null){var v=l[c.getId()],y=l[p.getId()];return v>y?1:-1}else return h==null?-1:1});var u=new Map;return i.forEach(function(c,p){return u.set(c,p)}),a&&s.forEach(function(c){var p=r.columnModel.getGroupDisplayColumnForGroup(c.getId());u.set(c,u.get(p))}),u},t.prototype.getColumnsWithSortingOrdered=function(){return Vr([],$t(this.getIndexedSortMap().entries()),!1).sort(function(r,i){var o=$t(r,2);o[0];var s=o[1],a=$t(i,2);a[0];var l=a[1];return s-l}).map(function(r){var i=$t(r,1),o=i[0];return o})},t.prototype.getSortModel=function(){return this.getColumnsWithSortingOrdered().filter(function(r){return r.getSort()}).map(function(r){return{sort:r.getSort(),colId:r.getId()}})},t.prototype.getSortOptions=function(){return this.getColumnsWithSortingOrdered().filter(function(r){return r.getSort()}).map(function(r){return{sort:r.getSort(),column:r}})},t.prototype.canColumnDisplayMixedSort=function(r){var i=this.gridOptionsService.isColumnsSortingCoupledToGroup(),o=!!r.getColDef().showRowGroup;return i&&o},t.prototype.getDisplaySortForColumn=function(r){var i=this.columnModel.getSourceColumnsForGroupColumn(r);if(!this.canColumnDisplayMixedSort(r)||!(i!=null&&i.length))return r.getSort();var o=r.getColDef().field!=null||!!r.getColDef().valueGetter,s=o?Vr([r],$t(i),!1):i,a=s[0].getSort(),l=s.every(function(u){return u.getSort()==a});return l?a:"mixed"},t.prototype.getDisplaySortIndexForColumn=function(r){return this.getIndexedSortMap().get(r)};var e;return t.DEFAULT_SORTING_ORDER=["asc","desc",null],Vu([f("columnModel")],t.prototype,"columnModel",void 0),t=e=Vu([I("sortController")],t),t}(D),XC=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Ei=function(){return Ei=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Ei.apply(this,arguments)},je=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Vs=function(n){XC(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}e=t,t.addKeyboardModeEvents=function(r){this.instanceCount>0||(r.addEventListener("keydown",e.toggleKeyboardMode),r.addEventListener("mousedown",e.toggleKeyboardMode))},t.removeKeyboardModeEvents=function(r){this.instanceCount>0||(r.addEventListener("keydown",e.toggleKeyboardMode),r.addEventListener("mousedown",e.toggleKeyboardMode))},t.toggleKeyboardMode=function(r){var i=e.keyboardModeActive,o=r.type==="keydown";o&&(r.ctrlKey||r.metaKey||r.altKey)||i!==o&&(e.keyboardModeActive=o)},t.unregisterGridCompController=function(r){e.removeKeyboardModeEvents(r)},t.prototype.init=function(){var r=this,i=this.clearFocusedCell.bind(this);this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,i),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverythingChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_GROUP_OPENED,i),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,i),this.registerKeyboardFocusEvents(),this.ctrlsService.whenReady(function(o){r.gridCtrl=o.gridCtrl})},t.prototype.registerKeyboardFocusEvents=function(){var r=this.gridOptionsService.getDocument();e.addKeyboardModeEvents(r),e.instanceCount++,this.addDestroyFunc(function(){e.instanceCount--,e.unregisterGridCompController(r)})},t.prototype.onColumnEverythingChanged=function(){if(this.focusedCellPosition){var r=this.focusedCellPosition.column,i=this.columnModel.getGridColumn(r.getId());r!==i&&this.clearFocusedCell()}},t.prototype.isKeyboardMode=function(){return e.keyboardModeActive},t.prototype.getFocusCellToUseAfterRefresh=function(){var r=this.gridOptionsService.getDocument();return this.gridOptionsService.get("suppressFocusAfterRefresh")||!this.focusedCellPosition||this.isDomDataMissingInHierarchy(r.activeElement,hr.DOM_DATA_KEY_ROW_CTRL)?null:this.focusedCellPosition},t.prototype.getFocusHeaderToUseAfterRefresh=function(){var r=this.gridOptionsService.getDocument();return this.gridOptionsService.get("suppressFocusAfterRefresh")||!this.focusedHeaderPosition||this.isDomDataMissingInHierarchy(r.activeElement,mo.DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeaderPosition},t.prototype.isDomDataMissingInHierarchy=function(r,i){for(var o=r;o;){var s=this.gridOptionsService.getDomData(o,i);if(s)return!1;o=o.parentNode}return!0},t.prototype.getFocusedCell=function(){return this.focusedCellPosition},t.prototype.shouldRestoreFocus=function(r){var i=this;return this.isCellRestoreFocused(r)?(setTimeout(function(){i.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,i=r.rowIndex,o=r.rowPinned,s=r.column,a={rowIndex:i,rowPinned:o,column:s,isFullWidthCell:!1},l=this.rowRenderer.getRowByPosition({rowIndex:i,rowPinned:o});return l&&(a.isFullWidthCell=l.isFullWidth()),a},t.prototype.clearFocusedCell=function(){if(this.restoredFocusedCellPosition=null,this.focusedCellPosition!=null){var r=Ei({type:g.EVENT_CELL_FOCUS_CLEARED},this.getFocusEventParams());this.focusedCellPosition=null,this.eventService.dispatchEvent(r)}},t.prototype.setFocusedCell=function(r){var i=r.column,o=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(i);if(!p){this.focusedCellPosition=null;return}this.focusedCellPosition=p?{rowIndex:o,rowPinned:ct(s),column:p}:null;var d=Ei(Ei({type:g.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 i=r.getColumnGroupChild(),o=r.getRowIndex(),s=r.getPinned(),a=this.focusedHeaderPosition,l=a.column,u=a.headerRowIndex;return i===l&&o===u&&s==l.getPinned()},t.prototype.clearFocusedHeader=function(){this.focusedHeaderPosition=null},t.prototype.getFocusedHeader=function(){return this.focusedHeaderPosition},t.prototype.setFocusedHeader=function(r,i){this.focusedHeaderPosition={headerRowIndex:r,column:i}},t.prototype.focusHeaderPosition=function(r){var i=r.direction,o=r.fromTab,s=r.allowUserOverride,a=r.event,l=r.fromCell,u=r.headerPosition;if(l&&this.filterManager.isAdvancedFilterHeaderActive())return this.focusAdvancedFilter(u);if(s){var c=this.getFocusedHeader(),p=this.headerNavigationService.getHeaderRowCount();if(o){var d=this.gridOptionsService.getCallback("tabToNextHeader");if(d){var h={backwards:i==="Before",previousHeaderPosition:c,nextHeaderPosition:u,headerRowCount:p};u=d(h)}}else{var d=this.gridOptionsService.getCallback("navigateToNextHeader");if(d&&a){var v={key:a.key,previousHeaderPosition:c,nextHeaderPosition:u,headerRowCount:p,event:a};u=d(v)}}}if(!u)return!1;if(u.headerRowIndex===-1)return this.filterManager.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(u):this.focusGridView(u.column);this.headerNavigationService.scrollToColumn(u.column,i);var y=this.ctrlsService.getHeaderRowContainerCtrl(u.column.getPinned()),C=y.focusHeader(u.headerRowIndex,u.column,a);return C},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 i=this.headerNavigationService.getHeaderRowCount()-1,o=Q(this.columnModel.getAllDisplayedColumns());return this.focusHeaderPosition({headerPosition:{headerRowIndex:i,column:o},event:r})},t.prototype.focusPreviousFromFirstCell=function(r){return this.filterManager.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(r)},t.prototype.isAnyCellFocused=function(){return!!this.focusedCellPosition},t.prototype.isRowFocused=function(r,i){return this.focusedCellPosition==null?!1:this.focusedCellPosition.rowIndex===r&&this.focusedCellPosition.rowPinned===ct(i)},t.prototype.findFocusableElements=function(r,i,o){o===void 0&&(o=!1);var s=ol,a=In;i&&(a+=", "+i),o&&(a+=', [tabindex="-1"]');var l=Array.prototype.slice.apply(r.querySelectorAll(s)).filter(function(p){return Te(p)}),u=Array.prototype.slice.apply(r.querySelectorAll(a));if(!u.length)return l;var c=function(p,d){return p.filter(function(h){return d.indexOf(h)===-1})};return c(l,u)},t.prototype.focusInto=function(r,i,o){i===void 0&&(i=!1),o===void 0&&(o=!1);var s=this.findFocusableElements(r,null,o),a=i?Q(s):s[0];return a?(a.focus({preventScroll:!0}),!0):!1},t.prototype.findFocusableElementBeforeTabGuard=function(r,i){if(!i)return null;var o=this.findFocusableElements(r),s=o.indexOf(i);if(s===-1)return null;for(var a=-1,l=s-1;l>=0;l--)if(o[l].classList.contains(xr.TAB_GUARD_TOP)){a=l;break}return a<=0?null:o[a-1]},t.prototype.findNextFocusableElement=function(r,i,o){r===void 0&&(r=this.eGridDiv);var s=this.findFocusableElements(r,i?':not([tabindex="-1"])':null),a=this.gridOptionsService.getDocument(),l=a.activeElement,u;i?u=s.findIndex(function(p){return p.contains(l)}):u=s.indexOf(l);var c=u+(o?-1:1);return c<0||c>=s.length?null:s[c]},t.prototype.isTargetUnderManagedComponent=function(r,i){if(!i)return!1;var o=r.querySelectorAll(".".concat(Vt.FOCUS_MANAGED_CLASS));if(!o.length)return!1;for(var s=0;s<o.length;s++)if(o[s].contains(i))return!0;return!1},t.prototype.findTabbableParent=function(r,i){i===void 0&&(i=5);for(var o=0;r&&Yi(r)===null&&++o<=i;)r=r.parentElement;return Yi(r)===null?null:r},t.prototype.focusGridView=function(r,i){if(this.gridOptionsService.get("suppressCellFocus"))return i?this.focusLastHeader():this.focusNextGridCoreContainer(!1);var o=i?this.rowPositionUtils.getLastRow():this.rowPositionUtils.getFirstRow();if(!o)return!1;var s=o.rowIndex,a=o.rowPinned,l=this.getFocusedHeader();if(!r&&l&&(r=l.column),s==null||!r)return!1;if(this.navigationService.ensureCellVisible({rowIndex:s,column:r,rowPinned:a}),this.setFocusedCell({rowIndex:s,column:r,rowPinned:ct(a),forceBrowserFocus:!0}),this.rangeService){var u={rowIndex:s,rowPinned:a,column:r};this.rangeService.setRangeToCell(u)}return!0},t.prototype.focusNextGridCoreContainer=function(r,i){return i===void 0&&(i=!1),!i&&this.gridCtrl.focusNextInnerContainer(r)?!0:((i||!r&&!this.gridCtrl.isDetailGrid())&&this.gridCtrl.forceFocusOutOfContainer(r),!1)},t.prototype.focusAdvancedFilter=function(r){return this.advancedFilterFocusColumn=r==null?void 0:r.column,this.advancedFilterService.getCtrl().focusHeaderComp()},t.prototype.focusNextFromAdvancedFilter=function(r,i){var o,s,a=(o=i?void 0:this.advancedFilterFocusColumn)!==null&&o!==void 0?o:(s=this.columnModel.getAllDisplayedColumns())===null||s===void 0?void 0:s[0];return r?this.focusHeaderPosition({headerPosition:{column:a,headerRowIndex:this.headerNavigationService.getHeaderRowCount()-1}}):this.focusGridView(a)},t.prototype.clearAdvancedFilterColumn=function(){this.advancedFilterFocusColumn=void 0};var e;return t.keyboardModeActive=!1,t.instanceCount=0,je([f("eGridDiv")],t.prototype,"eGridDiv",void 0),je([f("columnModel")],t.prototype,"columnModel",void 0),je([f("headerNavigationService")],t.prototype,"headerNavigationService",void 0),je([f("rowRenderer")],t.prototype,"rowRenderer",void 0),je([f("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),je([f("cellPositionUtils")],t.prototype,"cellPositionUtils",void 0),je([Y("rangeService")],t.prototype,"rangeService",void 0),je([f("navigationService")],t.prototype,"navigationService",void 0),je([f("ctrlsService")],t.prototype,"ctrlsService",void 0),je([f("filterManager")],t.prototype,"filterManager",void 0),je([Y("advancedFilterService")],t.prototype,"advancedFilterService",void 0),je([b],t.prototype,"init",null),t=e=je([I("focusService")],t),t}(D),JC=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),ZC=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},em=function(n){JC(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.setMouseOver=function(e){this.selectedColumns=e;var r={type:g.EVENT_COLUMN_HOVER_CHANGED};this.eventService.dispatchEvent(r)},t.prototype.clearMouseOver=function(){this.selectedColumns=null;var e={type:g.EVENT_COLUMN_HOVER_CHANGED};this.eventService.dispatchEvent(e)},t.prototype.isHovered=function(e){return!!this.selectedColumns&&this.selectedColumns.indexOf(e)>=0},t=ZC([I("columnHoverService")],t),t}(D),tm=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Hs=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},rm=function(n){tm(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.executeNextFuncs=[],e.executeLaterFuncs=[],e.active=!1,e.animationThreadCount=0,e}return t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady(function(r){return e.gridBodyCtrl=r.gridBodyCtrl})},t.prototype.isActive=function(){return this.active},t.prototype.start=function(){this.active||this.gridOptionsService.get("suppressColumnMoveAnimation")||this.gridOptionsService.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0)},t.prototype.finish=function(){this.active&&(this.flush(),this.active=!1)},t.prototype.executeNextVMTurn=function(e){this.active?this.executeNextFuncs.push(e):e()},t.prototype.executeLaterVMTurn=function(e){this.active?this.executeLaterFuncs.push(e):e()},t.prototype.ensureAnimationCssClassPresent=function(){var e=this;this.animationThreadCount++;var r=this.animationThreadCount;this.gridBodyCtrl.setColumnMovingCss(!0),this.executeLaterFuncs.push(function(){e.animationThreadCount===r&&e.gridBodyCtrl.setColumnMovingCss(!1)})},t.prototype.flush=function(){var e=this.executeNextFuncs;this.executeNextFuncs=[];var r=this.executeLaterFuncs;this.executeLaterFuncs=[],!(e.length===0&&r.length===0)&&(window.setTimeout(function(){return e.forEach(function(i){return i()})},0),window.setTimeout(function(){return r.forEach(function(i){return i()})},300))},Hs([f("ctrlsService")],t.prototype,"ctrlsService",void 0),Hs([b],t.prototype,"postConstruct",null),t=Hs([I("columnAnimationService")],t),t}(D),im=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Mo=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},om=function(n){im(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.centerRowContainerCon=r.centerRowContainerCtrl,e.addManagedListener(e.eventService,g.EVENT_BODY_HEIGHT_CHANGED,e.checkPageSize.bind(e)),e.addManagedListener(e.eventService,g.EVENT_SCROLL_VISIBILITY_CHANGED,e.checkPageSize.bind(e)),e.addManagedPropertyListener("paginationAutoPageSize",e.onPaginationAutoSizeChanged.bind(e)),e.checkPageSize()})},t.prototype.notActive=function(){return!this.gridOptionsService.get("paginationAutoPageSize")||this.centerRowContainerCon==null},t.prototype.onPaginationAutoSizeChanged=function(){this.notActive()?this.paginationProxy.unsetAutoCalculatedPageSize():this.checkPageSize()},t.prototype.checkPageSize=function(){var e=this;if(!this.notActive()){var r=this.centerRowContainerCon.getViewportSizeFeature().getBodyHeight();if(r>0){var i=function(){var o=e.gridOptionsService.getRowHeightAsNumber(),s=Math.floor(r/o);e.paginationProxy.setPageSize(s,"autoCalculated")};this.isBodyRendered?ze(function(){return i()},50)():(i(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},Mo([f("ctrlsService")],t.prototype,"ctrlsService",void 0),Mo([f("paginationProxy")],t.prototype,"paginationProxy",void 0),Mo([b],t.prototype,"postConstruct",null),t=Mo([I("paginationAutoPageSizeService")],t),t}(D),nm=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Hu=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},sm=function(n){nm(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.cacheVersion=0,e}return t.prototype.init=function(){this.active=this.gridOptionsService.get("valueCache"),this.neverExpires=this.gridOptionsService.get("valueCacheNeverExpires")},t.prototype.onDataChanged=function(){this.neverExpires||this.expire()},t.prototype.expire=function(){this.cacheVersion++},t.prototype.setValue=function(e,r,i){this.active&&(e.__cacheVersion!==this.cacheVersion&&(e.__cacheVersion=this.cacheVersion,e.__cacheData={}),e.__cacheData[r]=i)},t.prototype.getValue=function(e,r){if(!(!this.active||e.__cacheVersion!==this.cacheVersion))return e.__cacheData[r]},Hu([b],t.prototype,"init",null),t=Hu([I("valueCache")],t),t}(D),am=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),No=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},lm="paste",um=function(n){am(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.init=function(){this.rowModel.getType()==="clientSide"&&(this.clientSideRowModel=this.rowModel),this.addManagedListener(this.eventService,g.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged.bind(this))},t.prototype.onCellValueChanged=function(e){e.source!==lm&&this.doChangeDetection(e.node,e.column)},t.prototype.doChangeDetection=function(e,r){if(!this.gridOptionsService.get("suppressChangeDetection")){var i=[e];if(this.clientSideRowModel&&!e.isRowPinned()){var o=this.gridOptionsService.get("aggregateOnlyChangedColumns"),s=new To(o,this.clientSideRowModel.getRootNode());s.addParentNode(e.parent,[r]),this.clientSideRowModel.doAggregate(s),s.forEachChangedNodeDepthFirst(function(a){i.push(a)})}this.rowRenderer.refreshCells({rowNodes:i})}},No([f("rowModel")],t.prototype,"rowModel",void 0),No([f("rowRenderer")],t.prototype,"rowRenderer",void 0),No([b],t.prototype,"init",null),t=No([I("changeDetectionService")],t),t}(D),cm=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Bu=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},pm=function(n){cm(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.adaptFunction=function(e,r){var i=this.componentMetadataProvider.retrieve(e);return i&&i.functionAdapter?i.functionAdapter(r):null},t.prototype.adaptCellRendererFunction=function(e){var r=function(){function i(){}return i.prototype.refresh=function(o){return!1},i.prototype.getGui=function(){return this.eGui},i.prototype.init=function(o){var s=e(o),a=typeof s;if(a==="string"||a==="number"||a==="boolean"){this.eGui=ge("<span>"+s+"</span>");return}if(s==null){this.eGui=ge("<span></span>");return}this.eGui=s},i}();return r},t.prototype.doesImplementIComponent=function(e){return e?e.prototype&&"getGui"in e.prototype:!1},Bu([f("componentMetadataProvider")],t.prototype,"componentMetadataProvider",void 0),t=Bu([I("agComponentUtils")],t),t}(D),dm=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Bs=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},hm=function(n){dm(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.postConstruct=function(){this.componentMetaData={dateComponent:{mandatoryMethodList:["getDate","setDate"],optionalMethodList:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel"]},detailCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},headerComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},headerGroupComponent:{mandatoryMethodList:[],optionalMethodList:[]},loadingCellRenderer:{mandatoryMethodList:[],optionalMethodList:[]},loadingOverlayComponent:{mandatoryMethodList:[],optionalMethodList:[]},noRowsOverlayComponent:{mandatoryMethodList:[],optionalMethodList:[]},floatingFilterComponent:{mandatoryMethodList:["onParentModelChanged"],optionalMethodList:["afterGuiAttached"]},floatingFilterWrapperComponent:{mandatoryMethodList:[],optionalMethodList:[]},cellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},cellEditor:{mandatoryMethodList:["getValue"],optionalMethodList:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached"]},innerRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},fullWidthCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},groupRowRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},filter:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged"]},filterComponent:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged"]},statusPanel:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"]},toolPanel:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"]},tooltipComponent:{mandatoryMethodList:[],optionalMethodList:[]}}},t.prototype.retrieve=function(e){return this.componentMetaData[e]},Bs([f("agComponentUtils")],t.prototype,"agComponentUtils",void 0),Bs([b],t.prototype,"postConstruct",null),t=Bs([I("componentMetadataProvider")],t),t}(D),fm=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),ks=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},vm=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},gm=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},ym=25,ku=10,Ws=8,Cm=4,js=4,Us=6,mm=16,Wu=14,zs=8,Sm={"ag-theme-custom":{headerHeight:25,headerCellMinWidth:24,listItemHeight:Cm*5,rowHeight:25,chartMenuPanelWidth:220},"ag-theme-material":{headerHeight:Ws*7,headerCellMinWidth:48,listItemHeight:Ws*4,rowHeight:Ws*6,chartMenuPanelWidth:240},"ag-theme-balham":{headerHeight:js*8,headerCellMinWidth:24,listItemHeight:js*6,rowHeight:js*7,chartMenuPanelWidth:220},"ag-theme-alpine":{headerHeight:Us*8,headerCellMinWidth:36,listItemHeight:Us*4,rowHeight:Us*7,chartMenuPanelWidth:240},"ag-theme-quartz":{headerHeight:Wu+zs*4.25,headerCellMinWidth:36,listItemHeight:mm+zs,rowHeight:Wu+zs*3.5,chartMenuPanelWidth:260}},ju={headerHeight:["ag-header-row"],headerCellMinWidth:["ag-header-cell"],listItemHeight:["ag-virtual-list-item"],rowHeight:["ag-row"],chartMenuPanelWidth:["ag-chart-docked-container"]},wm=function(n){fm(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.calculatedSizes={},e}return t.prototype.postConstruct=function(){var e=this,r,i=(r=this.getTheme().el)!==null&&r!==void 0?r:this.eGridDiv;this.addManagedPropertyListener("rowHeight",function(){return e.refreshRowHeightVariable()}),this.mutationObserver=new MutationObserver(function(){e.calculatedSizes={},e.fireGridStylesChangedEvent()}),this.mutationObserver.observe(i||this.eGridDiv,{attributes:!0,attributeFilter:["class"]})},t.prototype.fireGridStylesChangedEvent=function(){var e={type:g.EVENT_GRID_STYLES_CHANGED};this.eventService.dispatchEvent(e)},t.prototype.getSassVariable=function(e){var r=this.getTheme(),i=r.themeFamily,o=r.el;if(!(!i||i.indexOf("ag-theme")!==0)){this.calculatedSizes||(this.calculatedSizes={}),this.calculatedSizes[i]||(this.calculatedSizes[i]={});var s=this.calculatedSizes[i][e];return s??(this.calculatedSizes[i][e]=this.calculateValueForSassProperty(e,i,o),this.calculatedSizes[i][e])}},t.prototype.calculateValueForSassProperty=function(e,r,i){var o,s="ag-theme-"+(r.match("material")?"material":r.match("balham")?"balham":r.match("alpine")?"alpine":"custom"),a=Sm[s][e],l=this.gridOptionsService.getDocument();if(i||(i=this.eGridDiv),!ju[e])return a;var u=ju[e],c=l.createElement("div"),p=Array.from(i.classList);(o=c.classList).add.apply(o,gm([r],vm(p),!1)),c.style.position="absolute";var d=u.reduce(function(y,C){var m=l.createElement("div");return m.style.position="static",m.classList.add(C),y.appendChild(m),m},c),h=0;if(l.body){l.body.appendChild(c);var v=e.toLowerCase().indexOf("height")!==-1?"height":"width";h=parseInt(window.getComputedStyle(d)[v],10),l.body.removeChild(c)}return h||a},t.prototype.isThemeDark=function(){var e=this.getTheme().theme;return!!e&&e.indexOf("dark")>=0},t.prototype.chartMenuPanelWidth=function(){return this.getSassVariable("chartMenuPanelWidth")},t.prototype.getTheme=function(){for(var e=/\bag-(material|(?:theme-([\w\-]*)))\b/g,r=this.eGridDiv,i=null,o=[];r;)if(i=e.exec(r.className),!i)r=r.parentElement||void 0;else{var s=r.className.match(e);s&&(o=s);break}if(!i)return{allThemes:o};var a=i[0];return{theme:a,el:r,themeFamily:a.replace(/-dark$/,""),allThemes:o}},t.prototype.getFromTheme=function(e,r){var i;return(i=this.getSassVariable(r))!==null&&i!==void 0?i:e},t.prototype.getDefaultRowHeight=function(){return this.getFromTheme(ym,"rowHeight")},t.prototype.getListItemHeight=function(){return this.getFromTheme(20,"listItemHeight")},t.prototype.refreshRowHeightVariable=function(){var e=this.eGridDiv.style.getPropertyValue("--ag-line-height").trim(),r=this.gridOptionsService.get("rowHeight");if(r==null||isNaN(r)||!isFinite(r))return e!==null&&this.eGridDiv.style.setProperty("--ag-line-height",null),-1;var i="".concat(r,"px");return e!=i?(this.eGridDiv.style.setProperty("--ag-line-height",i),r):e!=""?parseFloat(e):-1},t.prototype.getMinColWidth=function(){var e=this.getFromTheme(null,"headerCellMinWidth");return P(e)?Math.max(e,ku):ku},t.prototype.destroy=function(){this.calculatedSizes=null,this.mutationObserver&&this.mutationObserver.disconnect(),n.prototype.destroy.call(this)},ks([f("eGridDiv")],t.prototype,"eGridDiv",void 0),ks([b],t.prototype,"postConstruct",null),t=ks([I("environment")],t),t}(D),Em=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Go=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},_m=function(n,t){return function(e,r){t(e,r,n)}},Rm=function(n){Em(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.scrollY=0,e.uiBodyHeight=0,e}return t.prototype.agWire=function(e){this.logger=e.create("RowContainerHeightService")},t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,g.EVENT_BODY_HEIGHT_CHANGED,this.updateOffset.bind(this)),this.maxDivHeight=Ja(),this.logger.log("maxDivHeight = "+this.maxDivHeight)},t.prototype.isStretching=function(){return this.stretching},t.prototype.getDivStretchOffset=function(){return this.divStretchOffset},t.prototype.updateOffset=function(){if(this.stretching){var e=this.ctrlsService.getGridBodyCtrl(),r=e.getScrollFeature().getVScrollPosition().top,i=this.getUiBodyHeight(),o=r!==this.scrollY||i!==this.uiBodyHeight;o&&(this.scrollY=r,this.uiBodyHeight=i,this.calculateOffset())}},t.prototype.calculateOffset=function(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;var e=this.scrollY/this.maxScrollY,r=e*this.pixelsToShave;this.logger.log("Div Stretch Offset = ".concat(r," (").concat(this.pixelsToShave," * ").concat(e,")")),this.setDivStretchOffset(r)},t.prototype.setUiContainerHeight=function(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventService.dispatchEvent({type:g.EVENT_ROW_CONTAINER_HEIGHT_CHANGED}))},t.prototype.clearOffset=function(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)},t.prototype.setDivStretchOffset=function(e){var r=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==r&&(this.divStretchOffset=r,this.eventService.dispatchEvent({type:g.EVENT_HEIGHT_SCALE_CHANGED}))},t.prototype.setModelHeight=function(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()},t.prototype.getUiContainerHeight=function(){return this.uiContainerHeight},t.prototype.getRealPixelPosition=function(e){return e-this.divStretchOffset},t.prototype.getUiBodyHeight=function(){var e=this.ctrlsService.getGridBodyCtrl(),r=e.getScrollFeature().getVScrollPosition();return r.bottom-r.top},t.prototype.getScrollPositionForPixel=function(e){if(this.pixelsToShave<=0)return e;var r=this.modelHeight-this.getUiBodyHeight(),i=e/r,o=this.maxScrollY*i;return o},Go([f("ctrlsService")],t.prototype,"ctrlsService",void 0),Go([_m(0,Re("loggerFactory"))],t.prototype,"agWire",null),Go([b],t.prototype,"postConstruct",null),t=Go([I("rowContainerHeightService")],t),t}(D),Om=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Vo=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Tm=function(n){Om(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.init=function(){var e=this;this.addManagedPropertyListener("isRowSelectable",function(){return e.updateSelectable()})},t.prototype.updateSelectableAfterGrouping=function(){this.updateSelectable(!0)},t.prototype.updateSelectable=function(e){e===void 0&&(e=!1);var r=!!this.gridOptionsService.get("rowSelection"),i=this.gridOptionsService.get("isRowSelectable");if(!(!r||!i)){var o=this.gridOptionsService.get("groupSelectsChildren"),s=this.rowModel.getType()==="clientSide"&&o,a=[],l=function(p){if(!(e&&!p.group)){if(s&&p.group){var d=p.childrenAfterGroup.some(function(v){return v.selectable===!0});p.setRowSelectable(d,!0);return}var h=i?i(p):!0;p.setRowSelectable(h,!0),!h&&p.isSelected()&&a.push(p)}};if(s){var u=this.rowModel,c=new To(!1,u.getRootNode());c.forEachChangedNodeDepthFirst(l,!0,!0)}else this.rowModel.forEachNode(l);a.length&&this.selectionService.setNodesSelected({nodes:a,newValue:!1,source:"selectableChanged"}),s&&this.selectionService instanceof Iu&&this.selectionService.updateGroupsFromChildrenSelections("selectableChanged")}},Vo([f("rowModel")],t.prototype,"rowModel",void 0),Vo([f("selectionService")],t.prototype,"selectionService",void 0),Vo([b],t.prototype,"init",null),t=Vo([I("selectableService")],t),t}(D),Pm=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Dm=function(n){Pm(t,n);function t(){var e=n.call(this)||this;return e.previousAndFirstButtonsDisabled=!1,e.nextButtonDisabled=!1,e.lastButtonDisabled=!1,e.areListenersSetup=!1,e}return t.prototype.postConstruct=function(){var e=this,r=this.gridOptionsService.get("enableRtl");this.setTemplate(this.getTemplate());var i=this,o=i.btFirst,s=i.btPrevious,a=i.btNext,l=i.btLast;i.pageSizeComp,this.activateTabIndex([o,s,a,l]),o.insertAdjacentElement("afterbegin",ne(r?"last":"first",this.gridOptionsService)),s.insertAdjacentElement("afterbegin",ne(r?"next":"previous",this.gridOptionsService)),a.insertAdjacentElement("afterbegin",ne(r?"previous":"next",this.gridOptionsService)),l.insertAdjacentElement("afterbegin",ne(r?"first":"last",this.gridOptionsService)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],function(){return e.onPageSizeRelatedOptionsChange()}),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.onPaginationChanged()},t.prototype.onPaginationChanged=function(){var e=this.gridOptionsService.get("pagination"),r=e&&!this.gridOptionsService.get("suppressPaginationPanel");this.setDisplayed(r),r&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateRowLabels(),this.setCurrentPageLabel(),this.setTotalLabels(),this.onPageSizeRelatedOptionsChange())},t.prototype.onPageSizeRelatedOptionsChange=function(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())},t.prototype.setupListeners=function(){var e=this;this.areListenersSetup||(this.addManagedListener(this.eventService,g.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}].forEach(function(r){var i=r.el,o=r.fn;e.addManagedListener(i,"click",o),e.addManagedListener(i,"keydown",function(s){(s.key===_.ENTER||s.key===_.SPACE)&&(s.preventDefault(),o())})}),this.areListenersSetup=!0)},t.prototype.onBtFirst=function(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToFirstPage()},t.prototype.setCurrentPageLabel=function(){var e=this.paginationProxy.getTotalPages()>0,r=this.paginationProxy.getCurrentPage(),i=e?r+1:0;this.lbCurrent.innerHTML=this.formatNumber(i)},t.prototype.formatNumber=function(e){var r=this.gridOptionsService.getCallback("paginationNumberFormatter");if(r){var i={value:e};return r(i)}var o=this.localeService.getLocaleTextFunc(),s=o("thousandSeparator",","),a=o("decimalSeparator",".");return An(e,s,a)},t.prototype.getTemplate=function(){var e=this.localeService.getLocaleTextFunc(),r=e("page","Page"),i=e("to","to"),o=e("of","of"),s=e("firstPage","First Page"),a=e("previousPage","Previous Page"),l=e("nextPage","Next Page"),u=e("lastPage","Last Page"),c=this.getCompId();return'<div class="ag-paging-panel ag-unselectable" id="ag-'.concat(c,`">
|
||
<ag-page-size-selector ref="pageSizeComp"></ag-page-size-selector>
|
||
<span class="ag-paging-row-summary-panel" role="status">
|
||
<span id="ag-`).concat(c,`-first-row" ref="lbFirstRowOnPage" class="ag-paging-row-summary-panel-number"></span>
|
||
<span id="ag-`).concat(c,'-to">').concat(i,`</span>
|
||
<span id="ag-`).concat(c,`-last-row" ref="lbLastRowOnPage" class="ag-paging-row-summary-panel-number"></span>
|
||
<span id="ag-`).concat(c,'-of">').concat(o,`</span>
|
||
<span id="ag-`).concat(c,`-row-count" ref="lbRecordCount" class="ag-paging-row-summary-panel-number"></span>
|
||
</span>
|
||
<span class="ag-paging-page-summary-panel" role="presentation">
|
||
<div ref="btFirst" class="ag-button ag-paging-button" role="button" aria-label="`).concat(s,`"></div>
|
||
<div ref="btPrevious" class="ag-button ag-paging-button" role="button" aria-label="`).concat(a,`"></div>
|
||
<span class="ag-paging-description" role="status">
|
||
<span id="ag-`).concat(c,'-start-page">').concat(r,`</span>
|
||
<span id="ag-`).concat(c,`-start-page-number" ref="lbCurrent" class="ag-paging-number"></span>
|
||
<span id="ag-`).concat(c,'-of-page">').concat(o,`</span>
|
||
<span id="ag-`).concat(c,`-of-page-number" ref="lbTotal" class="ag-paging-number"></span>
|
||
</span>
|
||
<div ref="btNext" class="ag-button ag-paging-button" role="button" aria-label="`).concat(l,`"></div>
|
||
<div ref="btLast" class="ag-button ag-paging-button" role="button" aria-label="`).concat(u,`"></div>
|
||
</span>
|
||
</div>`)},t.prototype.onBtNext=function(){this.nextButtonDisabled||this.paginationProxy.goToNextPage()},t.prototype.onBtPrevious=function(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToPreviousPage()},t.prototype.onBtLast=function(){this.lastButtonDisabled||this.paginationProxy.goToLastPage()},t.prototype.enableOrDisableButtons=function(){var e=this.paginationProxy.getCurrentPage(),r=this.paginationProxy.isLastPageFound(),i=this.paginationProxy.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);var o=this.isZeroPagesToDisplay(),s=e===i-1;this.nextButtonDisabled=s||o,this.lastButtonDisabled=!r||o||e===i-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)},t.prototype.toggleButtonDisabled=function(e,r){pn(e,r),e.classList.toggle("ag-disabled",r)},t.prototype.updateRowLabels=function(){var e=this.paginationProxy.getCurrentPage(),r=this.paginationProxy.getPageSize(),i=this.paginationProxy.isLastPageFound(),o=this.paginationProxy.isLastPageFound()?this.paginationProxy.getMasterRowCount():null,s,a;if(this.isZeroPagesToDisplay()?s=a=0:(s=r*e+1,a=s+r-1,i&&a>o&&(a=o)),this.lbFirstRowOnPage.innerHTML=this.formatNumber(s),this.rowNodeBlockLoader.isLoading()){var l=this.localeService.getLocaleTextFunc();this.lbLastRowOnPage.innerHTML=l("pageLastRowUnknown","?")}else this.lbLastRowOnPage.innerHTML=this.formatNumber(a)},t.prototype.isZeroPagesToDisplay=function(){var e=this.paginationProxy.isLastPageFound(),r=this.paginationProxy.getTotalPages();return e&&r===0},t.prototype.setTotalLabels=function(){var e=this.paginationProxy.isLastPageFound(),r=this.paginationProxy.getTotalPages(),i=e?this.paginationProxy.getMasterRowCount():null;if(i===1){var o=this.paginationProxy.getRow(0),s=o&&o.group&&!(o.groupData||o.aggData);if(s){this.setTotalLabelsToZero();return}}if(e)this.lbTotal.innerHTML=this.formatNumber(r),this.lbRecordCount.innerHTML=this.formatNumber(i);else{var a=this.localeService.getLocaleTextFunc()("more","more");this.lbTotal.innerHTML=a,this.lbRecordCount.innerHTML=a}},t.prototype.setTotalLabelsToZero=function(){this.lbFirstRowOnPage.innerHTML=this.formatNumber(0),this.lbCurrent.innerHTML=this.formatNumber(0),this.lbLastRowOnPage.innerHTML=this.formatNumber(0),this.lbTotal.innerHTML=this.formatNumber(0),this.lbRecordCount.innerHTML=this.formatNumber(0)},Ue([f("paginationProxy")],t.prototype,"paginationProxy",void 0),Ue([f("rowNodeBlockLoader")],t.prototype,"rowNodeBlockLoader",void 0),Ue([L("btFirst")],t.prototype,"btFirst",void 0),Ue([L("btPrevious")],t.prototype,"btPrevious",void 0),Ue([L("btNext")],t.prototype,"btNext",void 0),Ue([L("btLast")],t.prototype,"btLast",void 0),Ue([L("lbRecordCount")],t.prototype,"lbRecordCount",void 0),Ue([L("lbFirstRowOnPage")],t.prototype,"lbFirstRowOnPage",void 0),Ue([L("lbLastRowOnPage")],t.prototype,"lbLastRowOnPage",void 0),Ue([L("lbCurrent")],t.prototype,"lbCurrent",void 0),Ue([L("lbTotal")],t.prototype,"lbTotal",void 0),Ue([L("pageSizeComp")],t.prototype,"pageSizeComp",void 0),Ue([b],t.prototype,"postConstruct",null),t}(W),Am=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),$s=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},bm=function(n){Am(t,n);function t(){var e=n.call(this,t.TEMPLATE)||this;return e.inProgress=!1,e.destroyRequested=!1,e}return t.prototype.updateLayoutClasses=function(e,r){var i=this.eOverlayWrapper.classList;i.toggle(ue.AUTO_HEIGHT,r.autoHeight),i.toggle(ue.NORMAL,r.normal),i.toggle(ue.PRINT,r.print)},t.prototype.postConstruct=function(){this.createManagedBean(new fs(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.overlayService.registerOverlayWrapperComp(this)},t.prototype.setWrapperTypeClass=function(e){var r=this.eOverlayWrapper.classList;this.activeOverlayWrapperCssClass&&r.toggle(this.activeOverlayWrapperCssClass,!1),this.activeOverlayWrapperCssClass=e,r.toggle(e,!0)},t.prototype.showOverlay=function(e,r){var i=this;this.inProgress||(this.setWrapperTypeClass(r),this.destroyActiveOverlay(),this.inProgress=!0,e&&e.then(function(o){i.inProgress=!1,i.eOverlayWrapper.appendChild(o.getGui()),i.activeOverlay=o,i.destroyRequested&&(i.destroyRequested=!1,i.destroyActiveOverlay())}),this.setDisplayed(!0,{skipAriaHidden:!0}))},t.prototype.destroyActiveOverlay=function(){if(this.inProgress){this.destroyRequested=!0;return}this.activeOverlay&&(this.activeOverlay=this.getContext().destroyBean(this.activeOverlay),he(this.eOverlayWrapper))},t.prototype.hideOverlay=function(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})},t.prototype.destroy=function(){this.destroyActiveOverlay(),n.prototype.destroy.call(this)},t.TEMPLATE=`
|
||
<div class="ag-overlay" aria-hidden="true">
|
||
<div class="ag-overlay-panel">
|
||
<div class="ag-overlay-wrapper" ref="eOverlayWrapper"></div>
|
||
</div>
|
||
</div>`,$s([f("overlayService")],t.prototype,"overlayService",void 0),$s([L("eOverlayWrapper")],t.prototype,"eOverlayWrapper",void 0),$s([b],t.prototype,"postConstruct",null),t}(W),Fm=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Ho=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Lm=function(n){Fm(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.getFirstRow=function(){var e=0,r;return this.pinnedRowModel.getPinnedTopRowCount()?r="top":this.rowModel.getRowCount()?(r=null,e=this.paginationProxy.getPageFirstRow()):this.pinnedRowModel.getPinnedBottomRowCount()&&(r="bottom"),r===void 0?null:{rowIndex:e,rowPinned:r}},t.prototype.getLastRow=function(){var e,r=null,i=this.pinnedRowModel.getPinnedBottomRowCount(),o=this.pinnedRowModel.getPinnedTopRowCount();return i?(r="bottom",e=i-1):this.rowModel.getRowCount()?(r=null,e=this.paginationProxy.getPageLastRow()):o&&(r="top",e=o-1),e===void 0?null:{rowIndex:e,rowPinned:r}},t.prototype.getRowNode=function(e){switch(e.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case"bottom":return this.pinnedRowModel.getPinnedBottomRowData()[e.rowIndex];default:return this.rowModel.getRow(e.rowIndex)}},t.prototype.sameRow=function(e,r){return!e&&!r?!0:e&&!r||!e&&r?!1:e.rowIndex===r.rowIndex&&e.rowPinned==r.rowPinned},t.prototype.before=function(e,r){switch(e.rowPinned){case"top":if(r.rowPinned!=="top")return!0;break;case"bottom":if(r.rowPinned!=="bottom")return!1;break;default:if(P(r.rowPinned))return r.rowPinned!=="top";break}return e.rowIndex<r.rowIndex},t.prototype.rowMax=function(e){var r=this,i;return e.forEach(function(o){(i===void 0||r.before(i,o))&&(i=o)}),i},t.prototype.rowMin=function(e){var r=this,i;return e.forEach(function(o){(i===void 0||r.before(o,i))&&(i=o)}),i},Ho([f("rowModel")],t.prototype,"rowModel",void 0),Ho([f("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),Ho([f("paginationProxy")],t.prototype,"paginationProxy",void 0),t=Ho([I("rowPositionUtils")],t),t}(D),Im=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),xm=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Mm=function(n){Im(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.createId=function(e){var r=e.rowIndex,i=e.rowPinned,o=e.column;return this.createIdFromValues({rowIndex:r,column:o,rowPinned:i})},t.prototype.createIdFromValues=function(e){var r=e.rowIndex,i=e.rowPinned,o=e.column;return"".concat(r,".").concat(i??"null",".").concat(o.getId())},t.prototype.equals=function(e,r){var i=e.column===r.column,o=e.rowPinned===r.rowPinned,s=e.rowIndex===r.rowIndex;return i&&o&&s},t=xm([I("cellPositionUtils")],t),t}(D),Nm=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),_i=function(){function n(t){this.cellValueChanges=t}return n}(),Ks=function(n){Nm(t,n);function t(e,r,i,o){var s=n.call(this,e)||this;return s.initialRange=r,s.finalRange=i,s.ranges=o,s}return t}(_i),Uu=function(){function n(t){this.actionStack=[],this.maxStackSize=t||n.DEFAULT_STACK_SIZE,this.actionStack=new Array(this.maxStackSize)}return n.prototype.pop=function(){return this.actionStack.pop()},n.prototype.push=function(t){var e=t.cellValueChanges&&t.cellValueChanges.length>0;e&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(t))},n.prototype.clear=function(){this.actionStack=[]},n.prototype.getCurrentStackSize=function(){return this.actionStack.length},n.DEFAULT_STACK_SIZE=10,n}(),Gm=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Bo=function(){return Bo=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Bo.apply(this,arguments)},mt=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Vm=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},Hm=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},Bm=function(n){Gm(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.cellValueChanges=[],e.activeCellEdit=null,e.activeRowEdit=null,e.isPasting=!1,e.isRangeInAction=!1,e.onCellValueChanged=function(r){var i={column:r.column,rowIndex:r.rowIndex,rowPinned:r.rowPinned},o=e.activeCellEdit!==null&&e.cellPositionUtils.equals(e.activeCellEdit,i),s=e.activeRowEdit!==null&&e.rowPositionUtils.sameRow(e.activeRowEdit,i),a=o||s||e.isPasting||e.isRangeInAction;if(a){var l=r.rowPinned,u=r.rowIndex,c=r.column,p=r.oldValue,d=r.value,h={rowPinned:l,rowIndex:u,columnId:c.getColId(),newValue:d,oldValue:p};e.cellValueChanges.push(h)}},e.clearStacks=function(){e.undoStack.clear(),e.redoStack.clear()},e}return t.prototype.init=function(){var e=this;if(this.gridOptionsService.get("undoRedoCellEditing")){var r=this.gridOptionsService.get("undoRedoCellEditingLimit");r<=0||(this.undoStack=new Uu(r),this.redoStack=new Uu(r),this.addRowEditingListeners(),this.addCellEditingListeners(),this.addPasteListeners(),this.addFillListeners(),this.addCellKeyListeners(),this.addManagedListener(this.eventService,g.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged),this.addManagedListener(this.eventService,g.EVENT_MODEL_UPDATED,function(i){i.keepUndoRedoStack||e.clearStacks()}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_COLUMN_GROUP_OPENED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_COLUMN_MOVED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PINNED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VISIBLE,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_ROW_DRAG_END,this.clearStacks),this.ctrlsService.whenReady(function(){e.gridBodyCtrl=e.ctrlsService.getGridBodyCtrl()}))}},t.prototype.getCurrentUndoStackSize=function(){return this.undoStack?this.undoStack.getCurrentStackSize():0},t.prototype.getCurrentRedoStackSize=function(){return this.redoStack?this.redoStack.getCurrentStackSize():0},t.prototype.undo=function(e){var r={type:g.EVENT_UNDO_STARTED,source:e};this.eventService.dispatchEvent(r);var i=this.undoRedo(this.undoStack,this.redoStack,"initialRange","oldValue","undo"),o={type:g.EVENT_UNDO_ENDED,source:e,operationPerformed:i};this.eventService.dispatchEvent(o)},t.prototype.redo=function(e){var r={type:g.EVENT_REDO_STARTED,source:e};this.eventService.dispatchEvent(r);var i=this.undoRedo(this.redoStack,this.undoStack,"finalRange","newValue","redo"),o={type:g.EVENT_REDO_ENDED,source:e,operationPerformed:i};this.eventService.dispatchEvent(o)},t.prototype.undoRedo=function(e,r,i,o,s){if(!e)return!1;var a=e.pop();return!a||!a.cellValueChanges?!1:(this.processAction(a,function(l){return l[o]},s),a instanceof Ks?this.processRange(a.ranges||[a[i]]):this.processCell(a.cellValueChanges),r.push(a),!0)},t.prototype.processAction=function(e,r,i){var o=this;e.cellValueChanges.forEach(function(s){var a=s.rowIndex,l=s.rowPinned,u=s.columnId,c={rowIndex:a,rowPinned:l},p=o.getRowNode(c);p.displayed&&p.setDataValue(u,r(s),i)})},t.prototype.processRange=function(e){var r=this,i;this.rangeService.removeAllCellRanges(!0),e.forEach(function(o,s){if(o){var a=o.startRow,l=o.endRow;s===e.length-1&&(i={rowPinned:a.rowPinned,rowIndex:a.rowIndex,columnId:o.startColumn.getColId()},r.setLastFocusedCell(i));var u={rowStartIndex:a.rowIndex,rowStartPinned:a.rowPinned,rowEndIndex:l.rowIndex,rowEndPinned:l.rowPinned,columnStart:o.startColumn,columns:o.columns};r.rangeService.addCellRange(u)}})},t.prototype.processCell=function(e){var r=e[0],i=r.rowIndex,o=r.rowPinned,s={rowIndex:i,rowPinned:o},a=this.getRowNode(s),l={rowPinned:r.rowPinned,rowIndex:a.rowIndex,columnId:r.columnId};this.setLastFocusedCell(l,!!this.rangeService)},t.prototype.setLastFocusedCell=function(e,r){var i=e.rowIndex,o=e.columnId,s=e.rowPinned,a=this.gridBodyCtrl.getScrollFeature(),l=this.columnModel.getGridColumn(o);if(l){a.ensureIndexVisible(i),a.ensureColumnVisible(l);var u={rowIndex:i,column:l,rowPinned:s};this.focusService.setFocusedCell(Bo(Bo({},u),{forceBrowserFocus:!0})),r&&this.rangeService.setRangeToCell(u)}},t.prototype.addRowEditingListeners=function(){var e=this;this.addManagedListener(this.eventService,g.EVENT_ROW_EDITING_STARTED,function(r){e.activeRowEdit={rowIndex:r.rowIndex,rowPinned:r.rowPinned}}),this.addManagedListener(this.eventService,g.EVENT_ROW_EDITING_STOPPED,function(){var r=new _i(e.cellValueChanges);e.pushActionsToUndoStack(r),e.activeRowEdit=null})},t.prototype.addCellEditingListeners=function(){var e=this;this.addManagedListener(this.eventService,g.EVENT_CELL_EDITING_STARTED,function(r){e.activeCellEdit={column:r.column,rowIndex:r.rowIndex,rowPinned:r.rowPinned}}),this.addManagedListener(this.eventService,g.EVENT_CELL_EDITING_STOPPED,function(r){e.activeCellEdit=null;var i=r.valueChanged&&!e.activeRowEdit&&!e.isPasting&&!e.isRangeInAction;if(i){var o=new _i(e.cellValueChanges);e.pushActionsToUndoStack(o)}})},t.prototype.addPasteListeners=function(){var e=this;this.addManagedListener(this.eventService,g.EVENT_PASTE_START,function(){e.isPasting=!0}),this.addManagedListener(this.eventService,g.EVENT_PASTE_END,function(){var r=new _i(e.cellValueChanges);e.pushActionsToUndoStack(r),e.isPasting=!1})},t.prototype.addFillListeners=function(){var e=this;this.addManagedListener(this.eventService,g.EVENT_FILL_START,function(){e.isRangeInAction=!0}),this.addManagedListener(this.eventService,g.EVENT_FILL_END,function(r){var i=new Ks(e.cellValueChanges,r.initialRange,r.finalRange);e.pushActionsToUndoStack(i),e.isRangeInAction=!1})},t.prototype.addCellKeyListeners=function(){var e=this;this.addManagedListener(this.eventService,g.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,function(){e.isRangeInAction=!0}),this.addManagedListener(this.eventService,g.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,function(){var r;e.rangeService&&e.gridOptionsService.get("enableRangeSelection")?r=new Ks(e.cellValueChanges,void 0,void 0,Hm([],Vm(e.rangeService.getCellRanges()),!1)):r=new _i(e.cellValueChanges),e.pushActionsToUndoStack(r),e.isRangeInAction=!1})},t.prototype.pushActionsToUndoStack=function(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()},t.prototype.getRowNode=function(e){switch(e.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case"bottom":return this.pinnedRowModel.getPinnedBottomRowData()[e.rowIndex];default:return this.rowModel.getRow(e.rowIndex)}},mt([f("focusService")],t.prototype,"focusService",void 0),mt([f("ctrlsService")],t.prototype,"ctrlsService",void 0),mt([f("rowModel")],t.prototype,"rowModel",void 0),mt([f("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),mt([f("cellPositionUtils")],t.prototype,"cellPositionUtils",void 0),mt([f("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),mt([f("columnModel")],t.prototype,"columnModel",void 0),mt([Y("rangeService")],t.prototype,"rangeService",void 0),mt([b],t.prototype,"init",null),t=mt([I("undoRedoService")],t),t}(D),km=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Ys=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Wm=function(n){km(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.findHeader=function(e,r){var i,o,s;if(e.column instanceof ce?(o="getDisplayedGroup".concat(r),i=this.columnModel[o](e.column)):(s="getDisplayedCol".concat(r),i=this.columnModel[s](e.column)),!!i){var a=e.headerRowIndex,l=this.getHeaderRowType(a);if(l===ye.COLUMN_GROUP){var u=i;if(u.isPadding()&&this.isAnyChildSpanningHeaderHeight(u)){var c=this.getColumnVisibleChild(u,a,r),p=c.nextFocusColumn,d=c.nextRow;p&&(i=p,a=d)}}return{column:i,headerRowIndex:a}}},t.prototype.isAnyChildSpanningHeaderHeight=function(e){return e?e.getLeafColumns().some(function(r){return r.isSpanHeaderHeight()}):!1},t.prototype.getColumnVisibleParent=function(e,r){var i=this.getHeaderRowType(r),o=i===ye.FLOATING_FILTER,s=i===ye.COLUMN,a=o?e:e.getParent(),l=r-1;if(s&&this.isAnyChildSpanningHeaderHeight(e.getParent())){for(;a&&a.isPadding();)a=a.getParent(),l--;l<0&&(a=e,l=r)}return{nextFocusColumn:a,nextRow:l}},t.prototype.getColumnVisibleChild=function(e,r,i){i===void 0&&(i="After");var o=this.getHeaderRowType(r),s=e,a=r+1;if(o===ye.COLUMN_GROUP){var l=e.getDisplayedLeafColumns(),u=i==="After"?l[0]:Q(l);if(this.isAnyChildSpanningHeaderHeight(u.getParent())){s=u;for(var c=u.getParent();c&&c!==e;)c=c.getParent(),a++}else s=e.getDisplayedChildren()[0]}return{nextFocusColumn:s,nextRow:a}},t.prototype.getHeaderRowType=function(e){var r=this.ctrlsService.getHeaderRowContainerCtrl();if(r)return r.getRowType(e)},t.prototype.findColAtEdgeForHeaderRow=function(e,r){var i=this.columnModel.getAllDisplayedColumns(),o=i[r==="start"?0:i.length-1];if(o){var s=this.ctrlsService.getHeaderRowContainerCtrl(o.getPinned()),a=s.getRowType(e);if(a==ye.COLUMN_GROUP){var l=this.columnModel.getColumnGroupAtLevel(o,e);return{headerRowIndex:e,column:l}}return{headerRowIndex:a==null?-1:e,column:o}}},Ys([f("columnModel")],t.prototype,"columnModel",void 0),Ys([f("ctrlsService")],t.prototype,"ctrlsService",void 0),t=Ys([I("headerPositionUtils")],t),t}(D),jm=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Um=function(){function n(){}return n.prototype.buildColumnDefs=function(t,e,r){var i=this,o=[],s={};return t.forEach(function(a){for(var l=i.createDefFromColumn(a,e,r),u=!0,c=l,p=a.getOriginalParent(),d=null;p;){var h=null;if(p.isPadding()){p=p.getOriginalParent();continue}var v=s[p.getGroupId()];if(v){v.children.push(c),u=!1;break}if(h=i.createDefFromGroup(p),h&&(h.children=[c],s[h.groupId]=h,c=h,p=p.getOriginalParent()),p!=null&&d===p){u=!1;break}d=p}u&&o.push(c)}),o},n.prototype.createDefFromGroup=function(t){var e=xi(t.getColGroupDef(),["children"]);return e&&(e.groupId=t.getGroupId()),e},n.prototype.createDefFromColumn=function(t,e,r){var i=xi(t.getColDef());return i.colId=t.getColId(),i.width=t.getActualWidth(),i.rowGroup=t.isRowGroupActive(),i.rowGroupIndex=t.isRowGroupActive()?e.indexOf(t):null,i.pivot=t.isPivotActive(),i.pivotIndex=t.isPivotActive()?r.indexOf(t):null,i.aggFunc=t.isValueActive()?t.getAggFunc():null,i.hide=t.isVisible()?void 0:!0,i.pinned=t.isPinned()?t.getPinned():null,i.sort=t.getSort()?t.getSort():null,i.sortIndex=t.getSortIndex()!=null?t.getSortIndex():null,i},n=jm([I("columnDefFactory")],n),n}(),qs=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},zm=function(){function n(){}return n.prototype.getInitialRowClasses=function(t){var e=[];return P(t.extraCssClass)&&e.push(t.extraCssClass),e.push("ag-row"),e.push(t.rowFocused?"ag-row-focus":"ag-row-no-focus"),t.fadeRowIn&&e.push("ag-opacity-zero"),e.push(t.rowIsEven?"ag-row-even":"ag-row-odd"),t.rowNode.isRowPinned()&&e.push("ag-row-pinned"),t.rowNode.isSelected()&&e.push("ag-row-selected"),t.rowNode.footer&&e.push("ag-row-footer"),e.push("ag-row-level-"+t.rowLevel),t.rowNode.stub&&e.push("ag-row-loading"),t.fullWidthRow&&e.push("ag-full-width-row"),t.expandable&&(e.push("ag-row-group"),e.push(t.rowNode.expanded?"ag-row-group-expanded":"ag-row-group-contracted")),t.rowNode.dragging&&e.push("ag-row-dragging"),on(e,this.processClassesFromGridOptions(t.rowNode)),on(e,this.preProcessRowClassRules(t.rowNode)),e.push(t.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),t.firstRowOnPage&&e.push("ag-row-first"),t.lastRowOnPage&&e.push("ag-row-last"),t.fullWidthRow&&(t.pinned==="left"&&e.push("ag-cell-last-left-pinned"),t.pinned==="right"&&e.push("ag-cell-first-right-pinned")),e},n.prototype.processClassesFromGridOptions=function(t){var e=[],r=function(l){typeof l=="string"?e.push(l):Array.isArray(l)&&l.forEach(function(u){return e.push(u)})},i=this.gridOptionsService.get("rowClass");if(i){if(typeof i=="function")return console.warn("AG Grid: rowClass should not be a function, please use getRowClass instead"),[];r(i)}var o=this.gridOptionsService.getCallback("getRowClass");if(o){var s={data:t.data,node:t,rowIndex:t.rowIndex},a=o(s);r(a)}return e},n.prototype.preProcessRowClassRules=function(t){var e=[];return this.processRowClassRules(t,function(r){e.push(r)},function(r){}),e},n.prototype.processRowClassRules=function(t,e,r){var i={data:t.data,node:t,rowIndex:t.rowIndex,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};this.stylingService.processClassRules(void 0,this.gridOptionsService.get("rowClassRules"),i,e,r)},n.prototype.calculateRowLevel=function(t){return t.group?t.level:t.parent?t.parent.level+1:0},qs([f("stylingService")],n.prototype,"stylingService",void 0),qs([f("gridOptionsService")],n.prototype,"gridOptionsService",void 0),n=qs([I("rowCssClassCalculator")],n),n}(),$m=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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 i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Km=function(n){$m(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.init=function(){var e=this;this.isAccentedSort=this.gridOptionsService.get("accentedSort"),this.primaryColumnsSortGroups=this.gridOptionsService.isColumnsSortingCoupledToGroup(),this.addManagedPropertyListener("accentedSort",function(r){return e.isAccentedSort=r.currentValue}),this.addManagedPropertyListener("autoGroupColumnDef",function(){return e.primaryColumnsSortGroups=e.gridOptionsService.isColumnsSortingCoupledToGroup()})},t.prototype.doFullSort=function(e,r){var i=function(s,a){return{currentPos:a,rowNode:s}},o=e.map(i);return o.sort(this.compareRowNodes.bind(this,r)),o.map(function(s){return s.rowNode})},t.prototype.compareRowNodes=function(e,r,i){for(var o=r.rowNode,s=i.rowNode,a=0,l=e.length;a<l;a++){var u=e[a],c=u.sort==="desc",p=this.getValue(o,u.column),d=this.getValue(s,u.column),h=void 0,v=this.getComparator(u,o);v?h=v(p,d,o,s,c):h=z.defaultComparator(p,d,this.isAccentedSort);var y=!isNaN(h);if(y&&h!==0)return u.sort==="asc"?h:h*-1}return r.currentPos-i.currentPos},t.prototype.getComparator=function(e,r){var i=e.column,o=i.getColDef().comparator;if(o!=null)return o;if(i.getColDef().showRowGroup){var s=!r.group&&i.getColDef().field;if(s){var a=this.columnModel.getPrimaryColumn(s);if(a)return a.getColDef().comparator}}},t.prototype.getValue=function(e,r){var i,o;if(!this.primaryColumnsSortGroups)return this.valueService.getValue(r,e,!1,!1);var s=e.rowGroupColumn===r;if(s){var a=this.gridOptionsService.isGroupUseEntireRow(this.columnModel.isPivotActive());if(a){var l=(i=e.allLeafChildren)===null||i===void 0?void 0:i[0];return l?this.valueService.getValue(r,l,!1,!1):void 0}var u=this.columnModel.getGroupDisplayColumnForGroup(r.getId());return u?(o=e.groupData)===null||o===void 0?void 0:o[u.getId()]:void 0}if(!(e.group&&r.getColDef().showRowGroup))return this.valueService.getValue(r,e,!1,!1)},ko([f("valueService")],t.prototype,"valueService",void 0),ko([f("columnModel")],t.prototype,"columnModel",void 0),ko([b],t.prototype,"init",null),t=ko([I("rowNodeSorter")],t),t}(D),Ym=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),qm=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Qm=function(n){Ym(t,n);function t(){var r=n!==null&&n.apply(this,arguments)||this;return r.ready=!1,r.readyCallbacks=[],r}e=t,t.prototype.checkReady=function(){if(this.ready=this.gridCtrl!=null&&this.gridBodyCtrl!=null&&this.centerRowContainerCtrl!=null&&this.leftRowContainerCtrl!=null&&this.rightRowContainerCtrl!=null&&this.bottomCenterRowContainerCtrl!=null&&this.bottomLeftRowContainerCtrl!=null&&this.bottomRightRowContainerCtrl!=null&&this.topCenterRowContainerCtrl!=null&&this.topLeftRowContainerCtrl!=null&&this.topRightRowContainerCtrl!=null&&this.stickyTopCenterRowContainerCtrl!=null&&this.stickyTopLeftRowContainerCtrl!=null&&this.stickyTopRightRowContainerCtrl!=null&&this.centerHeaderRowContainerCtrl!=null&&this.leftHeaderRowContainerCtrl!=null&&this.rightHeaderRowContainerCtrl!=null&&this.fakeHScrollComp!=null&&this.fakeVScrollComp!=null&&this.gridHeaderCtrl!=null,this.ready){var r=this.createReadyParams();this.readyCallbacks.forEach(function(i){return i(r)}),this.readyCallbacks.length=0}},t.prototype.whenReady=function(r){this.ready?r(this.createReadyParams()):this.readyCallbacks.push(r)},t.prototype.createReadyParams=function(){return{centerRowContainerCtrl:this.centerRowContainerCtrl,leftRowContainerCtrl:this.leftRowContainerCtrl,rightRowContainerCtrl:this.rightRowContainerCtrl,bottomCenterRowContainerCtrl:this.bottomCenterRowContainerCtrl,bottomLeftRowContainerCtrl:this.bottomLeftRowContainerCtrl,bottomRightRowContainerCtrl:this.bottomRightRowContainerCtrl,topCenterRowContainerCtrl:this.topCenterRowContainerCtrl,topLeftRowContainerCtrl:this.topLeftRowContainerCtrl,topRightRowContainerCtrl:this.topRightRowContainerCtrl,stickyTopCenterRowContainerCtrl:this.stickyTopCenterRowContainerCtrl,stickyTopLeftRowContainerCtrl:this.stickyTopLeftRowContainerCtrl,stickyTopRightRowContainerCtrl:this.stickyTopRightRowContainerCtrl,centerHeaderRowContainerCtrl:this.centerHeaderRowContainerCtrl,leftHeaderRowContainerCtrl:this.leftHeaderRowContainerCtrl,rightHeaderRowContainerCtrl:this.rightHeaderRowContainerCtrl,fakeHScrollComp:this.fakeHScrollComp,fakeVScrollComp:this.fakeVScrollComp,gridBodyCtrl:this.gridBodyCtrl,gridCtrl:this.gridCtrl,gridHeaderCtrl:this.gridHeaderCtrl}},t.prototype.registerFakeHScrollComp=function(r){this.fakeHScrollComp=r,this.checkReady()},t.prototype.registerFakeVScrollComp=function(r){this.fakeVScrollComp=r,this.checkReady()},t.prototype.registerGridHeaderCtrl=function(r){this.gridHeaderCtrl=r,this.checkReady()},t.prototype.registerCenterRowContainerCtrl=function(r){this.centerRowContainerCtrl=r,this.checkReady()},t.prototype.registerLeftRowContainerCtrl=function(r){this.leftRowContainerCtrl=r,this.checkReady()},t.prototype.registerRightRowContainerCtrl=function(r){this.rightRowContainerCtrl=r,this.checkReady()},t.prototype.registerTopCenterRowContainerCtrl=function(r){this.topCenterRowContainerCtrl=r,this.checkReady()},t.prototype.registerTopLeftRowContainerCon=function(r){this.topLeftRowContainerCtrl=r,this.checkReady()},t.prototype.registerTopRightRowContainerCtrl=function(r){this.topRightRowContainerCtrl=r,this.checkReady()},t.prototype.registerStickyTopCenterRowContainerCtrl=function(r){this.stickyTopCenterRowContainerCtrl=r,this.checkReady()},t.prototype.registerStickyTopLeftRowContainerCon=function(r){this.stickyTopLeftRowContainerCtrl=r,this.checkReady()},t.prototype.registerStickyTopRightRowContainerCtrl=function(r){this.stickyTopRightRowContainerCtrl=r,this.checkReady()},t.prototype.registerBottomCenterRowContainerCtrl=function(r){this.bottomCenterRowContainerCtrl=r,this.checkReady()},t.prototype.registerBottomLeftRowContainerCtrl=function(r){this.bottomLeftRowContainerCtrl=r,this.checkReady()},t.prototype.registerBottomRightRowContainerCtrl=function(r){this.bottomRightRowContainerCtrl=r,this.checkReady()},t.prototype.registerHeaderContainer=function(r,i){switch(i){case"left":this.leftHeaderRowContainerCtrl=r;break;case"right":this.rightHeaderRowContainerCtrl=r;break;default:this.centerHeaderRowContainerCtrl=r;break}this.checkReady()},t.prototype.registerGridBodyCtrl=function(r){this.gridBodyCtrl=r,this.checkReady()},t.prototype.registerGridCtrl=function(r){this.gridCtrl=r,this.checkReady()},t.prototype.getFakeHScrollComp=function(){return this.fakeHScrollComp},t.prototype.getFakeVScrollComp=function(){return this.fakeVScrollComp},t.prototype.getGridHeaderCtrl=function(){return this.gridHeaderCtrl},t.prototype.getGridCtrl=function(){return this.gridCtrl},t.prototype.getCenterRowContainerCtrl=function(){return this.centerRowContainerCtrl},t.prototype.getTopCenterRowContainerCtrl=function(){return this.topCenterRowContainerCtrl},t.prototype.getBottomCenterRowContainerCtrl=function(){return this.bottomCenterRowContainerCtrl},t.prototype.getStickyTopCenterRowContainerCtrl=function(){return this.stickyTopCenterRowContainerCtrl},t.prototype.getGridBodyCtrl=function(){return this.gridBodyCtrl},t.prototype.getHeaderRowContainerCtrls=function(){return[this.leftHeaderRowContainerCtrl,this.rightHeaderRowContainerCtrl,this.centerHeaderRowContainerCtrl]},t.prototype.getHeaderRowContainerCtrl=function(r){switch(r){case"left":return this.leftHeaderRowContainerCtrl;case"right":return this.rightHeaderRowContainerCtrl;default:return this.centerHeaderRowContainerCtrl}};var e;return t.NAME="ctrlsService",t=e=qm([I(e.NAME)],t),t}(D),Xm=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Jm=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Zm=function(n){Xm(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.registry={},e}return t.prototype.register=function(e){this.registry[e.controllerName]=e.controllerClass},t.prototype.getInstance=function(e){var r=this.registry[e];if(r!=null)return new r},t=Jm([I("ctrlsFactory")],t),t}(D),eS=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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 i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},zu=function(n){eS(t,n);function t(e,r){var i=n.call(this,e)||this;return i.direction=r,i.hideTimeout=null,i}return t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,g.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",Pn()||Nt())},t.prototype.initialiseInvisibleScrollbar=function(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=Dn(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))},t.prototype.addActiveListenerToggles=function(){var e=this,r=["mouseenter","mousedown","touchstart"],i=["mouseleave","touchend"],o=this.getGui();r.forEach(function(s){return e.addManagedListener(o,s,function(){return e.addOrRemoveCssClass("ag-scrollbar-active",!0)})}),i.forEach(function(s){return e.addManagedListener(o,s,function(){return e.addOrRemoveCssClass("ag-scrollbar-active",!1)})})},t.prototype.onScrollVisibilityChanged=function(){var e=this;this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),this.animationFrameService.requestAnimationFrame(function(){return e.setScrollVisible()})},t.prototype.hideAndShowInvisibleScrollAsNeeded=function(){var e=this;this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL,function(r){r.direction===e.direction&&(e.hideTimeout!==null&&(window.clearTimeout(e.hideTimeout),e.hideTimeout=null),e.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))}),this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL_END,function(){e.hideTimeout=window.setTimeout(function(){e.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),e.hideTimeout=null},400)})},t.prototype.attemptSettingScrollPosition=function(e){var r=this,i=this.getViewport();en(function(){return Te(i)},function(){return r.setScrollPosition(e)},100)},t.prototype.getViewport=function(){return this.eViewport},t.prototype.getContainer=function(){return this.eContainer},t.prototype.onScrollCallback=function(e){this.addManagedListener(this.getViewport(),"scroll",e)},Ri([L("eViewport")],t.prototype,"eViewport",void 0),Ri([L("eContainer")],t.prototype,"eContainer",void 0),Ri([f("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),Ri([f("ctrlsService")],t.prototype,"ctrlsService",void 0),Ri([f("animationFrameService")],t.prototype,"animationFrameService",void 0),t}(W),tS=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Oi=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},rS=function(n){tS(t,n);function t(){return n.call(this,t.TEMPLATE,"horizontal")||this}return t.prototype.postConstruct=function(){var e=this;n.prototype.postConstruct.call(this);var r=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,r),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,r),this.addManagedListener(this.eventService,g.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedPropertyListener("domLayout",r),this.ctrlsService.registerFakeHScrollComp(this),this.createManagedBean(new ws(function(i){return e.eContainer.style.width="".concat(i,"px")})),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))},t.prototype.initialiseInvisibleScrollbar=function(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gridOptionsService.get("enableRtl"),n.prototype.initialiseInvisibleScrollbar.call(this),this.invisibleScrollbar&&this.refreshCompBottom())},t.prototype.onPinnedRowDataChanged=function(){this.refreshCompBottom()},t.prototype.refreshCompBottom=function(){if(this.invisibleScrollbar){var e=this.pinnedRowModel.getPinnedBottomTotalHeight();this.getGui().style.bottom="".concat(e,"px")}},t.prototype.onScrollVisibilityChanged=function(){n.prototype.onScrollVisibilityChanged.call(this),this.setFakeHScrollSpacerWidths()},t.prototype.setFakeHScrollSpacerWidths=function(){var e=this.scrollVisibleService.isVerticalScrollShowing(),r=this.columnModel.getDisplayedColumnsRightWidth(),i=!this.enableRtl&&e,o=this.gridOptionsService.getScrollbarWidth();i&&(r+=o),qe(this.eRightSpacer,r),this.eRightSpacer.classList.toggle("ag-scroller-corner",r<=o);var s=this.columnModel.getDisplayedColumnsLeftWidth(),a=this.enableRtl&&e;a&&(s+=o),qe(this.eLeftSpacer,s),this.eLeftSpacer.classList.toggle("ag-scroller-corner",s<=o)},t.prototype.setScrollVisible=function(){var e=this.scrollVisibleService.isHorizontalScrollShowing(),r=this.invisibleScrollbar,i=this.gridOptionsService.get("suppressHorizontalScroll"),o=e&&this.gridOptionsService.getScrollbarWidth()||0,s=o===0&&r?16:o,a=i?0:s;this.addOrRemoveCssClass("ag-scrollbar-invisible",r),or(this.getGui(),a),or(this.eViewport,a),or(this.eContainer,a),this.setDisplayed(e,{skipAriaHidden:!0})},t.prototype.getScrollPosition=function(){return Yr(this.getViewport(),this.enableRtl)},t.prototype.setScrollPosition=function(e){Te(this.getViewport())||this.attemptSettingScrollPosition(e),qr(this.getViewport(),e,this.enableRtl)},t.TEMPLATE=`<div class="ag-body-horizontal-scroll" aria-hidden="true">
|
||
<div class="ag-horizontal-left-spacer" ref="eLeftSpacer"></div>
|
||
<div class="ag-body-horizontal-scroll-viewport" ref="eViewport">
|
||
<div class="ag-body-horizontal-scroll-container" ref="eContainer"></div>
|
||
</div>
|
||
<div class="ag-horizontal-right-spacer" ref="eRightSpacer"></div>
|
||
</div>`,Oi([L("eLeftSpacer")],t.prototype,"eLeftSpacer",void 0),Oi([L("eRightSpacer")],t.prototype,"eRightSpacer",void 0),Oi([f("columnModel")],t.prototype,"columnModel",void 0),Oi([f("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),Oi([b],t.prototype,"postConstruct",null),t}(zu),iS=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Qs=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},oS=function(n){iS(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.postConstruct=function(){var e=this.checkContainerWidths.bind(this);this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedPropertyListener("domLayout",e)},t.prototype.checkContainerWidths=function(){var e=this.gridOptionsService.isDomLayout("print"),r=e?0:this.columnModel.getDisplayedColumnsLeftWidth(),i=e?0:this.columnModel.getDisplayedColumnsRightWidth();r!=this.leftWidth&&(this.leftWidth=r,this.eventService.dispatchEvent({type:g.EVENT_LEFT_PINNED_WIDTH_CHANGED})),i!=this.rightWidth&&(this.rightWidth=i,this.eventService.dispatchEvent({type:g.EVENT_RIGHT_PINNED_WIDTH_CHANGED}))},t.prototype.getPinnedRightWidth=function(){return this.rightWidth},t.prototype.getPinnedLeftWidth=function(){return this.leftWidth},Qs([f("columnModel")],t.prototype,"columnModel",void 0),Qs([b],t.prototype,"postConstruct",null),t=Qs([I("pinnedWidthService")],t),t}(D),nS=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Wo=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},sS=function(n){nS(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.events=[],e}return t.prototype.postConstruct=function(){this.rowModel.getType()=="clientSide"&&(this.clientSideRowModel=this.rowModel)},t.prototype.dispatchExpanded=function(e){var r=this;if(this.clientSideRowModel==null){this.eventService.dispatchEvent(e);return}this.events.push(e);var i=function(){r.clientSideRowModel&&r.clientSideRowModel.onRowGroupOpened(),r.events.forEach(function(o){return r.eventService.dispatchEvent(o)}),r.events=[]};this.dispatchExpandedDebounced==null&&(this.dispatchExpandedDebounced=this.animationFrameService.debounce(i)),this.dispatchExpandedDebounced()},Wo([f("animationFrameService")],t.prototype,"animationFrameService",void 0),Wo([f("rowModel")],t.prototype,"rowModel",void 0),Wo([b],t.prototype,"postConstruct",null),t=Wo([I("rowNodeEventThrottle")],t),t}(D),aS={},Kt=function(n,t){var e;return((e=t.rowModelType)!==null&&e!==void 0?e:"clientSide")==="clientSide"?{module:M.RowGroupingModule}:null},lS={enableRowGroup:Kt,rowGroup:Kt,rowGroupIndex:Kt,enablePivot:Kt,enableValue:Kt,pivot:Kt,pivotIndex:Kt,aggFunc:Kt,cellEditor:function(n){return n.cellEditor==="agRichSelect"||n.cellEditor==="agRichSelectCellEditor"?{module:M.RichSelectModule}:null},menuTabs:function(n){var t,e=["columnsMenuTab","generalMenuTab"];return!((t=n.menuTabs)===null||t===void 0)&&t.some(function(r){return e.includes(r)})?{module:M.MenuModule}:null},columnsMenuParams:{module:[M.MenuModule,M.ColumnsToolPanelModule]},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],dependencies:function(n,t){var e=t.rowSelection;return e==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"}},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],dependencies:function(n,t){var e=t.rowSelection;return e==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"}},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],dependencies:function(n,t){var e=t.rowSelection;return e==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"}},children:function(){return Hr}},Hr={objectName:"colDef",allProperties:df.ALL_PROPERTIES,docsUrl:"column-properties/",deprecations:aS,validations:lS},$u=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},Ku=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},uS={enableChartToolPanelsButton:{version:"29",message:"The Chart Tool Panels button is now enabled by default. To hide the Chart Tool Panels button and display the hamburger button instead, set suppressChartToolPanelsButton=true."},functionsPassive:{version:"29.2"},onColumnRowGroupChangeRequest:{version:"29.2"},onColumnPivotChangeRequest:{version:"29.2"},onColumnValueChangeRequest:{version:"29.2"},onColumnAggFuncChangeRequest:{version:"29.2"},serverSideFilterAllLevels:{version:"30",message:"All server-side group levels are now filtered by default. This can be toggled using `serverSideOnlyRefreshFilteredGroups`."},suppressAggAtRootLevel:{version:"30",message:"The root level aggregation is now suppressed by default. This can be toggled using `alwaysAggregateAtRootLevel`."},excludeHiddenColumnsFromQuickFilter:{version:"30",message:"Hidden columns are now excluded from the Quick Filter by default. This can be toggled using `includeHiddenColumnsInQuickFilter`."},enterMovesDown:{version:"30",renamed:"enterNavigatesVertically"},enterMovesDownAfterEdit:{version:"30",renamed:"enterNavigatesVerticallyAfterEdit"},suppressParentsInRowNodes:{version:"30.2",message:"Using suppressParentsInRowNodes is no longer recommended. To serialize nodes it is now recommended to instead remove the parent node reference before serialization."},advancedFilterModel:{version:"31",message:"Use `initialState.filter.advancedFilterModel` instead."},suppressAsyncEvents:{version:"31",message:"Events should be handled asynchronously."}},cS={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!1,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,suppressChartToolPanelsButton:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressAsyncEvents:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,enableCellChangeFlash:!1,cellFlashDelay:500,cellFadeDelay:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupIncludeTotalFooter:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,suppressServerSideInfiniteScroll:!1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSideSortOnServer:!1,serverSideFilterOnServer:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,suppressGroupMaintainValueType:!1,functionsPassive:!1,groupLockGroupColumns:0},pS={sideBar:{module:M.SideBarModule},statusBar:{module:M.StatusBarModule},enableCharts:{module:M.GridChartsModule},getMainMenuItems:{module:M.MenuModule},getContextMenuItems:{module:M.MenuModule},allowContextMenuWithControlKey:{module:M.MenuModule},enableAdvancedFilter:{module:M.AdvancedFilterModule},treeData:{supportedRowModels:["clientSide","serverSide"],module:M.RowGroupingModule,dependencies:function(n){var t,e=(t=n.rowModelType)!==null&&t!==void 0?t:"clientSide";switch(e){case"clientSide":var r="treeData requires 'getDataPath' in the ".concat(e," row model.");return n.getDataPath?null:r;case"serverSide":var i="treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ".concat(e," row model.");return n.isServerSideGroup&&n.getServerSideGroupKey?null:i}return null}},masterDetail:{module:M.MasterDetailModule},enableRangeSelection:{module:M.RangeSelectionModule},enableRangeHandle:{dependencies:{enableRangeSelection:[!0]}},enableFillHandle:{dependencies:{enableRangeSelection:[!0]}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupIncludeFooter:{supportedRowModels:["clientSide","serverSide"],dependencies:function(n){var t,e=(t=n.rowModelType)!==null&&t!==void 0?t:"clientSide";switch(e){case"clientSide":return null;case"serverSide":var r="groupIncludeFooter is not supported alongside suppressServerSideInfiniteScroll";return n.suppressServerSideInfiniteScroll?r:null}return null}},groupIncludeTotalFooter:{supportedRowModels:["clientSide"]},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveLowestSingleChildren:[void 0,!1]}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveSingleChildren:[void 0,!1]}},groupSelectsChildren:{dependencies:{rowSelection:["multiple"]}},suppressParentsInRowNodes:{dependencies:{groupSelectsChildren:[void 0,!1]}},viewportDatasource:{supportedRowModels:["viewport"],module:M.ViewportRowModelModule},serverSideDatasource:{supportedRowModels:["serverSide"],module:M.ServerSideRowModelModule},cacheBlockSize:{supportedRowModels:["serverSide","infinite"]},datasource:{supportedRowModels:["infinite"],module:M.InfiniteRowModelModule},rowData:{supportedRowModels:["clientSide"],module:M.ClientSideRowModelModule},columnDefs:function(){return Hr},defaultColDef:function(){return Hr},defaultColGroupDef:function(){return Hr},autoGroupColumnDef:function(){return Hr}},dS={objectName:"gridOptions",allProperties:Ku(Ku([],$u(ht.ALL_PROPERTIES),!1),$u(Ga.EVENT_CALLBACKS),!1),propertyExceptions:["api","columnApi"],docsUrl:"grid-options/",deprecations:uS,validations:pS},Pt=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},jo=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},Xs=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},Yu=function(){function n(){var e=this;this.destroyed=!1,this.domDataKey="__AG_"+Math.random().toString(),this.propertyEventService=new Lt,this.globalEventHandlerFactory=function(r){return function(i,o){if(!e.destroyed){var s=t.alwaysSyncGlobalEvents.has(i);if(!(s&&!r||!s&&r)){var a=Ga.getCallbackForEvent(i);typeof e.gridOptions[a]=="function"&&e.gridOptions[a](o)}}}}}t=n,Object.defineProperty(n.prototype,"context",{get:function(){return this.gridOptions.context},enumerable:!1,configurable:!0}),n.prototype.init=function(){this.columnApi=new Mu(this.api);var e=!this.get("suppressAsyncEvents");this.eventService.addGlobalListener(this.globalEventHandlerFactory().bind(this),e),this.eventService.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.getScrollbarWidth()},n.prototype.destroy=function(){this.destroyed=!0,this.columnApi=void 0},n.prototype.get=function(e){var r;return(r=this.gridOptions[e])!==null&&r!==void 0?r:cS[e]},n.prototype.getCallback=function(e){return this.mergeGridCommonParams(this.gridOptions[e])},n.prototype.exists=function(e){return P(this.gridOptions[e])},n.prototype.mergeGridCommonParams=function(e){var r=this;if(e){var i=function(o){var s=o;return s.api=r.api,s.columnApi=r.columnApi,s.context=r.context,e(s)};return i}return e},n.toBoolean=function(e){return typeof e=="boolean"?e:typeof e=="string"?e.toUpperCase()==="TRUE"||e=="":!1},n.toNumber=function(e){if(typeof e=="number")return e;if(typeof e=="string"){var r=parseInt(e);return isNaN(r)?void 0:r}},n.toConstrainedNum=function(e,r){return function(i){var o=t.toNumber(i);if(!(o==null||o<e||o>r))return o}},n.getCoercedValue=function(e,r){var i=t.PROPERTY_COERCIONS.get(e);return i?i(r):r},n.getCoercedGridOptions=function(e){var r={};return Object.entries(e).forEach(function(i){var o=jo(i,2),s=o[0],a=o[1],l=t.getCoercedValue(s,a);r[s]=l}),r},n.prototype.updateGridOptions=function(e){var r=this,i=e.options,o=e.source,s=o===void 0?"api":o,a={id:t.changeSetId++,properties:[]},l=[];Object.entries(i).forEach(function(u){var c=jo(u,2),p=c[0],d=c[1];s==="api"&&wp[p]&&B("".concat(p," is an initial property and cannot be updated."));var h=t.getCoercedValue(p,d),v=typeof h=="object"&&s==="api",y=r.gridOptions[p];if(v||y!==h){r.gridOptions[p]=h;var C={type:p,currentValue:h,previousValue:y,changeSet:a,source:s};l.push(C)}}),this.validationService.processGridOptions(this.gridOptions),a.properties=l.map(function(u){return u.type}),l.forEach(function(u){r.gridOptions.debug&&console.log("AG Grid: Updated property ".concat(u.type," from ").concat(String(u.previousValue)," to ").concat(String(u.currentValue),".")),r.propertyEventService.dispatchEvent(u)})},n.prototype.addEventListener=function(e,r){this.propertyEventService.addEventListener(e,r)},n.prototype.removeEventListener=function(e,r){this.propertyEventService.removeEventListener(e,r)},n.prototype.getGridId=function(){return this.api.getGridId()},n.prototype.getScrollbarWidth=function(){if(this.scrollbarWidth==null){var e=typeof this.gridOptions.scrollbarWidth=="number"&&this.gridOptions.scrollbarWidth>=0,r=e?this.gridOptions.scrollbarWidth:tl();r!=null&&(this.scrollbarWidth=r,this.eventService.dispatchEvent({type:g.EVENT_SCROLLBAR_WIDTH_CHANGED}))}return this.scrollbarWidth},n.prototype.isRowModelType=function(e){return this.gridOptions.rowModelType===e||e==="clientSide"&&V(this.gridOptions.rowModelType)},n.prototype.isDomLayout=function(e){var r,i=(r=this.gridOptions.domLayout)!==null&&r!==void 0?r:"normal";return i===e},n.prototype.isRowSelection=function(){return this.gridOptions.rowSelection==="single"||this.gridOptions.rowSelection==="multiple"},n.prototype.useAsyncEvents=function(){return!this.get("suppressAsyncEvents")},n.prototype.isGetRowHeightFunction=function(){return typeof this.gridOptions.getRowHeight=="function"},n.prototype.getRowHeightForNode=function(e,r,i){if(r===void 0&&(r=!1),i==null&&(i=this.environment.getDefaultRowHeight()),this.isGetRowHeightFunction()){if(r)return{height:i,estimated:!0};var o={node:e,data:e.data},s=this.getCallback("getRowHeight")(o);if(this.isNumeric(s))return s===0&&B("The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),{height:Math.max(1,s),estimated:!1}}if(e.detail&&this.get("masterDetail"))return this.getMasterDetailRowHeight();var a=this.gridOptions.rowHeight&&this.isNumeric(this.gridOptions.rowHeight)?this.gridOptions.rowHeight:i;return{height:a,estimated:!1}},n.prototype.getMasterDetailRowHeight=function(){return this.get("detailRowAutoHeight")?{height:1,estimated:!1}:this.isNumeric(this.gridOptions.detailRowHeight)?{height:this.gridOptions.detailRowHeight,estimated:!1}:{height:300,estimated:!1}},n.prototype.getRowHeightAsNumber=function(){if(!this.gridOptions.rowHeight||V(this.gridOptions.rowHeight))return this.environment.getDefaultRowHeight();var e=this.environment.refreshRowHeightVariable();return e!==-1?e:(console.warn("AG Grid row height must be a number if not using standard row model"),this.environment.getDefaultRowHeight())},n.prototype.isNumeric=function(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)},n.prototype.getDomDataKey=function(){return this.domDataKey},n.prototype.getDomData=function(e,r){var i=e[this.getDomDataKey()];return i?i[r]:void 0},n.prototype.setDomData=function(e,r,i){var o=this.getDomDataKey(),s=e[o];V(s)&&(s={},e[o]=s),s[r]=i},n.prototype.getDocument=function(){var e=null;return this.gridOptions.getDocument&&P(this.gridOptions.getDocument)?e=this.gridOptions.getDocument():this.eGridDiv&&(e=this.eGridDiv.ownerDocument),e&&P(e)?e:document},n.prototype.getWindow=function(){var e=this.getDocument();return e.defaultView||window},n.prototype.getRootNode=function(){return this.eGridDiv.getRootNode()},n.prototype.getAsyncTransactionWaitMillis=function(){return P(this.gridOptions.asyncTransactionWaitMillis)?this.gridOptions.asyncTransactionWaitMillis:50},n.prototype.isAnimateRows=function(){return this.get("ensureDomOrder")?!1:this.get("animateRows")},n.prototype.isGroupRowsSticky=function(){return!(this.get("suppressGroupRowsSticky")||this.get("paginateChildRows")||this.get("groupHideOpenParents"))},n.prototype.isColumnsSortingCoupledToGroup=function(){var e=this.gridOptions.autoGroupColumnDef;return!(e!=null&&e.comparator)&&!this.get("treeData")},n.prototype.getGroupAggFiltering=function(){var e=this.gridOptions.groupAggFiltering;if(typeof e=="function")return this.getCallback("groupAggFiltering");if(e===!0)return function(){return!0}},n.prototype.isGroupIncludeFooterTrueOrCallback=function(){var e=this.gridOptions.groupIncludeFooter;return e===!0||typeof e=="function"},n.prototype.getGroupIncludeFooter=function(){var e=this.gridOptions.groupIncludeFooter;return typeof e=="function"?this.getCallback("groupIncludeFooter"):e===!0?function(){return!0}:function(){return!1}},n.prototype.isGroupMultiAutoColumn=function(){return this.gridOptions.groupDisplayType?this.gridOptions.groupDisplayType==="multipleColumns":this.get("groupHideOpenParents")},n.prototype.isGroupUseEntireRow=function(e){return e?!1:this.gridOptions.groupDisplayType==="groupRows"};var t;return n.alwaysSyncGlobalEvents=new Set([g.EVENT_GRID_PRE_DESTROYED]),n.PROPERTY_COERCIONS=new Map(Xs(Xs(Xs([],jo(ht.BOOLEAN_PROPERTIES.map(function(e){return[e,t.toBoolean]})),!1),jo(ht.NUMBER_PROPERTIES.map(function(e){return[e,t.toNumber]})),!1),[["groupAggFiltering",function(e){return typeof e=="function"?e:t.toBoolean(e)}],["pageSize",t.toConstrainedNum(1,Number.MAX_VALUE)],["autoSizePadding",t.toConstrainedNum(0,Number.MAX_VALUE)],["keepDetailRowsCount",t.toConstrainedNum(1,Number.MAX_VALUE)],["rowBuffer",t.toConstrainedNum(0,Number.MAX_VALUE)],["infiniteInitialRowCount",t.toConstrainedNum(1,Number.MAX_VALUE)],["cacheOverflowSize",t.toConstrainedNum(1,Number.MAX_VALUE)],["cacheBlockSize",t.toConstrainedNum(1,Number.MAX_VALUE)],["serverSideInitialRowCount",t.toConstrainedNum(1,Number.MAX_VALUE)],["viewportRowModelPageSize",t.toConstrainedNum(1,Number.MAX_VALUE)],["viewportRowModelBufferSize",t.toConstrainedNum(0,Number.MAX_VALUE)]],!1)),n.changeSetId=0,Pt([f("gridOptions")],n.prototype,"gridOptions",void 0),Pt([f("eventService")],n.prototype,"eventService",void 0),Pt([f("environment")],n.prototype,"environment",void 0),Pt([f("eGridDiv")],n.prototype,"eGridDiv",void 0),Pt([f("validationService")],n.prototype,"validationService",void 0),Pt([f("gridApi")],n.prototype,"api",void 0),Pt([b],n.prototype,"init",null),Pt([Se],n.prototype,"destroy",null),n=t=Pt([I("gridOptionsService")],n),n}(),hS=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),fS=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},vS=function(n){hS(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.getLocaleTextFunc=function(){var e=this.gridOptionsService.getCallback("getLocaleText");if(e)return function(i,o,s){var a={key:i,defaultValue:o,variableValues:s};return e(a)};var r=this.gridOptionsService.get("localeText");return function(i,o,s){var a=r&&r[i];if(a&&s&&s.length)for(var l=0;!(l>=s.length);){var u=a.indexOf("${variable}");if(u===-1)break;a=a.replace("${variable}",s[l++])}return a??o}},t=fS([I("localeService")],t),t}(D),gS=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),yS=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},CS=function(n){gS(t,n);function t(){return n.call(this,t.TEMPLATE,"vertical")||this}return t.prototype.postConstruct=function(){n.prototype.postConstruct.call(this),this.createManagedBean(new pu(this.eContainer)),this.ctrlsService.registerFakeVScrollComp(this),this.addManagedListener(this.eventService,g.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onRowContainerHeightChanged.bind(this))},t.prototype.setScrollVisible=function(){var e=this.scrollVisibleService.isVerticalScrollShowing(),r=this.invisibleScrollbar,i=e&&this.gridOptionsService.getScrollbarWidth()||0,o=i===0&&r?16:i;this.addOrRemoveCssClass("ag-scrollbar-invisible",r),qe(this.getGui(),o),qe(this.eViewport,o),qe(this.eContainer,o),this.setDisplayed(e,{skipAriaHidden:!0})},t.prototype.onRowContainerHeightChanged=function(){var e=this.ctrlsService.getGridBodyCtrl(),r=e.getBodyViewportElement();this.eViewport.scrollTop!=r.scrollTop&&(this.eViewport.scrollTop=r.scrollTop)},t.prototype.getScrollPosition=function(){return this.getViewport().scrollTop},t.prototype.setScrollPosition=function(e){Te(this.getViewport())||this.attemptSettingScrollPosition(e),this.getViewport().scrollTop=e},t.TEMPLATE=`<div class="ag-body-vertical-scroll" aria-hidden="true">
|
||
<div class="ag-body-vertical-scroll-viewport" ref="eViewport">
|
||
<div class="ag-body-vertical-scroll-container" ref="eContainer"></div>
|
||
</div>
|
||
</div>`,yS([b],t.prototype,"postConstruct",null),t}(zu),mS=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Fe=function(){return Fe=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Fe.apply(this,arguments)},gr=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},St=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},Ti=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},qu={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},Qu=["january","february","march","april","may","june","july","august","september","october","november","december"],SS=function(n){mS(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.dataTypeDefinitions={},e.isWaitingForRowData=!1,e.isColumnTypeOverrideInDataTypeDefinitions=!1,e.columnStateUpdatesPendingInference={},e.columnStateUpdateListenerDestroyFuncs=[],e}return t.prototype.init=function(){var e=this;this.groupHideOpenParents=this.gridOptionsService.get("groupHideOpenParents"),this.addManagedPropertyListener("groupHideOpenParents",function(){e.groupHideOpenParents=e.gridOptionsService.get("groupHideOpenParents")}),this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",function(){e.processDataTypeDefinitions(),e.columnModel.recreateColumnDefs("gridOptionsChanged")})},t.prototype.processDataTypeDefinitions=function(){var e=this,r,i=this.getDefaultDataTypes();this.dataTypeDefinitions={},Object.entries(i).forEach(function(s){var a=St(s,2),l=a[0],u=a[1];e.dataTypeDefinitions[l]=Fe(Fe({},u),{groupSafeValueFormatter:e.createGroupSafeValueFormatter(u)})});var o=(r=this.gridOptionsService.get("dataTypeDefinitions"))!==null&&r!==void 0?r:{};this.dataTypeMatchers={},Object.entries(o).forEach(function(s){var a=St(s,2),l=a[0],u=a[1],c=e.processDataTypeDefinition(u,o,[l],i);c&&(e.dataTypeDefinitions[l]=c,u.dataTypeMatcher&&(e.dataTypeMatchers[l]=u.dataTypeMatcher))}),this.checkObjectValueHandlers(i),["dateString","text","number","boolean","date"].forEach(function(s){var a=e.dataTypeMatchers[s];a&&delete e.dataTypeMatchers[s],e.dataTypeMatchers[s]=a??i[s].dataTypeMatcher})},t.prototype.mergeDataTypeDefinitions=function(e,r){var i=Fe(Fe({},e),r);return e.columnTypes&&r.columnTypes&&r.appendColumnTypes&&(i.columnTypes=Ti(Ti([],St(this.convertColumnTypes(e.columnTypes)),!1),St(this.convertColumnTypes(r.columnTypes)),!1)),i},t.prototype.processDataTypeDefinition=function(e,r,i,o){var s,a=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){var l=o[a],u=r[a];if(l&&u&&(l=u),!this.validateDataTypeDefinition(e,l,a))return;s=this.mergeDataTypeDefinitions(l,e)}else{if(i.includes(a)){B('Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.');return}var c=r[a];if(!this.validateDataTypeDefinition(e,c,a))return;var p=this.processDataTypeDefinition(c,r,Ti(Ti([],St(i),!1),[a],!1),o);if(!p)return;s=this.mergeDataTypeDefinitions(p,e)}return Fe(Fe({},s),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(s)})},t.prototype.validateDataTypeDefinition=function(e,r,i){return r?r.baseDataType!==e.baseDataType?(B('The "baseDataType" property of a data type definition must match that of its parent.'),!1):!0:(B("The data type definition ".concat(i," does not exist.")),!1)},t.prototype.createGroupSafeValueFormatter=function(e){var r=this;if(e.valueFormatter)return function(i){var o,s;if(!((o=i.node)===null||o===void 0)&&o.group){var a=i.column.getAggFunc();if(a){if(a==="first"||a==="last")return e.valueFormatter(i);if(e.baseDataType==="number"&&a!=="count"){if(typeof i.value=="number")return e.valueFormatter(i);if(typeof i.value=="object"){if(!i.value)return;if("toNumber"in i.value)return e.valueFormatter(Fe(Fe({},i),{value:i.value.toNumber()}));if("value"in i.value)return e.valueFormatter(Fe(Fe({},i),{value:i.value.value}))}}}if(!r.gridOptionsService.get("suppressGroupMaintainValueType"))return}else if(r.groupHideOpenParents&&i.column.isRowGroupActive()){if(typeof i.value!="string"||!((s=e.dataTypeMatcher)===null||s===void 0)&&s.call(e,i.value))return e.valueFormatter(i);if(!r.gridOptionsService.get("suppressGroupMaintainValueType"))return}return e.valueFormatter(i)}},t.prototype.updateColDefAndGetDataTypeDefinitionColumnType=function(e,r,i){var o=r.cellDataType,s=r.field;if(o===void 0&&(o=e.cellDataType),(o==null||o===!0)&&(o=this.canInferCellDataType(e,r)?this.inferCellDataType(s,i):!1),!o){e.cellDataType=!1;return}var a=this.dataTypeDefinitions[o];if(!a){B('Missing data type definition - "'.concat(o,'"'));return}return e.cellDataType=o,a.groupSafeValueFormatter&&(e.valueFormatter=a.groupSafeValueFormatter),a.valueParser&&(e.valueParser=a.valueParser),a.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,a,i),a.columnTypes},t.prototype.updateColDefAndGetColumnType=function(e,r,i){var o,s,a=this.updateColDefAndGetDataTypeDefinitionColumnType(e,r,i),l=(s=(o=r.type)!==null&&o!==void 0?o:a)!==null&&s!==void 0?s:e.type;return e.type=l,l?this.convertColumnTypes(l):void 0},t.prototype.addColumnListeners=function(e){if(this.isWaitingForRowData){var r=this.columnStateUpdatesPendingInference[e.getColId()];if(r){var i=function(o){r.add(o.key)};e.addEventListener(Z.EVENT_STATE_UPDATED,i),this.columnStateUpdateListenerDestroyFuncs.push(function(){return e.removeEventListener(Z.EVENT_STATE_UPDATED,i)})}}},t.prototype.canInferCellDataType=function(e,r){var i=this,o;if(this.rowModel.getType()!=="clientSide")return!1;var s={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(this.doColDefPropsPreventInference(r,s))return!1;var a=r.type===null?e.type:r.type;if(a){var l=(o=this.gridOptionsService.get("columnTypes"))!==null&&o!==void 0?o:{},u=this.convertColumnTypes(a).some(function(c){var p=l[c.trim()];return p&&i.doColDefPropsPreventInference(p,s)});if(u)return!1}return!this.doColDefPropsPreventInference(e,s)},t.prototype.doColDefPropsPreventInference=function(e,r){var i=this;return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(function(o){var s=St(o,2),a=s[0],l=s[1];return i.doesColDefPropPreventInference(e,r,a,l)})},t.prototype.doesColDefPropPreventInference=function(e,r,i,o){if(!r[i])return!1;var s=e[i];return s===null?(r[i]=!1,!1):o===void 0?!!s:s===o},t.prototype.inferCellDataType=function(e,r){var i;if(e){var o,s=this.getInitialData();if(s){var a=e.indexOf(".")>=0&&!this.gridOptionsService.get("suppressFieldDotNotation");o=Sr(s,e,a)}else this.initWaitForRowData(r);if(o!=null){var l=St((i=Object.entries(this.dataTypeMatchers).find(function(c){var p=St(c,2);p[0];var d=p[1];return d(o)}))!==null&&i!==void 0?i:["object"],1),u=l[0];return u}}},t.prototype.getInitialData=function(){var e=this.gridOptionsService.get("rowData");if(e!=null&&e.length)return e[0];if(this.initialData)return this.initialData;var r=this.rowModel.getRootNode().allLeafChildren;return r!=null&&r.length?r[0].data:null},t.prototype.initWaitForRowData=function(e){var r=this;if(this.columnStateUpdatesPendingInference[e]=new Set,!this.isWaitingForRowData){this.isWaitingForRowData=!0;var i=this.isColumnTypeOverrideInDataTypeDefinitions;i&&this.columnModel.queueResizeOperations();var o=this.addManagedListener(this.eventService,g.EVENT_ROW_DATA_UPDATE_STARTED,function(s){var a=s.firstRowData;if(a){o==null||o(),r.isWaitingForRowData=!1,r.processColumnsPendingInference(a,i),r.columnStateUpdatesPendingInference={},i&&r.columnModel.processResizeOperations();var l={type:g.EVENT_DATA_TYPES_INFERRED};r.eventService.dispatchEvent(l)}})}},t.prototype.isPendingInference=function(){return this.isWaitingForRowData},t.prototype.processColumnsPendingInference=function(e,r){var i=this;this.initialData=e;var o=[];this.columnStateUpdateListenerDestroyFuncs.forEach(function(l){return l()}),this.columnStateUpdateListenerDestroyFuncs=[];var s={},a={};Object.entries(this.columnStateUpdatesPendingInference).forEach(function(l){var u=St(l,2),c=u[0],p=u[1],d=i.columnModel.getGridColumn(c);if(d){var h=d.getColDef();if(i.columnModel.resetColumnDefIntoColumn(d,"cellDataTypeInferred")){var v=d.getColDef();if(r&&v.type&&v.type!==h.type){var y=i.getUpdatedColumnState(d,p);y.rowGroup&&y.rowGroupIndex==null&&(s[c]=y),y.pivot&&y.pivotIndex==null&&(a[c]=y),o.push(y)}}}}),r&&o.push.apply(o,Ti([],St(this.columnModel.generateColumnStateForRowGroupAndPivotIndexes(s,a)),!1)),o.length&&this.columnModel.applyColumnState({state:o},"cellDataTypeInferred"),this.initialData=null},t.prototype.getUpdatedColumnState=function(e,r){var i=this.columnModel.getColumnStateFromColDef(e);return r.forEach(function(o){delete i[o],o==="rowGroup"?delete i.rowGroupIndex:o==="pivot"&&delete i.pivotIndex}),i},t.prototype.checkObjectValueHandlers=function(e){var r=this.dataTypeDefinitions.object,i=e.object;this.hasObjectValueParser=r.valueParser!==i.valueParser,this.hasObjectValueFormatter=r.valueFormatter!==i.valueFormatter},t.prototype.convertColumnTypes=function(e){var r=[];if(e instanceof Array){var i=e.some(function(o){return typeof o!="string"});i?console.warn("if colDef.type is supplied an array it should be of type 'string[]'"):r=e}else typeof e=="string"?r=e.split(","):console.warn("colDef.type should be of type 'string' | 'string[]'");return r},t.prototype.getDateStringTypeDefinition=function(){return this.dataTypeDefinitions.dateString},t.prototype.getDateParserFunction=function(){return this.getDateStringTypeDefinition().dateParser},t.prototype.getDateFormatterFunction=function(){return this.getDateStringTypeDefinition().dateFormatter},t.prototype.getDataTypeDefinition=function(e){var r=e.getColDef();if(r.cellDataType)return this.dataTypeDefinitions[r.cellDataType]},t.prototype.getBaseDataType=function(e){var r;return(r=this.getDataTypeDefinition(e))===null||r===void 0?void 0:r.baseDataType},t.prototype.checkType=function(e,r){var i;if(r==null)return!0;var o=(i=this.getDataTypeDefinition(e))===null||i===void 0?void 0:i.dataTypeMatcher;return o?o(r):!0},t.prototype.validateColDef=function(e){e.cellDataType==="object"&&(e.valueFormatter===this.dataTypeDefinitions.object.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&B('Cell data type is "object" but no value formatter has been provided. Please either provide an object data type definition with a value formatter, or set "colDef.valueFormatter"'),e.editable&&e.valueParser===this.dataTypeDefinitions.object.valueParser&&!this.hasObjectValueParser&&B('Cell data type is "object" but no value parser has been provided. Please either provide an object data type definition with a value parser, or set "colDef.valueParser"'))},t.prototype.setColDefPropertiesForBaseDataType=function(e,r,i){var o=this,s=function(p,d,h){var v=p.getColDef().valueFormatter;return v===r.groupSafeValueFormatter&&(v=r.valueFormatter),o.valueFormatterService.formatValue(p,d,h,v)},a=k.__isRegistered(M.SetFilterModule,this.context.getGridId()),l=this.localeService.getLocaleTextFunc(),u=function(p){var d=e.filterParams;e.filterParams=typeof d=="object"?Fe(Fe({},d),p):p};switch(r.baseDataType){case"number":{e.cellEditor="agNumberCellEditor",a&&u({comparator:function(p,d){var h=p==null?0:parseInt(p),v=d==null?0:parseInt(d);return h===v?0:h>v?1:-1}});break}case"boolean":{e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.suppressKeyboardEvent=function(p){return!!p.colDef.editable&&p.event.key===_.SPACE},u(a?{valueFormatter:function(p){return P(p.value)?l(String(p.value),p.value?"True":"False"):l("blanks","(Blanks)")}}:{maxNumConditions:1,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:function(p,d){return d},numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:function(p,d){return d===!1},numberOfInputs:0}]});break}case"date":{e.cellEditor="agDateCellEditor",e.keyCreator=function(p){return s(p.column,p.node,p.value)},a&&u({valueFormatter:function(p){var d=s(p.column,p.node,p.value);return P(d)?d:l("blanks","(Blanks)")},treeList:!0,treeListFormatter:function(p,d){if(d===1&&p!=null){var h=Qu[Number(p)-1];return l(h,qu[h])}return p??l("blanks","(Blanks)")}});break}case"dateString":{e.cellEditor="agDateStringCellEditor",e.keyCreator=function(p){return s(p.column,p.node,p.value)};var c=this.getDateParserFunction();u(a?{valueFormatter:function(p){var d=s(p.column,p.node,p.value);return P(d)?d:l("blanks","(Blanks)")},treeList:!0,treeListPathGetter:function(p){var d=c(p??void 0);return d?[String(d.getFullYear()),String(d.getMonth()+1),String(d.getDate())]:null},treeListFormatter:function(p,d){if(d===1&&p!=null){var h=Qu[Number(p)-1];return l(h,qu[h])}return p??l("blanks","(Blanks)")}}:{comparator:function(p,d){var h=c(d);return d==null||h<p?-1:h>p?1:0}});break}case"object":{e.cellEditorParams={useFormatter:!0},e.comparator=function(p,d){var h=o.columnModel.getPrimaryColumn(i),v=h==null?void 0:h.getColDef();if(!h||!v)return 0;var y=p==null?"":s(h,null,p),C=d==null?"":s(h,null,d);return y===C?0:y>C?1:-1},e.keyCreator=function(p){return s(p.column,p.node,p.value)},a?u({valueFormatter:function(p){var d=s(p.column,p.node,p.value);return P(d)?d:l("blanks","(Blanks)")}}):e.filterValueGetter=function(p){return s(p.column,p.node,o.valueService.getValue(p.column,p.node))};break}}},t.prototype.getDefaultDataTypes=function(){var e=function(i){return!!i.match("^\\d{4}-\\d{2}-\\d{2}$")},r=this.localeService.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:function(i){return i.newValue===""?null:Number(i.newValue)},valueFormatter:function(i){return i.value==null?"":typeof i.value!="number"||isNaN(i.value)?(console.log("was",typeof i.value,i.value,i),r("invalidNumber","Invalid Number")):String(i.value)},dataTypeMatcher:function(i){return typeof i=="number"}},text:{baseDataType:"text",valueParser:function(i){return i.newValue===""?null:kr(i.newValue)},dataTypeMatcher:function(i){return typeof i=="string"}},boolean:{baseDataType:"boolean",valueParser:function(i){return i.newValue==null?i.newValue:i.newValue===""?null:String(i.newValue).toLowerCase()==="true"},valueFormatter:function(i){return i.value==null?"":String(i.value)},dataTypeMatcher:function(i){return typeof i=="boolean"}},date:{baseDataType:"date",valueParser:function(i){return Oe(i.newValue==null?null:String(i.newValue))},valueFormatter:function(i){var o;return i.value==null?"":!(i.value instanceof Date)||isNaN(i.value.getTime())?r("invalidDate","Invalid Date"):(o=Ye(i.value,!1))!==null&&o!==void 0?o:""},dataTypeMatcher:function(i){return i instanceof Date}},dateString:{baseDataType:"dateString",dateParser:function(i){var o;return(o=Oe(i))!==null&&o!==void 0?o:void 0},dateFormatter:function(i){var o;return(o=Ye(i??null,!1))!==null&&o!==void 0?o:void 0},valueParser:function(i){return e(String(i.newValue))?i.newValue:null},valueFormatter:function(i){return e(String(i.value))?i.value:""},dataTypeMatcher:function(i){return typeof i=="string"&&e(i)}},object:{baseDataType:"object",valueParser:function(){return null},valueFormatter:function(i){var o;return(o=kr(i.value))!==null&&o!==void 0?o:""}}}},gr([f("rowModel")],t.prototype,"rowModel",void 0),gr([f("columnModel")],t.prototype,"columnModel",void 0),gr([f("columnUtils")],t.prototype,"columnUtils",void 0),gr([f("valueService")],t.prototype,"valueService",void 0),gr([f("valueFormatterService")],t.prototype,"valueFormatterService",void 0),gr([b],t.prototype,"init",null),t=gr([I("dataTypeService")],t),t}(D),wS=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Xu=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},ES=function(n){wS(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.parseValue=function(e,r,i,o){var s=e.getColDef(),a={node:r,data:r==null?void 0:r.data,oldValue:o,newValue:i,colDef:s,column:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context},l=s.valueParser;return P(l)?typeof l=="function"?l(a):this.expressionService.evaluate(l,a):i},Xu([f("expressionService")],t.prototype,"expressionService",void 0),t=Xu([I("valueParserService")],t),t}(D),_S=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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 i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},RS=function(n){_S(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.waitingForColumns=!1,e}return t.prototype.postConstruct=function(){var e=this;this.addManagedPropertyListener("columnDefs",function(r){return e.setColumnDefs(r)})},t.prototype.start=function(){var e=this;this.ctrlsService.whenReady(function(){var r=e.gridOptionsService.get("columnDefs");r?e.setColumnsAndData(r):e.waitingForColumns=!0,e.gridReady()})},t.prototype.setColumnsAndData=function(e){this.columnModel.setColumnDefs(e??[],"gridInitializing"),this.rowModel.start()},t.prototype.gridReady=function(){var e=this;this.dispatchGridReadyEvent();var r=k.__isRegistered(M.EnterpriseCoreModule,this.context.getGridId()),i=new Gs("AG Grid",function(){return e.gridOptionsService.get("debug")});i.log("initialised successfully, enterprise = ".concat(r))},t.prototype.dispatchGridReadyEvent=function(){var e={type:g.EVENT_GRID_READY};this.eventService.dispatchEvent(e)},t.prototype.setColumnDefs=function(e){var r,i=this.gridOptionsService.get("columnDefs");if(i){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(i);return}var o=(r=e.source)!==null&&r!==void 0?r:"api";this.columnModel.setColumnDefs(i,o)}},Pi([f("ctrlsService")],t.prototype,"ctrlsService",void 0),Pi([f("columnModel")],t.prototype,"columnModel",void 0),Pi([f("rowModel")],t.prototype,"rowModel",void 0),Pi([b],t.prototype,"postConstruct",null),t=Pi([I("syncService")],t),t}(D),OS=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Di=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},TS=function(n){OS(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.manuallyDisplayed=!1,e}return t.prototype.postConstruct=function(){var e=this;this.addManagedListener(this.eventService,g.EVENT_ROW_DATA_UPDATED,function(){return e.onRowDataUpdated()}),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,function(){return e.onNewColumnsLoaded()})},t.prototype.registerOverlayWrapperComp=function(e){this.overlayWrapperComp=e,(!this.gridOptionsService.get("columnDefs")||this.gridOptionsService.isRowModelType("clientSide")&&!this.gridOptionsService.get("rowData"))&&this.showLoadingOverlay()},t.prototype.showLoadingOverlay=function(){if(!this.gridOptionsService.get("suppressLoadingOverlay")){var e={},r=this.userComponentFactory.getLoadingOverlayCompDetails(e);this.showOverlay(r,"ag-overlay-loading-wrapper")}},t.prototype.showNoRowsOverlay=function(){if(!this.gridOptionsService.get("suppressNoRowsOverlay")){var e={},r=this.userComponentFactory.getNoRowsOverlayCompDetails(e);this.showOverlay(r,"ag-overlay-no-rows-wrapper")}},t.prototype.showOverlay=function(e,r){var i=e.newAgStackInstance();this.manuallyDisplayed=this.columnModel.isReady()&&!this.paginationProxy.isEmpty(),this.overlayWrapperComp.showOverlay(i,r)},t.prototype.hideOverlay=function(){this.manuallyDisplayed=!1,this.overlayWrapperComp.hideOverlay()},t.prototype.showOrHideOverlay=function(){var e=this.paginationProxy.isEmpty(),r=this.gridOptionsService.get("suppressNoRowsOverlay");e&&!r?this.showNoRowsOverlay():this.hideOverlay()},t.prototype.onRowDataUpdated=function(){this.showOrHideOverlay()},t.prototype.onNewColumnsLoaded=function(){this.columnModel.isReady()&&!this.paginationProxy.isEmpty()&&!this.manuallyDisplayed&&this.hideOverlay()},Di([f("userComponentFactory")],t.prototype,"userComponentFactory",void 0),Di([f("paginationProxy")],t.prototype,"paginationProxy",void 0),Di([f("columnModel")],t.prototype,"columnModel",void 0),Di([b],t.prototype,"postConstruct",null),t=Di([I("overlayService")],t),t}(D),PS=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Yt=function(){return Yt=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Yt.apply(this,arguments)},Ze=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},DS=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},AS=function(n){PS(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.suppressEvents=!0,e.queuedUpdateSources=new Set,e.dispatchStateUpdateEventDebounced=ze(function(){return e.dispatchQueuedStateUpdateEvents()},0),e}return t.prototype.postConstruct=function(){var e=this,r;this.isClientSideRowModel=this.rowModel.getType()==="clientSide",this.cachedState=(r=this.gridOptionsService.get("initialState"))!==null&&r!==void 0?r:{},this.ctrlsService.whenReady(function(){return e.setupStateOnGridReady()});var i=this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,function(a){var l=a.source;l==="gridInitializing"&&(i==null||i(),e.setupStateOnColumnsInitialised())}),o=this.addManagedListener(this.eventService,g.EVENT_ROW_COUNT_READY,function(){o==null||o(),e.setupStateOnRowCountReady()}),s=this.addManagedListener(this.eventService,g.EVENT_FIRST_DATA_RENDERED,function(){s==null||s(),e.setupStateOnFirstDataRendered(),e.suppressEvents=!1,e.dispatchStateUpdateEvent(["gridInitializing"])})},t.prototype.getState=function(){return this.cachedState},t.prototype.setupStateOnGridReady=function(){var e=this;this.updateCachedState("sideBar",this.getSideBarState()),this.addManagedListener(this.eventService,g.EVENT_TOOL_PANEL_VISIBLE_CHANGED,function(){return e.updateCachedState("sideBar",e.getSideBarState())}),this.addManagedListener(this.eventService,g.EVENT_SIDE_BAR_UPDATED,function(){return e.updateCachedState("sideBar",e.getSideBarState())})},t.prototype.setupStateOnColumnsInitialised=function(){var e=this,r,i=(r=this.gridOptionsService.get("initialState"))!==null&&r!==void 0?r:{},o=i.filter,s=i.columnGroup;this.setColumnState(i),s&&this.setColumnGroupState(s);var a=this.gridOptionsService.get("advancedFilterModel");(o||a)&&this.setFilterState(o,a),this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState()),this.updateCachedState("filter",this.getFilterState()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VALUE_CHANGED,function(){return e.updateColumnState(["aggregation"])}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_MOVED,function(){return e.updateColumnState(["columnOrder"])}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PINNED,function(){return e.updateColumnState(["columnPinning"])}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_RESIZED,function(){return e.updateColumnState(["columnSizing"])}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VISIBLE,function(){return e.updateColumnState(["columnVisibility"])}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_CHANGED,function(){return e.updateColumnState(["pivot"])}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,function(){return e.updateColumnState(["pivot"])}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,function(){return e.updateColumnState(["rowGroup"])}),this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,function(){return e.updateColumnState(["sort"])}),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,function(){return e.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"])}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_GROUP_OPENED,function(){return e.updateCachedState("columnGroup",e.getColumnGroupState())}),this.addManagedListener(this.eventService,g.EVENT_FILTER_CHANGED,function(){return e.updateCachedState("filter",e.getFilterState())})},t.prototype.setupStateOnRowCountReady=function(){var e=this,r,i=(r=this.gridOptionsService.get("initialState"))!==null&&r!==void 0?r:{},o=i.rowGroupExpansion,s=i.rowSelection,a=i.pagination;o&&this.setRowGroupExpansionState(o),s&&this.setRowSelectionState(s),a&&this.setPaginationState(a),this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowSelection",this.getRowSelectionState()),this.updateCachedState("pagination",this.getPaginationState()),this.addManagedListener(this.eventService,g.EVENT_ROW_GROUP_OPENED,function(){return e.updateCachedState("rowGroupExpansion",e.getRowGroupExpansionState())}),this.addManagedListener(this.eventService,g.EVENT_SELECTION_CHANGED,function(){return e.updateCachedState("rowSelection",e.getRowSelectionState())}),this.addManagedListener(this.eventService,g.EVENT_PAGINATION_CHANGED,function(l){(l.newPage||l.newPageSize)&&e.updateCachedState("pagination",e.getPaginationState())})},t.prototype.setupStateOnFirstDataRendered=function(){var e=this,r,i=(r=this.gridOptionsService.get("initialState"))!==null&&r!==void 0?r:{},o=i.scroll,s=i.rangeSelection,a=i.focusedCell;a&&this.setFocusedCellState(a),s&&this.setRangeSelectionState(s),o&&this.setScrollState(o),this.updateCachedState("sideBar",this.getSideBarState()),this.updateCachedState("focusedCell",this.getFocusedCellState()),this.updateCachedState("rangeSelection",this.getRangeSelectionState()),this.updateCachedState("scroll",this.getScrollState()),this.addManagedListener(this.eventService,g.EVENT_CELL_FOCUSED,function(){return e.updateCachedState("focusedCell",e.getFocusedCellState())}),this.addManagedListener(this.eventService,g.EVENT_RANGE_SELECTION_CHANGED,function(l){l.finished&&e.updateCachedState("rangeSelection",e.getRangeSelectionState())}),this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL_END,function(){return e.updateCachedState("scroll",e.getScrollState())})},t.prototype.getColumnState=function(){for(var e=this.columnModel.isPivotMode(),r=[],i=[],o=[],s=[],a=[],l=[],u=[],c=[],p=[],d=this.columnModel.getColumnState(),h=0;h<d.length;h++){var v=d[h],y=v.colId,C=v.sort,m=v.sortIndex,w=v.rowGroup,E=v.rowGroupIndex,S=v.aggFunc,R=v.pivot,T=v.pivotIndex,F=v.pinned,A=v.hide,x=v.width,G=v.flex;p.push(y),C&&(r[m??0]={colId:y,sort:C}),w&&(i[E??0]=y),typeof S=="string"&&o.push({colId:y,aggFunc:S}),R&&(s[T??0]=y),F&&(F==="right"?l:a).push(y),A&&u.push(y),(G||x)&&c.push({colId:y,flex:G??void 0,width:x})}return{sort:r.length?{sortModel:r}:void 0,rowGroup:i.length?{groupColIds:i}:void 0,aggregation:o.length?{aggregationModel:o}:void 0,pivot:s.length||e?{pivotMode:e,pivotColIds:s}:void 0,columnPinning:a.length||l.length?{leftColIds:a,rightColIds:l}:void 0,columnVisibility:u.length?{hiddenColIds:u}:void 0,columnSizing:c.length?{columnSizingModel:c}:void 0,columnOrder:p.length?{orderedColIds:p}:void 0}},t.prototype.setColumnState=function(e){var r=e.sort,i=e.rowGroup,o=e.aggregation,s=e.pivot,a=e.columnPinning,l=e.columnVisibility,u=e.columnSizing,c=e.columnOrder,p={},d={},h=function(m){var w=p[m];return w||(w={colId:m},p[m]=w,w)};r&&(r.sortModel.forEach(function(m,w){var E=m.colId,S=m.sort,R=h(E);R.sort=S,R.sortIndex=w}),d.sort=null,d.sortIndex=null),i&&(i.groupColIds.forEach(function(m,w){var E=h(m);E.rowGroup=!0,E.rowGroupIndex=w}),d.rowGroup=null,d.rowGroupIndex=null),o&&(o.aggregationModel.forEach(function(m){var w=m.colId,E=m.aggFunc;h(w).aggFunc=E}),d.aggFunc=null),s&&(s.pivotColIds.forEach(function(m,w){var E=h(m);E.pivot=!0,E.pivotIndex=w}),d.pivot=null,d.pivotIndex=null,this.gridOptionsService.updateGridOptions({options:{pivotMode:s.pivotMode},source:"gridInitializing"})),a&&(a.leftColIds.forEach(function(m){h(m).pinned="left"}),a.rightColIds.forEach(function(m){h(m).pinned="right"}),d.pinned=null),l&&(l.hiddenColIds.forEach(function(m){h(m).hide=!0}),d.hide=null),u&&(u.columnSizingModel.forEach(function(m){var w=m.colId,E=m.flex,S=m.width,R=h(w);R.flex=E??null,R.width=S}),d.flex=null);var v=c==null?void 0:c.orderedColIds,y=!!(v!=null&&v.length),C=y?v.map(function(m){return h(m)}):Object.values(p);C.length&&this.columnModel.applyColumnState({state:C,applyOrder:y,defaultState:d},"gridInitializing")},t.prototype.getColumnGroupState=function(){var e=this.columnModel.getColumnGroupState(),r=[];return e.forEach(function(i){var o=i.groupId,s=i.open;s&&r.push(o)}),r.length?{openColumnGroupIds:r}:void 0},t.prototype.setColumnGroupState=function(e){var r=e.openColumnGroupIds,i=new Set(r),o=this.columnModel.getColumnGroupState(),s=o.map(function(a){var l=a.groupId;return{groupId:l,open:i.has(l)}});this.columnModel.setColumnGroupState(s,"gridInitializing")},t.prototype.getFilterState=function(){var e,r=this.filterManager.getFilterModel();r&&Object.keys(r).length===0&&(r=void 0);var i=(e=this.filterManager.getAdvancedFilterModel())!==null&&e!==void 0?e:void 0;return r||i?{filterModel:r,advancedFilterModel:i}:void 0},t.prototype.setFilterState=function(e,r){var i=e??{advancedFilterModel:r},o=i.filterModel,s=i.advancedFilterModel;o&&this.filterManager.setFilterModel(o,"columnFilter"),s&&this.filterManager.setAdvancedFilterModel(s)},t.prototype.getRangeSelectionState=function(){var e,r=(e=this.rangeService)===null||e===void 0?void 0:e.getCellRanges().map(function(i){var o=i.id,s=i.type,a=i.startRow,l=i.endRow,u=i.columns,c=i.startColumn;return{id:o,type:s,startRow:a,endRow:l,colIds:u.map(function(p){return p.getColId()}),startColId:c.getColId()}});return r!=null&&r.length?{cellRanges:r}:void 0},t.prototype.setRangeSelectionState=function(e){var r=this,i;if(this.gridOptionsService.get("enableRangeSelection")){var o=e.cellRanges.map(function(s){return Yt(Yt({},s),{columns:s.colIds.map(function(a){return r.columnModel.getGridColumn(a)}),startColumn:r.columnModel.getGridColumn(s.startColId)})});(i=this.rangeService)===null||i===void 0||i.setCellRanges(o)}},t.prototype.getScrollState=function(){var e,r,i;if(this.isClientSideRowModel){var o=(e=this.ctrlsService.getGridBodyCtrl())===null||e===void 0?void 0:e.getScrollFeature(),s=((r=o==null?void 0:o.getHScrollPosition())!==null&&r!==void 0?r:{left:0}).left,a=((i=o==null?void 0:o.getVScrollPosition())!==null&&i!==void 0?i:{top:0}).top;return a||s?{top:a,left:s}:void 0}},t.prototype.setScrollState=function(e){var r;if(this.isClientSideRowModel){var i=e.top,o=e.left;(r=this.ctrlsService.getGridBodyCtrl())===null||r===void 0||r.getScrollFeature().setScrollPosition(i,o)}},t.prototype.getSideBarState=function(){var e,r;return(r=(e=this.sideBarService)===null||e===void 0?void 0:e.getSideBarComp())===null||r===void 0?void 0:r.getState()},t.prototype.getFocusedCellState=function(){if(this.isClientSideRowModel){var e=this.focusService.getFocusedCell();if(e){var r=e.column,i=e.rowIndex,o=e.rowPinned;return{colId:r.getColId(),rowIndex:i,rowPinned:o}}}},t.prototype.setFocusedCellState=function(e){if(this.isClientSideRowModel){var r=e.colId,i=e.rowIndex,o=e.rowPinned;this.focusService.setFocusedCell({column:this.columnModel.getGridColumn(r),rowIndex:i,rowPinned:o,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}},t.prototype.getPaginationState=function(){var e=this.paginationProxy.getCurrentPage(),r=this.gridOptionsService.get("paginationAutoPageSize")?void 0:this.paginationProxy.getPageSize();if(!(!e&&!r))return{page:e,pageSize:r}},t.prototype.setPaginationState=function(e){e.pageSize&&!this.gridOptionsService.get("paginationAutoPageSize")&&this.paginationProxy.setPageSize(e.pageSize,"initialState"),typeof e.page=="number"&&this.paginationProxy.setPage(e.page)},t.prototype.getRowSelectionState=function(){var e,r=this.selectionService.getSelectionState(),i=!r||!Array.isArray(r)&&(r.selectAll===!1||r.selectAllChildren===!1)&&!(!((e=r==null?void 0:r.toggledNodes)===null||e===void 0)&&e.length);return i?void 0:r},t.prototype.setRowSelectionState=function(e){this.selectionService.setSelectionState(e,"gridInitializing")},t.prototype.getRowGroupExpansionState=function(){var e=this.expansionService.getExpandedRows();return e.length?{expandedRowGroupIds:e}:void 0},t.prototype.setRowGroupExpansionState=function(e){this.expansionService.expandRows(e.expandedRowGroupIds)},t.prototype.updateColumnState=function(e){var r=this,i=this.getColumnState(),o=!1;Object.entries(i).forEach(function(s){var a=DS(s,2),l=a[0],u=a[1];Yo(u,r.cachedState[l])||(o=!0)}),this.cachedState=Yt(Yt({},this.cachedState),i),o&&this.dispatchStateUpdateEvent(e)},t.prototype.updateCachedState=function(e,r){var i,o=this.cachedState[e];this.cachedState=Yt(Yt({},this.cachedState),(i={},i[e]=r,i)),Yo(r,o)||this.dispatchStateUpdateEvent([e])},t.prototype.dispatchStateUpdateEvent=function(e){var r=this;this.suppressEvents||(e.forEach(function(i){return r.queuedUpdateSources.add(i)}),this.dispatchStateUpdateEventDebounced())},t.prototype.dispatchQueuedStateUpdateEvents=function(){var e=Array.from(this.queuedUpdateSources);this.queuedUpdateSources.clear();var r={type:g.EVENT_STATE_UPDATED,sources:e,state:this.cachedState};this.eventService.dispatchEvent(r)},Ze([f("filterManager")],t.prototype,"filterManager",void 0),Ze([Y("rangeService")],t.prototype,"rangeService",void 0),Ze([f("ctrlsService")],t.prototype,"ctrlsService",void 0),Ze([Y("sideBarService")],t.prototype,"sideBarService",void 0),Ze([f("focusService")],t.prototype,"focusService",void 0),Ze([f("columnModel")],t.prototype,"columnModel",void 0),Ze([f("paginationProxy")],t.prototype,"paginationProxy",void 0),Ze([f("rowModel")],t.prototype,"rowModel",void 0),Ze([f("selectionService")],t.prototype,"selectionService",void 0),Ze([f("expansionService")],t.prototype,"expansionService",void 0),Ze([b],t.prototype,"postConstruct",null),t=Ze([I("stateService")],t),t}(D),bS=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Js=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},yr=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},Ai=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},FS=function(n){bS(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.init=function(){this.processGridOptions(this.gridOptions)},t.prototype.processGridOptions=function(e){this.processOptions(e,dS)},t.prototype.processColumnDefs=function(e){this.processOptions(e,Hr)},t.prototype.processOptions=function(e,r){var i=this,o=r.validations,s=r.deprecations,a=r.allProperties,l=r.propertyExceptions,u=r.objectName,c=r.docsUrl;a&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,Ai(Ai([],yr(l??[]),!1),yr(Object.keys(s)),!1),a,u,c);var p=new Set,d=Object.keys(e);d.forEach(function(h){var v,y=s[h];if(y)if("renamed"in y){var C=y.renamed,m=y.version;p.add("As of v".concat(m,", ").concat(String(h)," is deprecated. Please use ").concat(String(C)," instead.")),e[C]=e[h]}else{var w=y.message,m=y.version;p.add("As of v".concat(m,", ").concat(String(h)," is deprecated. ").concat(w??""))}var E=e[h];if(!(E==null||E===!1)){var S=o[h],R;if(S)if(typeof S=="function"){var T=S(e,i.gridOptions);if(!T)return;if("objectName"in T){var F=e[h];if(Array.isArray(F)){F.forEach(function(J){i.processOptions(J,T)});return}i.processOptions(e[h],T);return}R=T}else R=S;else return;var A=R.module,x=R.dependencies,G=R.supportedRowModels;if(G){var N=(v=i.gridOptions.rowModelType)!==null&&v!==void 0?v:"clientSide";if(!G.includes(N)){p.add("".concat(String(h)," is not supported with the '").concat(N,"' row model."));return}}if(A){var j=Array.isArray(A)?A:[A],ee=!0;if(j.forEach(function(J){k.__assertRegistered(J,String(h),i.gridOptionsService.getGridId())||(ee=!1,p.add("".concat(String(h)," is only available when ").concat(J," is loaded.")))}),!ee)return}if(x){var ie=i.checkForWarning(h,x,e);if(ie){p.add(ie);return}}}}),p.size>0&&p.forEach(function(h){B(h)})},t.prototype.checkForWarning=function(e,r,i){if(typeof r=="function")return r(i,this.gridOptions);var o=Object.entries(r),s=o.find(function(c){var p=yr(c,2),d=p[0],h=p[1],v=i[d];return!h.includes(v)});if(!s)return null;var a=yr(s,2),l=a[0],u=a[1];return u.length>1?"'".concat(String(e),"' requires '").concat(l,"' to be one of [").concat(u.join(", "),"]."):"'".concat(String(e),"' requires '").concat(l,"' to be ").concat(u[0],".")},t.prototype.checkProperties=function(e,r,i,o,s){var a=["__ob__","__v_skip","__metadata__"],l=pl(Object.getOwnPropertyNames(e),Ai(Ai(Ai([],yr(a),!1),yr(r),!1),yr(i),!1),i);if(Ce(l,function(c,p){B("invalid ".concat(o," property '").concat(c,"' did you mean any of these: ").concat(p.slice(0,8).join(", ")))}),Object.keys(l).length>0&&s){var u=this.getFrameworkOverrides().getDocLink(s);B("to see all the valid ".concat(o," properties please check: ").concat(u))}},Js([f("gridOptions")],t.prototype,"gridOptions",void 0),Js([b],t.prototype,"init",null),t=Js([I("validationService")],t),t}(D),LS=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},xS=function(n){LS(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.syncEventListeners=new Map,e.asyncEventListeners=new Map,e.syncGlobalEventListeners=new Set,e.asyncGlobalEventListeners=new Set,e}return t.prototype.addEventListener=function(e,r){var i=this.gridOptionsService.useAsyncEvents(),o=i?this.asyncEventListeners:this.syncEventListeners;o.has(e)||o.set(e,new Set),o.get(e).add(r),this.eventService.addEventListener(e,r,i)},t.prototype.addGlobalListener=function(e){var r=this.gridOptionsService.useAsyncEvents(),i=r?this.asyncGlobalEventListeners:this.syncGlobalEventListeners;i.add(e),this.eventService.addGlobalListener(e,r)},t.prototype.removeEventListener=function(e,r){var i,o=this.asyncEventListeners.get(e),s=!!(o!=null&&o.delete(r));s||(i=this.asyncEventListeners.get(e))===null||i===void 0||i.delete(r),this.eventService.removeEventListener(e,r,s)},t.prototype.removeGlobalListener=function(e){var r=this.asyncGlobalEventListeners.delete(e);r||this.syncGlobalEventListeners.delete(e),this.eventService.removeGlobalListener(e,r)},t.prototype.destroyEventListeners=function(e,r){var i=this;e.forEach(function(o,s){o.forEach(function(a){return i.eventService.removeEventListener(s,a,r)}),o.clear()}),e.clear()},t.prototype.destroyGlobalListeners=function(e,r){var i=this;e.forEach(function(o){return i.eventService.removeGlobalListener(o,r)}),e.clear()},t.prototype.destroy=function(){n.prototype.destroy.call(this),this.destroyEventListeners(this.syncEventListeners,!1),this.destroyEventListeners(this.asyncEventListeners,!0),this.destroyGlobalListeners(this.syncGlobalEventListeners,!1),this.destroyGlobalListeners(this.asyncGlobalEventListeners,!0)},t=IS([I("apiEventService")],t),t}(D),MS=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},NS=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},GS=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},VS=function(n){MS(t,n);function t(){var e=n.call(this,'<span class="ag-paging-page-size"></span>')||this;return e.hasEmptyOption=!1,e.handlePageSizeItemSelected=function(){if(e.selectPageSizeComp){var r=e.selectPageSizeComp.getValue();if(r){var i=Number(r);isNaN(i)||i<1||i===e.paginationProxy.getPageSize()||(e.paginationProxy.setPageSize(i,"pageSizeSelector"),e.hasEmptyOption&&e.toggleSelectDisplay(!0),e.selectPageSizeComp.getFocusableElement().focus())}}},e}return t.prototype.init=function(){var e=this;this.addManagedPropertyListener("paginationPageSizeSelector",function(){e.onPageSizeSelectorValuesChange()}),this.addManagedListener(this.eventService,g.EVENT_PAGINATION_CHANGED,function(r){return e.handlePaginationChanged(r)})},t.prototype.handlePaginationChanged=function(e){if(!(!this.selectPageSizeComp||!(e!=null&&e.newPageSize))){var r=this.paginationProxy.getPageSize();this.getPageSizeSelectorValues().includes(r)?this.selectPageSizeComp.setValue(r.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}},t.prototype.toggleSelectDisplay=function(e){this.selectPageSizeComp&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp&&this.appendChild(this.selectPageSizeComp))},t.prototype.reset=function(){he(this.getGui()),this.selectPageSizeComp&&(this.destroyBean(this.selectPageSizeComp),this.selectPageSizeComp=void 0)},t.prototype.onPageSizeSelectorValuesChange=function(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()},t.prototype.shouldShowPageSizeSelector=function(){return this.gridOptionsService.get("pagination")&&!this.gridOptionsService.get("suppressPaginationPanel")&&!this.gridOptionsService.get("paginationAutoPageSize")&&this.gridOptionsService.get("paginationPageSizeSelector")!==!1},t.prototype.reloadPageSizesSelector=function(){var e=this,r=this.getPageSizeSelectorValues(),i=this.paginationProxy.getPageSize(),o=!i||!r.includes(i);o&&(r.unshift(""),B(`The paginationPageSize grid option is set to a value that is not in the list of page size options.
|
||
Please make sure that the paginationPageSize grid option is set to one of the values in the
|
||
paginationPageSizeSelector array, or set the paginationPageSizeSelector to false to hide the page size selector.`)),this.selectPageSizeComp&&(this.destroyBean(this.selectPageSizeComp),this.selectPageSizeComp=void 0);var s=this.localeService.getLocaleTextFunc(),a=s("pageSizeSelectorLabel","Page Size:"),l=r.map(function(c){return{value:String(c),text:String(c)}}),u=s("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new eo).addOptions(l).setValue(String(o?"":i)).setAriaLabel(u).setLabel(a).onValueChange(function(){return e.handlePageSizeItemSelected()}),this.hasEmptyOption=o},t.prototype.getPageSizeSelectorValues=function(){var e=[20,50,100],r=this.gridOptionsService.get("paginationPageSizeSelector");return!Array.isArray(r)||!this.validateValues(r)?e:GS([],NS(r),!1).sort(function(i,o){return i-o})},t.prototype.validateValues=function(e){if(!e.length)return B(`The paginationPageSizeSelector grid option is an empty array. This is most likely a mistake.
|
||
If you want to hide the page size selector, please set the paginationPageSizeSelector to false.`),!1;for(var r=0;r<e.length;r++){var i=e[r],o=typeof i=="number",s=i>0;if(!o)return B(`The paginationPageSizeSelector grid option contains a non-numeric value.
|
||
Please make sure that all values in the paginationPageSizeSelector array are numbers.`),!1;if(!s)return B(`The paginationPageSizeSelector grid option contains a negative number or zero.
|
||
Please make sure that all values in the paginationPageSizeSelector array are positive.`),!1}return!0},t.prototype.destroy=function(){this.toggleSelectDisplay(!1),n.prototype.destroy.call(this)},Uo([f("localeService")],t.prototype,"localeService",void 0),Uo([f("gridOptionsService")],t.prototype,"gridOptionsService",void 0),Uo([f("paginationProxy")],t.prototype,"paginationProxy",void 0),Uo([b],t.prototype,"init",null),t}(W),Ju=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},Zu=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))};function ec(n,t,e){if(!t)return pt("No gridOptions provided to createGrid"),{};var r=Yu.getCoercedGridOptions(t),i=new BS().create(n,r,function(s){var a=new YC(n);s.createBean(a)},void 0,e);if(!Object.isFrozen(t)&&!(e!=null&&e.frameworkOverrides)){var o="https://ag-grid.com/javascript-data-grid/grid-interface/#grid-api";Object.defineProperty(t,"api",{get:function(){pt("gridOptions.api is no longer supported. See ".concat(o,"."))},configurable:!0}),Object.defineProperty(t,"columnApi",{get:function(){pt("gridOptions.columnApi is no longer supported and all methods moved to the grid api. See ".concat(o,"."))},configurable:!0})}return i}var HS=1,BS=function(){function n(){}return n.prototype.create=function(t,e,r,i,o){var s,a=!!e.debug,l=(s=e.gridId)!==null&&s!==void 0?s:String(HS++),u=this.getRegisteredModules(o,l),c=this.createBeansList(e.rowModelType,u,l),p=this.createProvidedBeans(t,e,o);if(!c){pt("Failed to create grid.");return}var d={providedBeanInstances:p,beanClasses:c,debug:a,gridId:l},h=new Gs("Context",function(){return d.debug}),v=new Gc(d,h),y=v.getBean("beans");return this.registerModuleUserComponents(y,u),this.registerStackComponents(y,u),this.registerControllers(y,u),r(v),y.syncService.start(),i&&i(v),y.gridApi},n.prototype.registerControllers=function(t,e){e.forEach(function(r){r.controllers&&r.controllers.forEach(function(i){return t.ctrlsFactory.register(i)})})},n.prototype.registerStackComponents=function(t,e){var r=this.createAgStackComponentsList(e);t.agStackComponentsRegistry.setupComponents(r)},n.prototype.getRegisteredModules=function(t,e){var r=t?t.modules:null,i=k.__getRegisteredModules(e),o=[],s={},a=function(l,u,c){var p=function(d){s[d.moduleName]||(s[d.moduleName]=!0,o.push(d),k.__register(d,l,c))};p(u),u.dependantModules&&u.dependantModules.forEach(function(d){return a(l,d,c)})};return r&&r.forEach(function(l){return a(!0,l,e)}),i&&i.forEach(function(l){return a(!k.__isPackageBased(),l,void 0)}),o},n.prototype.registerModuleUserComponents=function(t,e){var r=this.extractModuleEntity(e,function(i){return i.userComponents?i.userComponents:[]});r.forEach(function(i){t.userComponentRegistry.registerDefaultComponent(i.componentName,i.componentClass)})},n.prototype.createProvidedBeans=function(t,e,r){var i=r?r.frameworkOverrides:null;V(i)&&(i=new EC);var o={gridOptions:e,eGridDiv:t,globalEventListener:r?r.globalEventListener:null,globalSyncEventListener:r?r.globalSyncEventListener:null,frameworkOverrides:i};return r&&r.providedBeanInstances&&Object.assign(o,r.providedBeanInstances),o},n.prototype.createAgStackComponentsList=function(t){var e=[{componentName:"AgCheckbox",componentClass:to},{componentName:"AgRadioButton",componentClass:Pl},{componentName:"AgToggleButton",componentClass:Iy},{componentName:"AgInputTextField",componentClass:sr},{componentName:"AgInputTextArea",componentClass:My},{componentName:"AgInputNumberField",componentClass:is},{componentName:"AgInputDateField",componentClass:Gy},{componentName:"AgInputRange",componentClass:Hy},{componentName:"AgRichSelect",componentClass:Qy},{componentName:"AgSelect",componentClass:eo},{componentName:"AgSlider",componentClass:Jy},{componentName:"AgGridBody",componentClass:Vv},{componentName:"AgHeaderRoot",componentClass:qg},{componentName:"AgSortIndicator",componentClass:as},{componentName:"AgPagination",componentClass:Dm},{componentName:"AgPageSizeSelector",componentClass:VS},{componentName:"AgOverlayWrapper",componentClass:bm},{componentName:"AgGroupComponent",componentClass:eC},{componentName:"AgPanel",componentClass:Du},{componentName:"AgDialog",componentClass:cC},{componentName:"AgRowContainer",componentClass:eg},{componentName:"AgFakeHorizontalScroll",componentClass:rS},{componentName:"AgFakeVerticalScroll",componentClass:CS},{componentName:"AgAutocomplete",componentClass:mC}],r=this.extractModuleEntity(t,function(i){return i.agStackComponents?i.agStackComponents:[]});return e=e.concat(r),e},n.prototype.createBeansList=function(t,e,r){t===void 0&&(t="clientSide");var i=e.filter(function(u){return!u.rowModel||u.rowModel===t}),o={clientSide:M.ClientSideRowModelModule,infinite:M.InfiniteRowModelModule,serverSide:M.ServerSideRowModelModule,viewport:M.ViewportRowModelModule};if(!o[t]){pt("Could not find row model for rowModelType = "+t);return}if(k.__assertRegistered(o[t],"rowModelType = '".concat(t,"'"),r)){var s=[nu,Lm,Mm,Wm,om,ru,Kh,pm,hm,oy,pf,Rm,Xg,vS,FS,_y,ff,Sp,Lt,Yu,hC,Iu,Cf,fp,Ug,Ay,Cy,VC,Zc,kC,AC,Uv,sm,MC,UC,yp,cy,Zg,fe,Mu,Vs,Wv,wm,TC,wy,Fy,Bv,QC,em,rm,Tm,rp,um,sy,Bm,Rp,Um,zm,Py,Km,Qm,oS,sS,Zm,SS,ES,iu,RS,TS,AS,ly,xS],a=this.extractModuleEntity(i,function(u){return u.beans?u.beans:[]});s.push.apply(s,Zu([],Ju(a),!1));var l=[];return s.forEach(function(u){l.indexOf(u)<0&&l.push(u)}),l}},n.prototype.extractModuleEntity=function(t,e){return[].concat.apply([],Zu([],Ju(t.map(e)),!1))},n}(),tc;(function(n){n.InsideBase="insideBase",n.InsideEnd="insideEnd",n.Center="center",n.OutsideEnd="outsideEnd"})(tc||(tc={}));/**
|
||
* @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
|
||
* @version v31.0.1
|
||
* @link https://www.ag-grid.com/
|
||
* @license MIT
|
||
*/var Br=typeof global>"u"?{}:global;Br.HTMLElement=typeof HTMLElement>"u"?{}:HTMLElement,Br.HTMLButtonElement=typeof HTMLButtonElement>"u"?{}:HTMLButtonElement,Br.HTMLSelectElement=typeof HTMLSelectElement>"u"?{}:HTMLSelectElement,Br.HTMLInputElement=typeof HTMLInputElement>"u"?{}:HTMLInputElement,Br.Node=typeof Node>"u"?{}:Node,Br.MouseEvent=typeof MouseEvent>"u"?{}:MouseEvent;var bi=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},Fi=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},kS=function(){function n(t,e,r,i,o,s){this.nextId=0,this.allNodesMap={},this.dataLoaded=!1,this.rootNode=t,this.gridOptionsService=e,this.eventService=r,this.columnModel=i,this.beans=s,this.selectionService=o,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id=n.ROOT_NODE_ID,this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterAggFilter=[],this.rootNode.childrenAfterFilter=[]}return n.prototype.getCopyOfNodesMap=function(){return z.cloneObject(this.allNodesMap)},n.prototype.getRowNode=function(t){return this.allNodesMap[t]},n.prototype.setRowData=function(t){var e=this;if(typeof t=="string"){console.warn("AG Grid: rowData must be an array, however you passed in a string. If you are loading JSON, make sure you convert the JSON string to JavaScript objects first");return}this.dataLoaded=!0,this.dispatchRowDataUpdateStartedEvent(t);var r=this.rootNode,i=this.rootNode.sibling;r.childrenAfterFilter=null,r.childrenAfterGroup=null,r.childrenAfterAggFilter=null,r.childrenAfterSort=null,r.childrenMapped=null,r.updateHasChildren(),this.nextId=0,this.allNodesMap={},t?r.allLeafChildren=t.map(function(o){return e.createNode(o,e.rootNode,n.TOP_LEVEL)}):(r.allLeafChildren=[],r.childrenAfterGroup=[]),i&&(i.childrenAfterFilter=r.childrenAfterFilter,i.childrenAfterGroup=r.childrenAfterGroup,i.childrenAfterAggFilter=r.childrenAfterAggFilter,i.childrenAfterSort=r.childrenAfterSort,i.childrenMapped=r.childrenMapped,i.allLeafChildren=r.allLeafChildren)},n.prototype.updateRowData=function(t,e){this.dataLoaded=!0,this.dispatchRowDataUpdateStartedEvent(t.add);var r={remove:[],update:[],add:[]},i=[];return this.executeRemove(t,r,i),this.executeUpdate(t,r,i),this.executeAdd(t,r),this.updateSelection(i,"rowDataChanged"),e&&z.sortRowNodesByOrder(this.rootNode.allLeafChildren,e),r},n.prototype.hasData=function(){return this.dataLoaded},n.prototype.dispatchRowDataUpdateStartedEvent=function(t){var e={type:g.EVENT_ROW_DATA_UPDATE_STARTED,firstRowData:t!=null&&t.length?t[0]:null};this.eventService.dispatchEvent(e)},n.prototype.updateSelection=function(t,e){var r=t.length>0;if(r&&this.selectionService.setNodesSelected({newValue:!1,nodes:t,suppressFinishActions:!0,source:e}),this.selectionService.updateGroupsFromChildrenSelections(e),r){var i={type:g.EVENT_SELECTION_CHANGED,source:e};this.eventService.dispatchEvent(i)}},n.prototype.executeAdd=function(t,e){var r=this,i,o=t.add,s=t.addIndex;if(!z.missingOrEmpty(o)){var a=o.map(function(y){return r.createNode(y,r.rootNode,n.TOP_LEVEL)});if(typeof s=="number"&&s>=0){var l=this.rootNode.allLeafChildren,u=l.length,c=s,p=this.gridOptionsService.get("treeData");if(p&&s>0&&u>0){for(var d=0;d<u;d++)if(((i=l[d])===null||i===void 0?void 0:i.rowIndex)==s-1){c=d+1;break}}var h=l.slice(0,c),v=l.slice(c,l.length);this.rootNode.allLeafChildren=Fi(Fi(Fi([],bi(h),!1),bi(a),!1),bi(v),!1)}else this.rootNode.allLeafChildren=Fi(Fi([],bi(this.rootNode.allLeafChildren),!1),bi(a),!1);this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren),e.add=a}},n.prototype.executeRemove=function(t,e,r){var i=this,o=t.remove;if(!z.missingOrEmpty(o)){var s={};o.forEach(function(a){var l=i.lookupRowNode(a);l&&(l.isSelected()&&r.push(l),l.clearRowTopAndRowIndex(),s[l.id]=!0,delete i.allNodesMap[l.id],e.remove.push(l))}),this.rootNode.allLeafChildren=this.rootNode.allLeafChildren.filter(function(a){return!s[a.id]}),this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren)}},n.prototype.executeUpdate=function(t,e,r){var i=this,o=t.update;z.missingOrEmpty(o)||o.forEach(function(s){var a=i.lookupRowNode(s);a&&(a.updateData(s),!a.selectable&&a.isSelected()&&r.push(a),i.setMasterForRow(a,s,n.TOP_LEVEL,!1),e.update.push(a))})},n.prototype.lookupRowNode=function(t){var e=this.gridOptionsService.getCallback("getRowId"),r;if(e){var i=e({data:t,level:0});if(r=this.allNodesMap[i],!r)return console.error("AG Grid: could not find row id=".concat(i,", data item was not found for this id")),null}else if(r=this.rootNode.allLeafChildren.find(function(o){return o.data===t}),!r)return console.error("AG Grid: could not find data item as object was not found",t),console.error("Consider using getRowId to help the Grid find matching row data"),null;return r||null},n.prototype.createNode=function(t,e,r){var i=new U(this.beans);i.group=!1,this.setMasterForRow(i,t,r,!0);var o=this.gridOptionsService.get("suppressParentsInRowNodes");return e&&!o&&(i.parent=e),i.level=r,i.setDataAndId(t,this.nextId.toString()),this.allNodesMap[i.id]&&console.warn("AG Grid: duplicate node id '".concat(i.id,"' detected from getRowId callback, this could cause issues in your grid.")),this.allNodesMap[i.id]=i,this.nextId++,i},n.prototype.setMasterForRow=function(t,e,r,i){var o=this.gridOptionsService.get("treeData");if(o)t.setMaster(!1),i&&(t.expanded=!1);else{var s=this.gridOptionsService.get("masterDetail");if(s){var a=this.gridOptionsService.get("isRowMaster");a?t.setMaster(a(e)):t.setMaster(!0)}else t.setMaster(!1);if(i){var l=this.columnModel.getRowGroupColumns(),u=l?l.length:0,c=r+u;t.expanded=t.master?this.isExpanded(c):!1}}},n.prototype.isExpanded=function(t){var e=this.gridOptionsService.get("groupDefaultExpanded");return e===-1?!0:t<e},n.TOP_LEVEL=0,n.ROOT_NODE_ID="ROOT_NODE_ID",n}(),WS=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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 i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},Ie=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},xe=function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return n.concat(o||Array.prototype.slice.call(t))},wt;(function(n){n[n.Normal=0]="Normal",n[n.AfterFilter=1]="AfterFilter",n[n.AfterFilterAndSort=2]="AfterFilterAndSort",n[n.PivotNodes=3]="PivotNodes"})(wt||(wt={}));var jS=function(n){WS(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.onRowHeightChanged_debounced=z.debounce(e.onRowHeightChanged.bind(e),100),e.rowsToDisplay=[],e.hasStarted=!1,e.shouldSkipSettingDataOnStart=!1,e}return t.prototype.init=function(){var e=this,r=this.refreshModel.bind(this,{step:K.EVERYTHING}),i=!this.gridOptionsService.get("suppressAnimationFrame"),o=this.refreshModel.bind(this,{step:K.EVERYTHING,afterColumnsChanged:!0,keepRenderedRows:!0,animate:i});this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,o),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,r),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VALUE_CHANGED,this.onValueChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_CHANGED,this.refreshModel.bind(this,{step:K.PIVOT})),this.addManagedListener(this.eventService,g.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,r),this.addManagedListener(this.eventService,g.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanges.bind(this)),this.addManagedListener(this.eventService,g.EVENT_GRID_READY,function(){return e.onGridReady()}),this.addPropertyListeners(),this.rootNode=new U(this.beans),this.nodeManager=new kS(this.rootNode,this.gridOptionsService,this.eventService,this.columnModel,this.selectionService,this.beans)},t.prototype.addPropertyListeners=function(){var e=this,r=new Set(["treeData","masterDetail"]),i=new Set(["suppressParentsInRowNodes","groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType"]),o=new Set(["excludeChildrenWhenTreeDataFiltering"]),s=new Set(["removePivotHeaderRowWhenSingleValueColumn","pivotRowTotals","pivotColumnGroupTotals","suppressExpandablePivotGroups"]),a=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","groupIncludeTotalFooter","suppressAggFilteredOnly"]),l=new Set(["postSortRows","groupDisplayType","accentedSort"]),u=new Set([]),c=new Set(["groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupIncludeFooter"]),p=xe(xe(xe(xe(xe(xe(xe(xe(xe([],Ie(r),!1),Ie(i),!1),Ie(o),!1),Ie(s),!1),Ie(s),!1),Ie(a),!1),Ie(l),!1),Ie(u),!1),Ie(c),!1);this.addManagedPropertyListeners(p,function(d){var h,v=(h=d.changeSet)===null||h===void 0?void 0:h.properties;if(v){var y=function(C){return v.some(function(m){return C.has(m)})};if(y(r)){e.setRowData(e.rootNode.allLeafChildren.map(function(C){return C.data}));return}if(y(i)){e.refreshModel({step:K.EVERYTHING});return}if(y(o)){e.refreshModel({step:K.FILTER});return}if(y(s)){e.refreshModel({step:K.PIVOT});return}if(y(a)){e.refreshModel({step:K.AGGREGATE});return}if(y(l)){e.refreshModel({step:K.SORT});return}if(y(u)){e.refreshModel({step:K.FILTER_AGGREGATES});return}y(c)&&e.refreshModel({step:K.MAP})}}),this.addManagedPropertyListener("rowHeight",function(){return e.resetRowHeights()})},t.prototype.start=function(){this.hasStarted=!0,this.shouldSkipSettingDataOnStart?this.dispatchUpdateEventsAndRefresh():this.setInitialData()},t.prototype.setInitialData=function(){var e=this.gridOptionsService.get("rowData");e&&(this.shouldSkipSettingDataOnStart=!0,this.setRowData(e))},t.prototype.ensureRowHeightsValid=function(e,r,i,o){var s,a=!1;do{s=!1;for(var l=this.getRowIndexAtPixel(e),u=this.getRowIndexAtPixel(r),c=Math.max(l,i),p=Math.min(u,o),d=c;d<=p;d++){var h=this.getRow(d);if(h.rowHeightEstimated){var v=this.gridOptionsService.getRowHeightForNode(h);h.setRowHeight(v.height),s=!0,a=!0}}s&&this.setRowTopAndRowIndex()}while(s);return a},t.prototype.setRowTopAndRowIndex=function(){for(var e=this.environment.getDefaultRowHeight(),r=0,i=new Set,o=this.gridOptionsService.isDomLayout("normal"),s=0;s<this.rowsToDisplay.length;s++){var a=this.rowsToDisplay[s];if(a.id!=null&&i.add(a.id),a.rowHeight==null){var l=this.gridOptionsService.getRowHeightForNode(a,o,e);a.setRowHeight(l.height,l.estimated)}a.setRowTop(r),a.setRowIndex(s),r+=a.rowHeight}return i},t.prototype.clearRowTopAndRowIndex=function(e,r){var i=e.isActive(),o=function(a){a&&a.id!=null&&!r.has(a.id)&&a.clearRowTopAndRowIndex()},s=function(a){if(o(a),o(a.detailNode),o(a.sibling),a.hasChildren()&&a.childrenAfterGroup){var l=a.level==-1,u=i&&!l&&!a.expanded;u||a.childrenAfterGroup.forEach(s)}};s(this.rootNode)},t.prototype.ensureRowsAtPixel=function(e,r,i){var o=this;i===void 0&&(i=0);var s=this.getRowIndexAtPixel(r),a=this.getRow(s),l=!this.gridOptionsService.get("suppressAnimationFrame");return a===e[0]?!1:(e.forEach(function(u){z.removeFromArray(o.rootNode.allLeafChildren,u)}),e.forEach(function(u,c){z.insertIntoArray(o.rootNode.allLeafChildren,u,Math.max(s+i,0)+c)}),this.refreshModel({step:K.EVERYTHING,keepRenderedRows:!0,keepEditingRows:!0,animate:l}),!0)},t.prototype.highlightRowAtPixel=function(e,r){var i=r!=null?this.getRowIndexAtPixel(r):null,o=i!=null?this.getRow(i):null;if(!o||!e||o===e||r==null){this.lastHighlightedRow&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null);return}var s=this.getHighlightPosition(r,o);this.lastHighlightedRow&&this.lastHighlightedRow!==o&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null),o.setHighlighted(s),this.lastHighlightedRow=o},t.prototype.getHighlightPosition=function(e,r){if(!r){var i=this.getRowIndexAtPixel(e);if(r=this.getRow(i||0),!r)return Xe.Below}var o=r.rowTop,s=r.rowHeight;return e-o<s/2?Xe.Above:Xe.Below},t.prototype.getLastHighlightedRowNode=function(){return this.lastHighlightedRow},t.prototype.isLastRowIndexKnown=function(){return!0},t.prototype.getRowCount=function(){return this.rowsToDisplay?this.rowsToDisplay.length:0},t.prototype.getTopLevelRowCount=function(){var e=this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode;if(e)return 1;var r=this.rootNode.childrenAfterAggFilter;return r?r.length:0},t.prototype.getTopLevelRowDisplayedIndex=function(e){var r=this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode;if(r)return e;var i=this.rootNode.childrenAfterSort[e];if(this.gridOptionsService.get("groupHideOpenParents"))for(;i.expanded&&i.childrenAfterSort&&i.childrenAfterSort.length>0;)i=i.childrenAfterSort[0];return i.rowIndex},t.prototype.getRowBounds=function(e){if(z.missing(this.rowsToDisplay))return null;var r=this.rowsToDisplay[e];return r?{rowTop:r.rowTop,rowHeight:r.rowHeight}:null},t.prototype.onRowGroupOpened=function(){var e=this.gridOptionsService.isAnimateRows();this.refreshModel({step:K.MAP,keepRenderedRows:!0,animate:e})},t.prototype.onFilterChanged=function(e){if(!e.afterDataChange){var r=this.gridOptionsService.isAnimateRows(),i=e.columns.length===0||e.columns.some(function(s){return s.isPrimary()}),o=i?K.FILTER:K.FILTER_AGGREGATES;this.refreshModel({step:o,keepRenderedRows:!0,animate:r})}},t.prototype.onSortChanged=function(){var e=this.gridOptionsService.isAnimateRows();this.refreshModel({step:K.SORT,keepRenderedRows:!0,animate:e,keepEditingRows:!0})},t.prototype.getType=function(){return"clientSide"},t.prototype.onValueChanged=function(){this.columnModel.isPivotActive()?this.refreshModel({step:K.PIVOT}):this.refreshModel({step:K.AGGREGATE})},t.prototype.createChangePath=function(e){var r=z.missingOrEmpty(e),i=new To(!1,this.rootNode);return(r||this.gridOptionsService.get("treeData"))&&i.setInactive(),i},t.prototype.isSuppressModelUpdateAfterUpdateTransaction=function(e){if(!this.gridOptionsService.get("suppressModelUpdateAfterUpdateTransaction")||e.rowNodeTransactions==null)return!1;var r=e.rowNodeTransactions.filter(function(o){return o.add!=null&&o.add.length>0||o.remove!=null&&o.remove.length>0}),i=r==null||r.length==0;return i},t.prototype.buildRefreshModelParams=function(e){var r=K.EVERYTHING,i={everything:K.EVERYTHING,group:K.EVERYTHING,filter:K.FILTER,map:K.MAP,aggregate:K.AGGREGATE,sort:K.SORT,pivot:K.PIVOT};if(z.exists(e)&&(r=i[e]),z.missing(r)){console.error("AG Grid: invalid step ".concat(e,", available steps are ").concat(Object.keys(i).join(", ")));return}var o=!this.gridOptionsService.get("suppressAnimationFrame"),s={step:r,keepRenderedRows:!0,keepEditingRows:!0,animate:o};return s},t.prototype.refreshModel=function(e){if(this.hasStarted){var r=typeof e=="object"&&"step"in e?e:this.buildRefreshModelParams(e);if(r&&!this.isSuppressModelUpdateAfterUpdateTransaction(r)){var i=this.createChangePath(r.rowNodeTransactions);switch(r.step){case K.EVERYTHING:this.doRowGrouping(r.rowNodeTransactions,r.rowNodeOrder,i,!!r.afterColumnsChanged);case K.FILTER:this.doFilter(i);case K.PIVOT:this.doPivot(i);case K.AGGREGATE:this.doAggregate(i);case K.FILTER_AGGREGATES:this.doFilterAggregates(i);case K.SORT:this.doSort(r.rowNodeTransactions,i);case K.MAP:this.doRowsToDisplay()}var o=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(i,o);var s={type:g.EVENT_MODEL_UPDATED,animate:r.animate,keepRenderedRows:r.keepRenderedRows,newData:r.newData,newPage:!1,keepUndoRedoStack:r.keepUndoRedoStack};this.eventService.dispatchEvent(s)}}},t.prototype.isEmpty=function(){var e=z.missing(this.rootNode.allLeafChildren)||this.rootNode.allLeafChildren.length===0;return z.missing(this.rootNode)||e||!this.columnModel.isReady()},t.prototype.isRowsToRender=function(){return z.exists(this.rowsToDisplay)&&this.rowsToDisplay.length>0},t.prototype.getNodesInRangeForSelection=function(e,r){var i=!r,o=!1,s=[],a=this.gridOptionsService.get("groupSelectsChildren");return this.forEachNodeAfterFilterAndSort(function(l){if(!o){if(i&&(l===r||l===e)&&(o=!0,l.group&&a)){s.push.apply(s,xe([],Ie(l.allLeafChildren),!1));return}if(!i){if(l!==r&&l!==e)return;i=!0}var u=!l.group||!a;if(u){s.push(l);return}}}),s},t.prototype.setDatasource=function(e){console.error("AG Grid: should never call setDatasource on clientSideRowController")},t.prototype.getTopLevelNodes=function(){return this.rootNode?this.rootNode.childrenAfterGroup:null},t.prototype.getRootNode=function(){return this.rootNode},t.prototype.getRow=function(e){return this.rowsToDisplay[e]},t.prototype.isRowPresent=function(e){return this.rowsToDisplay.indexOf(e)>=0},t.prototype.getRowIndexAtPixel=function(e){if(this.isEmpty()||this.rowsToDisplay.length===0)return-1;var r=0,i=this.rowsToDisplay.length-1;if(e<=0)return 0;var o=z.last(this.rowsToDisplay);if(o.rowTop<=e)return this.rowsToDisplay.length-1;for(var s=-1,a=-1;;){var l=Math.floor((r+i)/2),u=this.rowsToDisplay[l];if(this.isRowInPixel(u,e))return l;u.rowTop<e?r=l+1:u.rowTop>e&&(i=l-1);var c=s===r&&a===i;if(c)return l;s=r,a=i}},t.prototype.isRowInPixel=function(e,r){var i=e.rowTop,o=e.rowTop+e.rowHeight,s=i<=r&&o>r;return s},t.prototype.forEachLeafNode=function(e){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEach(function(r,i){return e(r,i)})},t.prototype.forEachNode=function(e,r){r===void 0&&(r=!1),this.recursivelyWalkNodesAndCallback({nodes:xe([],Ie(this.rootNode.childrenAfterGroup||[]),!1),callback:e,recursionType:wt.Normal,index:0,includeFooterNodes:r})},t.prototype.forEachNodeAfterFilter=function(e,r){r===void 0&&(r=!1),this.recursivelyWalkNodesAndCallback({nodes:xe([],Ie(this.rootNode.childrenAfterAggFilter||[]),!1),callback:e,recursionType:wt.AfterFilter,index:0,includeFooterNodes:r})},t.prototype.forEachNodeAfterFilterAndSort=function(e,r){r===void 0&&(r=!1),this.recursivelyWalkNodesAndCallback({nodes:xe([],Ie(this.rootNode.childrenAfterSort||[]),!1),callback:e,recursionType:wt.AfterFilterAndSort,index:0,includeFooterNodes:r})},t.prototype.forEachPivotNode=function(e,r){r===void 0&&(r=!1),this.recursivelyWalkNodesAndCallback({nodes:[this.rootNode],callback:e,recursionType:wt.PivotNodes,index:0,includeFooterNodes:r})},t.prototype.recursivelyWalkNodesAndCallback=function(e){for(var r,i=e.nodes,o=e.callback,s=e.recursionType,a=e.includeFooterNodes,l=e.index,u=0;u<i.length;u++){var c=i[u];if(o(c,l++),c.hasChildren()&&!c.footer){var p=null;switch(s){case wt.Normal:p=c.childrenAfterGroup;break;case wt.AfterFilter:p=c.childrenAfterAggFilter;break;case wt.AfterFilterAndSort:p=c.childrenAfterSort;break;case wt.PivotNodes:p=c.leafGroup?null:c.childrenAfterSort;break}p&&(l=this.recursivelyWalkNodesAndCallback({nodes:xe([],Ie(p),!1),callback:o,recursionType:s,index:l,includeFooterNodes:a}))}}var d=(r=i[0])===null||r===void 0?void 0:r.parent;if(!a||!d)return l;var h=d===this.rootNode;if(h){var v=this.gridOptionsService.get("groupIncludeTotalFooter");if(!v)return l}else{var y=this.gridOptionsService.getGroupIncludeFooter();if(!y({node:d}))return l}return d.createFooter(),o(d.sibling,l++),l},t.prototype.doAggregate=function(e){this.aggregationStage&&this.aggregationStage.execute({rowNode:this.rootNode,changedPath:e})},t.prototype.doFilterAggregates=function(e){this.filterAggregatesStage?this.filterAggregatesStage.execute({rowNode:this.rootNode,changedPath:e}):this.rootNode.childrenAfterAggFilter=this.rootNode.childrenAfterFilter},t.prototype.expandOrCollapseAll=function(e){var r=this.gridOptionsService.get("treeData"),i=this.columnModel.isPivotActive(),o=function(l){l&&l.forEach(function(u){var c=function(){u.expanded=e,o(u.childrenAfterGroup)};if(r){var p=z.exists(u.childrenAfterGroup);p&&c();return}if(i){var d=!u.leafGroup;d&&c();return}var h=u.group;h&&c()})};this.rootNode&&o(this.rootNode.childrenAfterGroup),this.refreshModel({step:K.MAP});var s=e?"expandAll":"collapseAll",a={type:g.EVENT_EXPAND_COLLAPSE_ALL,source:s};this.eventService.dispatchEvent(a)},t.prototype.doSort=function(e,r){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:r})},t.prototype.doRowGrouping=function(e,r,i,o){if(this.groupStage){if(e?this.groupStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,rowNodeOrder:r,changedPath:i}):this.groupStage.execute({rowNode:this.rootNode,changedPath:i,afterColumnsChanged:o}),this.gridOptionsService.get("groupSelectsChildren")){var s=this.selectionService.updateGroupsFromChildrenSelections("rowGroupChanged",i);if(s){var a={type:g.EVENT_SELECTION_CHANGED,source:"rowGroupChanged"};this.eventService.dispatchEvent(a)}}}else this.rootNode.childrenAfterGroup=this.rootNode.allLeafChildren,this.rootNode.sibling&&(this.rootNode.sibling.childrenAfterGroup=this.rootNode.childrenAfterGroup),this.rootNode.updateHasChildren();this.eventService.dispatchEventOnce({type:g.EVENT_ROW_COUNT_READY})},t.prototype.doFilter=function(e){this.filterStage.execute({rowNode:this.rootNode,changedPath:e})},t.prototype.doPivot=function(e){this.pivotStage&&this.pivotStage.execute({rowNode:this.rootNode,changedPath:e})},t.prototype.getCopyOfNodesMap=function(){return this.nodeManager.getCopyOfNodesMap()},t.prototype.getRowNode=function(e){var r=typeof e=="string"&&e.indexOf(U.ID_PREFIX_ROW_GROUP)==0;if(r){var i=void 0;return this.forEachNode(function(o){o.id===e&&(i=o)}),i}return this.nodeManager.getRowNode(e)},t.prototype.setRowData=function(e){this.selectionService.reset("rowDataChanged"),this.nodeManager.setRowData(e),this.hasStarted&&this.dispatchUpdateEventsAndRefresh()},t.prototype.dispatchUpdateEventsAndRefresh=function(){var e={type:g.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(e),this.refreshModel({step:K.EVERYTHING,newData:!0})},t.prototype.batchUpdateRowData=function(e,r){var i=this;if(this.applyAsyncTransactionsTimeout==null){this.rowDataTransactionBatch=[];var o=this.gridOptionsService.getAsyncTransactionWaitMillis();this.applyAsyncTransactionsTimeout=window.setTimeout(function(){i.executeBatchUpdateRowData()},o)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:r})},t.prototype.flushAsyncTransactions=function(){this.applyAsyncTransactionsTimeout!=null&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())},t.prototype.executeBatchUpdateRowData=function(){var e=this;this.valueCache.onDataChanged();var r=[],i=[],o=!1;if(this.rowDataTransactionBatch&&this.rowDataTransactionBatch.forEach(function(a){var l=e.nodeManager.updateRowData(a.rowDataTransaction,void 0);i.push(l),a.callback&&r.push(a.callback.bind(null,l)),typeof a.rowDataTransaction.addIndex=="number"&&(o=!0)}),this.commonUpdateRowData(i,void 0,o),r.length>0&&window.setTimeout(function(){r.forEach(function(a){return a()})},0),i.length>0){var s={type:g.EVENT_ASYNC_TRANSACTIONS_FLUSHED,results:i};this.eventService.dispatchEvent(s)}this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0},t.prototype.updateRowData=function(e,r){this.valueCache.onDataChanged();var i=this.nodeManager.updateRowData(e,r),o=typeof e.addIndex=="number";return this.commonUpdateRowData([i],r,o),i},t.prototype.createRowNodeOrder=function(){var e=this.gridOptionsService.get("suppressMaintainUnsortedOrder");if(!e){var r={};if(this.rootNode&&this.rootNode.allLeafChildren)for(var i=0;i<this.rootNode.allLeafChildren.length;i++){var o=this.rootNode.allLeafChildren[i];r[o.id]=i}return r}},t.prototype.commonUpdateRowData=function(e,r,i){if(this.hasStarted){var o=!this.gridOptionsService.get("suppressAnimationFrame");i&&(r=this.createRowNodeOrder());var s={type:g.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(s),this.refreshModel({step:K.EVERYTHING,rowNodeTransactions:e,rowNodeOrder:r,keepRenderedRows:!0,keepEditingRows:!0,animate:o})}},t.prototype.doRowsToDisplay=function(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode})},t.prototype.onRowHeightChanged=function(){this.refreshModel({step:K.MAP,keepRenderedRows:!0,keepEditingRows:!0,keepUndoRedoStack:!0})},t.prototype.onRowHeightChangedDebounced=function(){this.onRowHeightChanged_debounced()},t.prototype.resetRowHeights=function(){var e=this.resetRowHeightsForAllRowNodes();this.rootNode.setRowHeight(this.rootNode.rowHeight,!0),this.rootNode.sibling&&this.rootNode.sibling.setRowHeight(this.rootNode.sibling.rowHeight,!0),e&&this.onRowHeightChanged()},t.prototype.resetRowHeightsForAllRowNodes=function(){var e=!1;return this.forEachNode(function(r){r.setRowHeight(r.rowHeight,!0);var i=r.detailNode;i&&i.setRowHeight(i.rowHeight,!0),r.sibling&&r.sibling.setRowHeight(r.sibling.rowHeight,!0),e=!0}),e},t.prototype.onGridStylesChanges=function(){this.columnModel.isAutoRowHeightActive()||this.resetRowHeights()},t.prototype.onGridReady=function(){this.hasStarted||this.setInitialData()},t.prototype.isRowDataLoaded=function(){return this.nodeManager.hasData()},Le([f("columnModel")],t.prototype,"columnModel",void 0),Le([f("selectionService")],t.prototype,"selectionService",void 0),Le([f("filterManager")],t.prototype,"filterManager",void 0),Le([f("valueCache")],t.prototype,"valueCache",void 0),Le([f("beans")],t.prototype,"beans",void 0),Le([f("filterStage")],t.prototype,"filterStage",void 0),Le([f("sortStage")],t.prototype,"sortStage",void 0),Le([f("flattenStage")],t.prototype,"flattenStage",void 0),Le([Y("groupStage")],t.prototype,"groupStage",void 0),Le([Y("aggregationStage")],t.prototype,"aggregationStage",void 0),Le([Y("pivotStage")],t.prototype,"pivotStage",void 0),Le([Y("filterAggregatesStage")],t.prototype,"filterAggregatesStage",void 0),Le([b],t.prototype,"init",null),t=Le([I("rowModel")],t),t}(D),US=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),rc=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},zS=function(n){US(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.execute=function(e){var r=e.changedPath;this.filterService.filter(r)},rc([f("filterService")],t.prototype,"filterService",void 0),t=rc([I("filterStage")],t),t}(D),$S=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Zs=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},KS=function(n){$S(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.execute=function(e){var r=this,i=this.sortController.getSortOptions(),o=z.exists(i)&&i.length>0,s=o&&z.exists(e.rowNodeTransactions)&&this.gridOptionsService.get("deltaSort"),a=i.some(function(l){var u=r.gridOptionsService.isColumnsSortingCoupledToGroup();return u?l.column.isPrimary()&&l.column.isRowGroupActive():!!l.column.getColDef().showRowGroup});this.sortService.sort(i,o,s,e.rowNodeTransactions,e.changedPath,a)},Zs([f("sortService")],t.prototype,"sortService",void 0),Zs([f("sortController")],t.prototype,"sortController",void 0),t=Zs([I("sortStage")],t),t}(D),YS=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),ea=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},qS=function(n){YS(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.execute=function(e){var r=e.rowNode,i=[],o=this.columnModel.isPivotMode(),s=o&&r.leafGroup,a=s?[r]:r.childrenAfterSort,l=this.getFlattenDetails();this.recursivelyAddToRowsToDisplay(l,a,i,o,0);var u=i.length>0,c=!s&&u&&l.groupIncludeTotalFooter;return c&&(r.createFooter(),this.addRowNodeToRowsToDisplay(l,r.sibling,i,0)),i},t.prototype.getFlattenDetails=function(){var e=this.gridOptionsService.get("groupRemoveSingleChildren"),r=!e&&this.gridOptionsService.get("groupRemoveLowestSingleChildren");return{groupRemoveLowestSingleChildren:r,groupRemoveSingleChildren:e,isGroupMultiAutoColumn:this.gridOptionsService.isGroupMultiAutoColumn(),hideOpenParents:this.gridOptionsService.get("groupHideOpenParents"),groupIncludeTotalFooter:this.gridOptionsService.get("groupIncludeTotalFooter"),getGroupIncludeFooter:this.gridOptionsService.getGroupIncludeFooter()}},t.prototype.recursivelyAddToRowsToDisplay=function(e,r,i,o,s){if(!z.missingOrEmpty(r))for(var a=0;a<r.length;a++){var l=r[a],u=l.hasChildren(),c=o&&!u,p=e.groupRemoveSingleChildren&&u&&l.childrenAfterGroup.length===1,d=e.groupRemoveLowestSingleChildren&&u&&l.leafGroup&&l.childrenAfterGroup.length===1,h=o&&l.leafGroup,v=e.hideOpenParents&&l.expanded&&!l.master&&!h,y=!c&&!v&&!p&&!d;if(y&&this.addRowNodeToRowsToDisplay(e,l,i,s),!(o&&l.leafGroup)){if(u){var C=p||d;if(l.expanded||C){var m=C?s:s+1;this.recursivelyAddToRowsToDisplay(e,l.childrenAfterSort,i,o,m);var w=e.getGroupIncludeFooter({node:l});w?(l.createFooter(),this.addRowNodeToRowsToDisplay(e,l.sibling,i,m)):l.destroyFooter()}}else if(l.master&&l.expanded){var E=this.createDetailNode(l);this.addRowNodeToRowsToDisplay(e,E,i,s)}}}},t.prototype.addRowNodeToRowsToDisplay=function(e,r,i,o){i.push(r),r.setUiLevel(e.isGroupMultiAutoColumn?0:o)},t.prototype.createDetailNode=function(e){if(z.exists(e.detailNode))return e.detailNode;var r=new U(this.beans);return r.detail=!0,r.selectable=!1,r.parent=e,z.exists(e.id)&&(r.id="detail_"+e.id),r.data=e.data,r.level=e.level+1,e.detailNode=r,r},ea([f("columnModel")],t.prototype,"columnModel",void 0),ea([f("beans")],t.prototype,"beans",void 0),t=ea([I("flattenStage")],t),t}(D),QS=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),ta=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},XS=function(n){QS(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.sort=function(e,r,i,o,s,a){var l=this,u=this.gridOptionsService.get("groupMaintainOrder"),c=this.columnModel.getAllGridColumns().some(function(y){return y.isRowGroupActive()}),p={};i&&o&&(p=this.calculateDirtyNodes(o));var d=this.columnModel.isPivotMode(),h=this.gridOptionsService.getCallback("postSortRows"),v=function(y){l.pullDownGroupDataForHideOpenParents(y.childrenAfterAggFilter,!0);var C=d&&y.leafGroup,m=u&&c&&!y.leafGroup&&!a;if(m){var w=y.childrenAfterAggFilter.slice(0);if(y.childrenAfterSort){var E={};y.childrenAfterSort.forEach(function(R,T){E[R.id]=T}),w.sort(function(R,T){var F,A;return((F=E[R.id])!==null&&F!==void 0?F:0)-((A=E[T.id])!==null&&A!==void 0?A:0)})}y.childrenAfterSort=w}else!r||C?y.childrenAfterSort=y.childrenAfterAggFilter.slice(0):i?y.childrenAfterSort=l.doDeltaSort(y,p,s,e):y.childrenAfterSort=l.rowNodeSorter.doFullSort(y.childrenAfterAggFilter,e);if(y.sibling&&(y.sibling.childrenAfterSort=y.childrenAfterSort),l.updateChildIndexes(y),h){var S={nodes:y.childrenAfterSort};h(S)}};s&&s.forEachChangedNodeDepthFirst(v),this.updateGroupDataForHideOpenParents(s)},t.prototype.calculateDirtyNodes=function(e){var r={},i=function(o){o&&o.forEach(function(s){return r[s.id]=!0})};return e&&e.forEach(function(o){i(o.add),i(o.update),i(o.remove)}),r},t.prototype.doDeltaSort=function(e,r,i,o){var s=this,a=e.childrenAfterAggFilter,l=e.childrenAfterSort;if(!l)return this.rowNodeSorter.doFullSort(a,o);var u={},c=[];a.forEach(function(v){r[v.id]||!i.canSkip(v)?c.push(v):u[v.id]=!0});var p=l.filter(function(v){return u[v.id]}),d=function(v,y){return{currentPos:y,rowNode:v}},h=c.map(d).sort(function(v,y){return s.rowNodeSorter.compareRowNodes(o,v,y)});return this.mergeSortedArrays(o,h,p.map(d)).map(function(v){var y=v.rowNode;return y})},t.prototype.mergeSortedArrays=function(e,r,i){for(var o=[],s=0,a=0;s<r.length&&a<i.length;){var l=this.rowNodeSorter.compareRowNodes(e,r[s],i[a]);l<0?o.push(r[s++]):o.push(i[a++])}for(;s<r.length;)o.push(r[s++]);for(;a<i.length;)o.push(i[a++]);return o},t.prototype.updateChildIndexes=function(e){if(!z.missing(e.childrenAfterSort))for(var r=e.childrenAfterSort,i=0;i<r.length;i++){var o=r[i],s=i===0,a=i===e.childrenAfterSort.length-1;o.setFirstChild(s),o.setLastChild(a),o.setChildIndex(i)}},t.prototype.updateGroupDataForHideOpenParents=function(e){var r=this;if(this.gridOptionsService.get("groupHideOpenParents")){if(this.gridOptionsService.get("treeData"))return z.warnOnce("The property hideOpenParents dose not work with Tree Data. This is because Tree Data has values at the group level, it doesn't make sense to hide them."),!1;var i=function(o){r.pullDownGroupDataForHideOpenParents(o.childrenAfterSort,!1),o.childrenAfterSort.forEach(function(s){s.hasChildren()&&i(s)})};e&&e.executeFromRootNode(function(o){return i(o)})}},t.prototype.pullDownGroupDataForHideOpenParents=function(e,r){var i=this;!this.gridOptionsService.get("groupHideOpenParents")||z.missing(e)||e.forEach(function(o){var s=i.columnModel.getGroupDisplayColumns();s.forEach(function(a){var l=a.getColDef().showRowGroup;if(typeof l!="string"){console.error("AG Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup");return}var u=l,c=i.columnModel.getPrimaryColumn(u),p=c===o.rowGroupColumn;if(!p)if(r)o.setGroupValue(a.getId(),void 0);else{var d=o.getFirstChildOfFirstChild(c);d&&o.setGroupValue(a.getId(),d.key)}})})},ta([f("columnModel")],t.prototype,"columnModel",void 0),ta([f("rowNodeSorter")],t.prototype,"rowNodeSorter",void 0),t=ta([I("sortService")],t),t}(D),JS=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),ic=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},ZS=function(n){JS(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.filter=function(e){var r=this.filterManager.isChildFilterPresent();this.filterNodes(r,e)},t.prototype.filterNodes=function(e,r){var i=this,o=function(u,c){u.hasChildren()&&e&&!c?u.childrenAfterFilter=u.childrenAfterGroup.filter(function(p){var d=p.childrenAfterFilter&&p.childrenAfterFilter.length>0,h=p.data&&i.filterManager.doesRowPassFilter({rowNode:p});return d||h}):u.childrenAfterFilter=u.childrenAfterGroup,u.sibling&&(u.sibling.childrenAfterFilter=u.childrenAfterFilter)};if(this.doingTreeDataFiltering()){var s=function(u,c){if(u.childrenAfterGroup)for(var p=0;p<u.childrenAfterGroup.length;p++){var d=u.childrenAfterGroup[p],h=c||i.filterManager.doesRowPassFilter({rowNode:d});d.childrenAfterGroup?s(u.childrenAfterGroup[p],h):o(d,h)}o(u,c)},a=function(u){return s(u,!1)};r.executeFromRootNode(a)}else{var l=function(u){return o(u,!1)};r.forEachChangedNodeDepthFirst(l,!0)}},t.prototype.doingTreeDataFiltering=function(){return this.gridOptionsService.get("treeData")&&!this.gridOptionsService.get("excludeChildrenWhenTreeDataFiltering")},ic([f("filterManager")],t.prototype,"filterManager",void 0),t=ic([I("filterService")],t),t}(D),ew=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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 i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},tw=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return o},rw=function(n){ew(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.postConstruct=function(){var e=this;this.rowModel.getType()==="clientSide"&&(this.clientSideRowModel=this.rowModel,this.addManagedPropertyListener("rowData",function(){return e.onRowDataUpdated()}))},t.prototype.isActive=function(){var e=this.gridOptionsService.exists("getRowId"),r=this.gridOptionsService.get("resetRowDataOnUpdate");return r?!1:e},t.prototype.setRowData=function(e){var r=this.createTransactionForRowData(e);if(r){var i=tw(r,2),o=i[0],s=i[1];this.clientSideRowModel.updateRowData(o,s)}},t.prototype.createTransactionForRowData=function(e){if(z.missing(this.clientSideRowModel)){console.error("AG Grid: ImmutableService only works with ClientSideRowModel");return}var r=this.gridOptionsService.getCallback("getRowId");if(r==null){console.error("AG Grid: ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!");return}var i={remove:[],update:[],add:[]},o=this.clientSideRowModel.getCopyOfNodesMap(),s=this.gridOptionsService.get("suppressMaintainUnsortedOrder"),a=s?void 0:{};return z.exists(e)&&e.forEach(function(l,u){var c=r({data:l,level:0}),p=o[c];if(a&&(a[c]=u),p){var d=p.data!==l;d&&i.update.push(l),o[c]=void 0}else i.add.push(l)}),z.iterateObject(o,function(l,u){u&&i.remove.push(u.data)}),[i,a]},t.prototype.onRowDataUpdated=function(){var e=this.gridOptionsService.get("rowData");e&&(this.isActive()?this.setRowData(e):(this.selectionService.reset("rowDataChanged"),this.clientSideRowModel.setRowData(e)))},Li([f("rowModel")],t.prototype,"rowModel",void 0),Li([f("rowRenderer")],t.prototype,"rowRenderer",void 0),Li([f("selectionService")],t.prototype,"selectionService",void 0),Li([b],t.prototype,"postConstruct",null),t=Li([I("immutableService")],t),t}(D),iw="31.0.1",ow={version:iw,moduleName:M.ClientSideRowModelModule,rowModel:"clientSide",beans:[jS,zS,KS,qS,XS,ZS,rw]},nw=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),ra=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},oc=function(n){nw(t,n);function t(e,r,i){var o=n.call(this,e)||this;return o.parentCache=r,o.params=i,o.startRow=e*i.blockSize,o.endRow=o.startRow+i.blockSize,o}return t.prototype.postConstruct=function(){this.createRowNodes()},t.prototype.getBlockStateJson=function(){return{id:""+this.getId(),state:{blockNumber:this.getId(),startRow:this.getStartRow(),endRow:this.getEndRow(),pageStatus:this.getState()}}},t.prototype.setDataAndId=function(e,r,i){z.exists(r)?e.setDataAndId(r,i.toString()):e.setDataAndId(void 0,void 0)},t.prototype.loadFromDatasource=function(){var e=this,r=this.createLoadParams();if(z.missing(this.params.datasource.getRows)){console.warn("AG Grid: datasource is missing getRows method");return}window.setTimeout(function(){e.params.datasource.getRows(r)},0)},t.prototype.processServerFail=function(){},t.prototype.createLoadParams=function(){var e={startRow:this.getStartRow(),endRow:this.getEndRow(),successCallback:this.pageLoaded.bind(this,this.getVersion()),failCallback:this.pageLoadFailed.bind(this,this.getVersion()),sortModel:this.params.sortModel,filterModel:this.params.filterModel,context:this.gridOptionsService.context};return e},t.prototype.forEachNode=function(e,r,i){var o=this;this.rowNodes.forEach(function(s,a){var l=o.startRow+a;l<i&&e(s,r.next())})},t.prototype.getLastAccessed=function(){return this.lastAccessed},t.prototype.getRow=function(e,r){r===void 0&&(r=!1),r||(this.lastAccessed=this.params.lastAccessedSequence.next());var i=e-this.startRow;return this.rowNodes[i]},t.prototype.getStartRow=function(){return this.startRow},t.prototype.getEndRow=function(){return this.endRow},t.prototype.createRowNodes=function(){this.rowNodes=[];for(var e=0;e<this.params.blockSize;e++){var r=this.startRow+e,i=new U(this.beans);i.setRowHeight(this.params.rowHeight),i.uiLevel=0,i.setRowIndex(r),i.setRowTop(this.params.rowHeight*r),this.rowNodes.push(i)}},t.prototype.processServerResult=function(e){var r=this;this.rowNodes.forEach(function(o,s){var a=e.rowData?e.rowData[s]:void 0;!o.id&&o.alreadyRendered&&a&&(r.rowNodes[s]=new U(r.beans),r.rowNodes[s].setRowIndex(o.rowIndex),r.rowNodes[s].setRowTop(o.rowTop),r.rowNodes[s].setRowHeight(o.rowHeight),o.clearRowTopAndRowIndex()),r.setDataAndId(r.rowNodes[s],a,r.startRow+s)});var i=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,i)},t.prototype.destroyRowNodes=function(){this.rowNodes.forEach(function(e){e.clearRowTopAndRowIndex()})},ra([f("beans")],t.prototype,"beans",void 0),ra([b],t.prototype,"postConstruct",null),ra([Se],t.prototype,"destroyRowNodes",null),t}(xs),sw=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},aw=function(n,t){return function(e,r){t(e,r,n)}},lw=function(n){sw(t,n);function t(e){var r=n.call(this)||this;return r.lastRowIndexKnown=!1,r.blocks={},r.blockCount=0,r.rowCount=e.initialRowCount,r.params=e,r}return t.prototype.setBeans=function(e){this.logger=e.create("InfiniteCache")},t.prototype.getRow=function(e,r){r===void 0&&(r=!1);var i=Math.floor(e/this.params.blockSize),o=this.blocks[i];if(!o){if(r)return;o=this.createBlock(i)}return o.getRow(e)},t.prototype.createBlock=function(e){var r=this.createBean(new oc(e,this,this.params));return this.blocks[r.getId()]=r,this.blockCount++,this.purgeBlocksIfNeeded(r),this.params.rowNodeBlockLoader.addBlock(r),r},t.prototype.refreshCache=function(){var e=this.blockCount==0;if(e){this.purgeCache();return}this.getBlocksInOrder().forEach(function(r){return r.setStateWaitingToLoad()}),this.params.rowNodeBlockLoader.checkBlockToLoad()},t.prototype.destroyAllBlocks=function(){var e=this;this.getBlocksInOrder().forEach(function(r){return e.destroyBlock(r)})},t.prototype.getRowCount=function(){return this.rowCount},t.prototype.isLastRowIndexKnown=function(){return this.lastRowIndexKnown},t.prototype.pageLoaded=function(e,r){this.isAlive()&&(this.logger.log("onPageLoaded: page = ".concat(e.getId(),", lastRow = ").concat(r)),this.checkRowCount(e,r),this.onCacheUpdated())},t.prototype.purgeBlocksIfNeeded=function(e){var r=this,i=this.getBlocksInOrder().filter(function(u){return u!=e}),o=function(u,c){return c.getLastAccessed()-u.getLastAccessed()};i.sort(o);var s=this.params.maxBlocksInCache>0,a=s?this.params.maxBlocksInCache-1:null,l=t.MAX_EMPTY_BLOCKS_TO_KEEP-1;i.forEach(function(u,c){var p=u.getState()===oc.STATE_WAITING_TO_LOAD&&c>=l,d=s?c>=a:!1;if(p||d){if(r.isBlockCurrentlyDisplayed(u)||r.isBlockFocused(u))return;r.removeBlockFromCache(u)}})},t.prototype.isBlockFocused=function(e){var r=this.focusService.getFocusCellToUseAfterRefresh();if(!r||r.rowPinned!=null)return!1;var i=e.getStartRow(),o=e.getEndRow(),s=r.rowIndex>=i&&r.rowIndex<o;return s},t.prototype.isBlockCurrentlyDisplayed=function(e){var r=e.getStartRow(),i=e.getEndRow()-1;return this.rowRenderer.isRangeInRenderedViewport(r,i)},t.prototype.removeBlockFromCache=function(e){e&&this.destroyBlock(e)},t.prototype.checkRowCount=function(e,r){if(typeof r=="number"&&r>=0)this.rowCount=r,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){var i=(e.getId()+1)*this.params.blockSize,o=i+this.params.overflowSize;this.rowCount<o&&(this.rowCount=o)}},t.prototype.setRowCount=function(e,r){this.rowCount=e,z.exists(r)&&(this.lastRowIndexKnown=r),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()},t.prototype.forEachNodeDeep=function(e){var r=this,i=new Tr;this.getBlocksInOrder().forEach(function(o){return o.forEachNode(e,i,r.rowCount)})},t.prototype.getBlocksInOrder=function(){var e=function(i,o){return i.getId()-o.getId()},r=z.getAllValuesInObject(this.blocks).sort(e);return r},t.prototype.destroyBlock=function(e){delete this.blocks[e.getId()],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)},t.prototype.onCacheUpdated=function(){if(this.isAlive()){this.destroyAllBlocksPastVirtualRowCount();var e={type:g.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(e)}},t.prototype.destroyAllBlocksPastVirtualRowCount=function(){var e=this,r=[];this.getBlocksInOrder().forEach(function(i){var o=i.getId()*e.params.blockSize;o>=e.rowCount&&r.push(i)}),r.length>0&&r.forEach(function(i){return e.destroyBlock(i)})},t.prototype.purgeCache=function(){var e=this;this.getBlocksInOrder().forEach(function(r){return e.removeBlockFromCache(r)}),this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()},t.prototype.getRowNodesInRange=function(e,r){var i=this,o=[],s=-1,a=!1,l=new Tr;z.missing(e)&&(a=!0);var u=!1;this.getBlocksInOrder().forEach(function(p){if(!u){if(a&&s+1!==p.getId()){u=!0;return}s=p.getId(),p.forEachNode(function(d){var h=d===e||d===r;(a||h)&&o.push(d),h&&(a=!a)},l,i.rowCount)}});var c=u||a;return c?[]:o},t.MAX_EMPTY_BLOCKS_TO_KEEP=2,zo([f("rowRenderer")],t.prototype,"rowRenderer",void 0),zo([f("focusService")],t.prototype,"focusService",void 0),zo([aw(0,Re("loggerFactory"))],t.prototype,"setBeans",null),zo([Se],t.prototype,"destroyAllBlocks",null),t}(D),uw=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),qt=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},cw=function(n){uw(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.getRowBounds=function(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}},t.prototype.ensureRowHeightsValid=function(e,r,i,o){return!1},t.prototype.init=function(){var e=this;this.gridOptionsService.isRowModelType("infinite")&&(this.rowHeight=this.gridOptionsService.getRowHeightAsNumber(),this.addEventListeners(),this.addDestroyFunc(function(){return e.destroyCache()}),this.verifyProps())},t.prototype.verifyProps=function(){this.gridOptionsService.exists("initialGroupOrderComparator")&&z.warnOnce("initialGroupOrderComparator cannot be used with Infinite Row Model as sorting is done on the server side")},t.prototype.start=function(){this.setDatasource(this.gridOptionsService.get("datasource"))},t.prototype.destroyDatasource=function(){this.datasource&&(this.getContext().destroyBean(this.datasource),this.rowRenderer.datasourceChanged(),this.datasource=null)},t.prototype.addEventListeners=function(){var e=this;this.addManagedListener(this.eventService,g.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverything.bind(this)),this.addManagedListener(this.eventService,g.EVENT_STORE_UPDATED,this.onCacheUpdated.bind(this)),this.addManagedPropertyListener("datasource",function(){return e.setDatasource(e.gridOptionsService.get("datasource"))}),this.addManagedPropertyListener("cacheBlockSize",function(){return e.resetCache()}),this.addManagedPropertyListener("rowHeight",function(){e.rowHeight=e.gridOptionsService.getRowHeightAsNumber(),e.cacheParams.rowHeight=e.rowHeight,e.updateRowHeights()})},t.prototype.onFilterChanged=function(){this.reset()},t.prototype.onSortChanged=function(){this.reset()},t.prototype.onColumnEverything=function(){var e;this.cacheParams?e=this.isSortModelDifferent():e=!0,e&&this.reset()},t.prototype.isSortModelDifferent=function(){return!z.jsonEquals(this.cacheParams.sortModel,this.sortController.getSortModel())},t.prototype.getType=function(){return"infinite"},t.prototype.setDatasource=function(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()},t.prototype.isEmpty=function(){return!this.infiniteCache},t.prototype.isRowsToRender=function(){return!!this.infiniteCache},t.prototype.getNodesInRangeForSelection=function(e,r){return this.infiniteCache?this.infiniteCache.getRowNodesInRange(e,r):[]},t.prototype.reset=function(){if(this.datasource){var e=this.gridOptionsService.getCallback("getRowId"),r=e!=null;r||this.selectionService.reset("rowDataChanged"),this.resetCache()}},t.prototype.createModelUpdatedEvent=function(){return{type:g.EVENT_MODEL_UPDATED,newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1}},t.prototype.resetCache=function(){this.destroyCache(),this.cacheParams={datasource:this.datasource,filterModel:this.filterManager.getFilterModel(),sortModel:this.sortController.getSortModel(),rowNodeBlockLoader:this.rowNodeBlockLoader,initialRowCount:this.gridOptionsService.get("infiniteInitialRowCount"),maxBlocksInCache:this.gridOptionsService.get("maxBlocksInCache"),rowHeight:this.gridOptionsService.getRowHeightAsNumber(),overflowSize:this.gridOptionsService.get("cacheOverflowSize"),blockSize:this.gridOptionsService.get("cacheBlockSize"),lastAccessedSequence:new Tr},this.infiniteCache=this.createBean(new lw(this.cacheParams)),this.eventService.dispatchEventOnce({type:g.EVENT_ROW_COUNT_READY});var e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)},t.prototype.updateRowHeights=function(){var e=this;this.forEachNode(function(i){i.setRowHeight(e.rowHeight),i.setRowTop(e.rowHeight*i.rowIndex)});var r=this.createModelUpdatedEvent();this.eventService.dispatchEvent(r)},t.prototype.destroyCache=function(){this.infiniteCache&&(this.infiniteCache=this.destroyBean(this.infiniteCache))},t.prototype.onCacheUpdated=function(){var e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)},t.prototype.getRow=function(e){if(this.infiniteCache&&!(e>=this.infiniteCache.getRowCount()))return this.infiniteCache.getRow(e)},t.prototype.getRowNode=function(e){var r;return this.forEachNode(function(i){i.id===e&&(r=i)}),r},t.prototype.forEachNode=function(e){this.infiniteCache&&this.infiniteCache.forEachNodeDeep(e)},t.prototype.getTopLevelRowCount=function(){return this.getRowCount()},t.prototype.getTopLevelRowDisplayedIndex=function(e){return e},t.prototype.getRowIndexAtPixel=function(e){if(this.rowHeight!==0){var r=Math.floor(e/this.rowHeight),i=this.getRowCount()-1;return r>i?i:r}return 0},t.prototype.getRowCount=function(){return this.infiniteCache?this.infiniteCache.getRowCount():0},t.prototype.isRowPresent=function(e){var r=this.getRowNode(e.id);return!!r},t.prototype.refreshCache=function(){this.infiniteCache&&this.infiniteCache.refreshCache()},t.prototype.purgeCache=function(){this.infiniteCache&&this.infiniteCache.purgeCache()},t.prototype.isLastRowIndexKnown=function(){return this.infiniteCache?this.infiniteCache.isLastRowIndexKnown():!1},t.prototype.setRowCount=function(e,r){this.infiniteCache&&this.infiniteCache.setRowCount(e,r)},qt([f("filterManager")],t.prototype,"filterManager",void 0),qt([f("sortController")],t.prototype,"sortController",void 0),qt([f("selectionService")],t.prototype,"selectionService",void 0),qt([f("rowRenderer")],t.prototype,"rowRenderer",void 0),qt([f("rowNodeBlockLoader")],t.prototype,"rowNodeBlockLoader",void 0),qt([b],t.prototype,"init",null),qt([Se],t.prototype,"destroyDatasource",null),t=qt([I("rowModel")],t),t}(D),pw="31.0.1",dw={version:pw,moduleName:M.InfiniteRowModelModule,rowModel:"infinite",beans:[cw]},hw=function(){function n(){}return n.prototype.setBeans=function(t){this.beans=t},n.prototype.getFileName=function(t){var e=this.getDefaultFileExtension();return(t==null||!t.length)&&(t=this.getDefaultFileName()),t.indexOf(".")===-1?"".concat(t,".").concat(e):t},n.prototype.getData=function(t){var e=this.createSerializingSession(t),r=this.beans.gridSerializer.serialize(e,t);return r},n.prototype.getDefaultFileName=function(){return"export.".concat(this.getDefaultFileExtension())},n}(),fw=function(){function n(t){this.groupColumns=[];var e=t.columnModel,r=t.valueService,i=t.gridOptionsService,o=t.valueFormatterService,s=t.valueParserService,a=t.processCellCallback,l=t.processHeaderCallback,u=t.processGroupHeaderCallback,c=t.processRowGroupCallback;this.columnModel=e,this.valueService=r,this.gridOptionsService=i,this.valueFormatterService=o,this.valueParserService=s,this.processCellCallback=a,this.processHeaderCallback=l,this.processGroupHeaderCallback=u,this.processRowGroupCallback=c}return n.prototype.prepare=function(t){this.groupColumns=t.filter(function(e){return!!e.getColDef().showRowGroup})},n.prototype.extractHeaderValue=function(t){var e=this.getHeaderName(this.processHeaderCallback,t);return e??""},n.prototype.extractRowCellValue=function(t,e,r,i,o){var s=this.gridOptionsService.get("groupHideOpenParents"),a=(!s||o.footer)&&this.shouldRenderGroupSummaryCell(o,t,e)?this.createValueForGroupNode(o):this.valueService.getValue(t,o),l=this.processCell({accumulatedRowIndex:r,rowNode:o,column:t,value:a,processCellCallback:this.processCellCallback,type:i});return l},n.prototype.shouldRenderGroupSummaryCell=function(t,e,r){var i,o=t&&t.group;if(!o)return!1;var s=this.groupColumns.indexOf(e);if(s!==-1){if(((i=t.groupData)===null||i===void 0?void 0:i[e.getId()])!=null||this.gridOptionsService.isRowModelType("serverSide")&&t.group)return!0;if(t.footer&&t.level===-1){var a=e.getColDef(),l=a==null||a.showRowGroup===!0;return l||a.showRowGroup===this.columnModel.getRowGroupColumns()[0].getId()}}var u=this.gridOptionsService.isGroupUseEntireRow(this.columnModel.isPivotMode());return r===0&&u},n.prototype.getHeaderName=function(t,e){return t?t({column:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context}):this.columnModel.getDisplayNameForColumn(e,"csv",!0)},n.prototype.createValueForGroupNode=function(t){if(this.processRowGroupCallback)return this.processRowGroupCallback({node:t,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context});var e=t.footer,r=[t.key];if(!this.gridOptionsService.isGroupMultiAutoColumn())for(;t.parent;)t=t.parent,r.push(t.key);var i=r.reverse().join(" -> ");return e?"Total ".concat(i):i},n.prototype.processCell=function(t){var e=this,r,i=t.accumulatedRowIndex,o=t.rowNode,s=t.column,a=t.value,l=t.processCellCallback,u=t.type;return l?{value:(r=l({accumulatedRowIndex:i,column:s,node:o,value:a,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,type:u,parseValue:function(c){return e.valueParserService.parseValue(s,o,c,e.valueService.getValue(s,o))},formatValue:function(c){var p;return(p=e.valueFormatterService.formatValue(s,o,c))!==null&&p!==void 0?p:c}}))!==null&&r!==void 0?r:""}:s.getColDef().useValueFormatterForExport!==!1?{value:a??"",valueFormatted:this.valueFormatterService.formatValue(s,o,a)}:{value:a??""}},n}(),vw=function(){function n(){}return n.download=function(t,e){var r=document.defaultView||window;if(!r){console.warn("AG Grid: There is no `window` associated with the current `document`");return}var i=document.createElement("a"),o=r.URL.createObjectURL(e);i.setAttribute("href",o),i.setAttribute("download",t),i.style.display="none",document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:r})),document.body.removeChild(i),r.setTimeout(function(){r.URL.revokeObjectURL(o)},0)},n}(),gw=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),nc=`\r
|
||
`,yw=function(n){gw(t,n);function t(e){var r=n.call(this,e)||this;r.isFirstLine=!0,r.result="";var i=e.suppressQuotes,o=e.columnSeparator;return r.suppressQuotes=i,r.columnSeparator=o,r}return t.prototype.addCustomContent=function(e){var r=this;e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,nc),this.result+=e):e.forEach(function(i){r.beginNewLine(),i.forEach(function(o,s){s!==0&&(r.result+=r.columnSeparator),r.result+=r.putInQuotes(o.data.value||""),o.mergeAcross&&r.appendEmptyCells(o.mergeAcross)})}))},t.prototype.onNewHeaderGroupingRow=function(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}},t.prototype.onNewHeaderGroupingRowColumn=function(e,r,i,o){i!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(r),this.appendEmptyCells(o)},t.prototype.appendEmptyCells=function(e){for(var r=1;r<=e;r++)this.result+=this.columnSeparator+this.putInQuotes("")},t.prototype.onNewHeaderRow=function(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}},t.prototype.onNewHeaderRowColumn=function(e,r){r!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))},t.prototype.onNewBodyRow=function(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}},t.prototype.onNewBodyRowColumn=function(e,r,i){var o;r!=0&&(this.result+=this.columnSeparator);var s=this.extractRowCellValue(e,r,r,"csv",i);this.result+=this.putInQuotes((o=s.valueFormatted)!==null&&o!==void 0?o:s.value)},t.prototype.putInQuotes=function(e){if(this.suppressQuotes)return e;if(e==null)return'""';var r;typeof e=="string"?r=e:typeof e.toString=="function"?r=e.toString():(console.warn("AG Grid: unknown value type during csv conversion"),r="");var i=r.replace(/"/g,'""');return'"'+i+'"'},t.prototype.parse=function(){return this.result},t.prototype.beginNewLine=function(){this.isFirstLine||(this.result+=nc),this.isFirstLine=!1},t}(fw),Cw=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Qt=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},mw=function(n){Cw(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.postConstruct=function(){this.setBeans({gridSerializer:this.gridSerializer,gridOptionsService:this.gridOptionsService})},t.prototype.getMergedParams=function(e){var r=this.gridOptionsService.get("defaultCsvExportParams");return Object.assign({},r,e)},t.prototype.export=function(e){if(this.isExportSuppressed())return console.warn("AG Grid: Export cancelled. Export is not allowed as per your configuration."),"";var r=this.getMergedParams(e),i=this.getData(r),o=new Blob(["\uFEFF",i],{type:"text/plain"});return vw.download(this.getFileName(r.fileName),o),i},t.prototype.exportDataAsCsv=function(e){return this.export(e)},t.prototype.getDataAsCsv=function(e,r){r===void 0&&(r=!1);var i=r?Object.assign({},e):this.getMergedParams(e);return this.getData(i)},t.prototype.getDefaultFileExtension=function(){return"csv"},t.prototype.createSerializingSession=function(e){var r=this,i=r.columnModel,o=r.valueService,s=r.gridOptionsService,a=r.valueFormatterService,l=r.valueParserService,u=e,c=u.processCellCallback,p=u.processHeaderCallback,d=u.processGroupHeaderCallback,h=u.processRowGroupCallback,v=u.suppressQuotes,y=u.columnSeparator;return new yw({columnModel:i,valueService:o,gridOptionsService:s,valueFormatterService:a,valueParserService:l,processCellCallback:c||void 0,processHeaderCallback:p||void 0,processGroupHeaderCallback:d||void 0,processRowGroupCallback:h||void 0,suppressQuotes:v||!1,columnSeparator:y||","})},t.prototype.isExportSuppressed=function(){return this.gridOptionsService.get("suppressCsvExport")},Qt([f("columnModel")],t.prototype,"columnModel",void 0),Qt([f("valueService")],t.prototype,"valueService",void 0),Qt([f("gridSerializer")],t.prototype,"gridSerializer",void 0),Qt([f("gridOptionsService")],t.prototype,"gridOptionsService",void 0),Qt([f("valueFormatterService")],t.prototype,"valueFormatterService",void 0),Qt([f("valueParserService")],t.prototype,"valueParserService",void 0),Qt([b],t.prototype,"postConstruct",null),t=Qt([I("csvCreator")],t),t}(hw),Sw=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},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)}}(),Xt=function(n,t,e,r){var i=arguments.length,o=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(i<3?s(o):i>3?s(t,e,o):s(t,e))||o);return i>3&&o&&Object.defineProperty(t,e,o),o},sc;(function(n){n[n.HEADER_GROUPING=0]="HEADER_GROUPING",n[n.HEADER=1]="HEADER",n[n.BODY=2]="BODY"})(sc||(sc={}));var ww=function(n){Sw(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.serialize=function(e,r){r===void 0&&(r={});var i=r.allColumns,o=r.columnKeys,s=r.skipRowGroups,a=this.getColumnsToExport(i,s,o),l=z.compose(this.prepareSession(a),this.prependContent(r),this.exportColumnGroups(r,a),this.exportHeaders(r,a),this.processPinnedTopRows(r,a),this.processRows(r,a),this.processPinnedBottomRows(r,a),this.appendContent(r));return l(e).parse()},t.prototype.processRow=function(e,r,i,o){var s=r.shouldRowBeSkipped||function(){return!1},a=this.gridOptionsService.context,l=this.gridOptionsService.api,u=this.gridOptionsService.columnApi,c=this.gridOptionsService.get("groupRemoveSingleChildren"),p=this.gridOptionsService.get("groupRemoveLowestSingleChildren"),d=r.rowPositions!=null,h=d||!!r.onlySelected,v=this.gridOptionsService.get("groupHideOpenParents")&&!h,y=this.columnModel.isPivotMode()?o.leafGroup:!o.group,C=!!o.footer;r.skipRowGroups;var m=p&&o.leafGroup,w=o.allChildrenCount===1&&(c||m);if(!(!y&&!C&&(r.skipRowGroups||w||v)||r.onlySelected&&!o.isSelected()||r.skipPinnedTop&&o.rowPinned==="top"||r.skipPinnedBottom&&o.rowPinned==="bottom")){var E=o.level===-1;if(!(E&&!y&&!C)){var S=s({node:o,api:l,columnApi:u,context:a});if(!S){var R=e.onNewBodyRow(o);if(i.forEach(function(F,A){R.onColumn(F,A,o)}),r.getCustomContentBelowRow){var T=r.getCustomContentBelowRow({node:o,api:l,columnApi:u,context:a});T&&e.addCustomContent(T)}}}}},t.prototype.appendContent=function(e){return function(r){var i=e.appendContent;return i&&r.addCustomContent(i),r}},t.prototype.prependContent=function(e){return function(r){var i=e.prependContent;return i&&r.addCustomContent(i),r}},t.prototype.prepareSession=function(e){return function(r){return r.prepare(e),r}},t.prototype.exportColumnGroups=function(e,r){var i=this;return function(o){if(!e.skipColumnGroupHeaders){var s=new Fa,a=i.displayedGroupCreator.createDisplayedGroups(r,s,null);i.recursivelyAddHeaderGroups(a,o,e.processGroupHeaderCallback)}return o}},t.prototype.exportHeaders=function(e,r){return function(i){if(!e.skipColumnHeaders){var o=i.onNewHeaderRow();r.forEach(function(s,a){o.onColumn(s,a,void 0)})}return i}},t.prototype.processPinnedTopRows=function(e,r){var i=this;return function(o){var s=i.processRow.bind(i,o,e,r);return e.rowPositions?e.rowPositions.filter(function(a){return a.rowPinned==="top"}).sort(function(a,l){return a.rowIndex-l.rowIndex}).map(function(a){return i.pinnedRowModel.getPinnedTopRow(a.rowIndex)}).forEach(s):i.pinnedRowModel.forEachPinnedTopRow(s),o}},t.prototype.processRows=function(e,r){var i=this;return function(o){var s=i.rowModel,a=s.getType(),l=a==="clientSide",u=a==="serverSide",c=!l&&e.onlySelected,p=i.processRow.bind(i,o,e,r),d=e.exportedRows,h=d===void 0?"filteredAndSorted":d;if(e.rowPositions)e.rowPositions.filter(function(y){return y.rowPinned==null}).sort(function(y,C){return y.rowIndex-C.rowIndex}).map(function(y){return s.getRow(y.rowIndex)}).forEach(p);else if(i.columnModel.isPivotMode())l?s.forEachPivotNode(p,!0):u?s.forEachNodeAfterFilterAndSort(p,!0):s.forEachNode(p);else if(e.onlySelectedAllPages||c){var v=i.selectionService.getSelectedNodes();i.replicateSortedOrder(v),v.forEach(p)}else h==="all"?s.forEachNode(p):l||u?s.forEachNodeAfterFilterAndSort(p,!0):s.forEachNode(p);return o}},t.prototype.replicateSortedOrder=function(e){var r=this,i=this.sortController.getSortOptions(),o=function(s,a){var l,u,c,p;return s.rowIndex!=null&&a.rowIndex!=null?s.rowIndex-a.rowIndex:s.level===a.level?((l=s.parent)===null||l===void 0?void 0:l.id)===((u=a.parent)===null||u===void 0?void 0:u.id)?r.rowNodeSorter.compareRowNodes(i,{rowNode:s,currentPos:(c=s.rowIndex)!==null&&c!==void 0?c:-1},{rowNode:a,currentPos:(p=a.rowIndex)!==null&&p!==void 0?p:-1}):o(s.parent,a.parent):s.level>a.level?o(s.parent,a):o(s,a.parent)};e.sort(o)},t.prototype.processPinnedBottomRows=function(e,r){var i=this;return function(o){var s=i.processRow.bind(i,o,e,r);return e.rowPositions?e.rowPositions.filter(function(a){return a.rowPinned==="bottom"}).sort(function(a,l){return a.rowIndex-l.rowIndex}).map(function(a){return i.pinnedRowModel.getPinnedBottomRow(a.rowIndex)}).forEach(s):i.pinnedRowModel.forEachPinnedBottomRow(s),o}},t.prototype.getColumnsToExport=function(e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);var o=this.columnModel.isPivotMode();if(i&&i.length)return this.columnModel.getGridColumns(i);var s=this.gridOptionsService.get("treeData"),a=[];if(e&&!o){var l=s?this.columnModel.getGridColumns([tr]):[];a=l.concat(this.columnModel.getAllGridColumns())}else a=this.columnModel.getAllDisplayedColumns();return r&&!s&&(a=a.filter(function(u){return u.getColId()!==tr})),a},t.prototype.recursivelyAddHeaderGroups=function(e,r,i){var o=[];e.forEach(function(s){var a=s;a.getChildren&&a.getChildren().forEach(function(l){return o.push(l)})}),e.length>0&&e[0]instanceof ce&&this.doAddHeaderHeader(r,e,i),o&&o.length>0&&this.recursivelyAddHeaderGroups(o,r,i)},t.prototype.doAddHeaderHeader=function(e,r,i){var o=this,s=e.onNewHeaderGroupingRow(),a=0;r.forEach(function(l){var u=l,c;i?c=i({columnGroup:u,api:o.gridOptionsService.api,columnApi:o.gridOptionsService.columnApi,context:o.gridOptionsService.context}):c=o.columnModel.getDisplayNameForColumnGroup(u,"header");var p=u.getLeafColumns().reduce(function(d,h,v,y){var C=z.last(d),m=h.getColumnGroupShow()==="open";return m?(!C||C[1]!=null)&&(C=[v],d.push(C)):C&&C[1]==null&&(C[1]=v-1),v===y.length-1&&C&&C[1]==null&&(C[1]=v),d},[]);s.onColumn(u,c||"",a++,u.getLeafColumns().length-1,p)})},Xt([f("displayedGroupCreator")],t.prototype,"displayedGroupCreator",void 0),Xt([f("columnModel")],t.prototype,"columnModel",void 0),Xt([f("rowModel")],t.prototype,"rowModel",void 0),Xt([f("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),Xt([f("selectionService")],t.prototype,"selectionService",void 0),Xt([f("rowNodeSorter")],t.prototype,"rowNodeSorter",void 0),Xt([f("sortController")],t.prototype,"sortController",void 0),t=Xt([I("gridSerializer")],t),t}(D),Ew="31.0.1",_w={version:Ew,moduleName:M.CsvExportModule,beans:[mw,ww]},Rw=[ow,dw,_w];k.registerModules(Rw);const Ow=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||
<path d="M9 4h6a2 2 0 0 1 2 2v14l-5 -3l-5 3v-14a2 2 0 0 1 2 -2"></path>
|
||
</svg>`,Tw=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||
<path d="M15 3a3 3 0 0 1 2.995 2.824l.005 .176v14a1 1 0 0 1 -1.413 .911l-.101 -.054l-4.487 -2.691l-4.485 2.691a1 1 0 0 1 -1.508 -.743l-.006 -.114v-14a3 3 0 0 1 2.824 -2.995l.176 -.005h6z" stroke-width="0" fill="currentColor"></path>
|
||
</svg>`,ac=`<svg width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||
<path d="M18 6l-12 12"/>
|
||
<path d="M6 6l12 12"/>
|
||
</svg>`,lc=`<svg width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||
<path d="M4 7l16 0"/>
|
||
<path d="M10 11l0 6"/>
|
||
<path d="M14 11l0 6"/>
|
||
<path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"/>
|
||
<path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"/>
|
||
</svg>`,Pw=`<svg
|
||
width="24"
|
||
height="24"
|
||
viewBox="0 0 24 24"
|
||
stroke-width="2"
|
||
stroke="currentColor"
|
||
fill="none"
|
||
stroke-linecap="round"
|
||
stroke-linejoin="round"
|
||
>
|
||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||
<path d="M7 4v16l13 -8z" />
|
||
</svg>
|
||
`,Dw=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||
<path d="M9 4.55a8 8 0 0 1 6 14.9m0 -4.45v5h5"></path>
|
||
<path d="M5.63 7.16l0 .01"></path>
|
||
<path d="M4.06 11l0 .01"></path>
|
||
<path d="M4.63 15.1l0 .01"></path>
|
||
<path d="M7.16 18.37l0 .01"></path>
|
||
<path d="M11 19.94l0 .01"></path>
|
||
</svg>`,Aw=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||
<path d="M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2"></path>
|
||
<path d="M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path>
|
||
<path d="M14 4l0 4l-6 0l0 -4"></path>
|
||
</svg>`,bw=`<svg width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||
<path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"/>
|
||
<path d="M21 21l-6 -6"/>
|
||
</svg>`,Fw=Vs.prototype.setFocusedCell;Vs.prototype.setFocusedCell=function(n){return n.preventScrollOnBrowserFocus==null&&(n.preventScrollOnBrowserFocus=!0),Fw.call(this,n)};const Lw=(n,t)=>{if(n.getDisplayedRowCount()===0)return;const e=n.paginationGetPageSize()*n.paginationGetCurrentPage(),i=n.getDisplayedRowAtIndex(e).rowTop,o=Math.min(n.paginationGetPageSize()*(n.paginationGetCurrentPage()+1)-1,n.getDisplayedRowCount()-1),s=n.getDisplayedRowAtIndex(o),a=s.rowTop+s.rowHeight;let l;return n.forEachNodeAfterFilterAndSort(u=>{const c=u.rowTop,p=u.rowHeight;if(c<a){const d=t-(c-i);d>0&&d<p&&(l=u)}}),l},ia=(n,t,e)=>{const r=n.paginationGetPageSize()*n.paginationGetCurrentPage(),o=n.getDisplayedRowAtIndex(r).rowTop;return e-(t.rowTop-o)},Iw=(n,t,e)=>ia(n,t,e)<t.rowHeight/2?Xe.Above:Xe.Below,uc=(n,t=300)=>{let e;return function(...r){clearTimeout(e),e=setTimeout(()=>n.apply(this,r),t)}},xw=n=>(n+"").replace(/[/][/].*$/gm,"").replace(/\s+/g,"").replace(/[/][*][^/*]*[*][/]/g,"").split("){",1)[0].replace(/^[^(]*[(]/,"").replace(/=[^,]+/g,"").split(",").filter(Boolean);var Mw={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const cc=n=>{let t;const e=new Set,r=(l,u)=>{const c=typeof l=="function"?l(t):l;if(!Object.is(c,t)){const p=t;t=u??(typeof c!="object"||c===null)?c:Object.assign({},t,c),e.forEach(d=>d(t,p))}},i=()=>t,a={setState:r,getState:i,subscribe:l=>(e.add(l),()=>e.delete(l)),destroy:()=>{(Mw?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),e.clear()}};return t=n(r,i,a),a},oa=n=>n?cc(n):cc,Nw=n=>{const t=oa()(()=>n),{getState:e,setState:r,subscribe:i}=t,o={refresh:async s=>{const{limit:a=1e3,offset:l=0}=s??{},u=e().status??"";return fetch(`/agent-scheduler/v1/history?status=${u}&limit=${a}&offset=${l}`).then(c=>c.json()).then(c=>(r({...c}),c))},onFilterStatus:s=>{r({status:s}),o.refresh()},bookmarkTask:async(s,a)=>fetch(`/agent-scheduler/v1/task/${s}/${a?"bookmark":"unbookmark"}`,{method:"POST"}).then(l=>l.json()),renameTask:async(s,a)=>fetch(`/agent-scheduler/v1/task/${s}/rename?name=${encodeURIComponent(a)}`,{method:"POST",headers:{"Content-Type":"application/json"}}).then(l=>l.json()),requeueTask:async s=>fetch(`/agent-scheduler/v1/task/${s}/requeue`,{method:"POST"}).then(a=>a.json()),requeueFailedTasks:async()=>fetch("/agent-scheduler/v1/task/requeue-failed",{method:"POST"}).then(s=>(o.refresh(),s.json())),clearHistory:async()=>fetch("/agent-scheduler/v1/history/clear",{method:"POST"}).then(s=>(o.refresh(),s.json()))};return{getState:e,setState:r,subscribe:i,...o}},Gw=n=>{const t=oa()(()=>n),{getState:e,setState:r,subscribe:i}=t,o={refresh:async()=>fetch("/agent-scheduler/v1/queue?limit=1000").then(s=>s.json()).then(r),exportQueue:async()=>fetch("/agent-scheduler/v1/export").then(s=>s.json()),importQueue:async s=>fetch("/agent-scheduler/v1/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:s})}).then(l=>l.json()).then(l=>(setTimeout(()=>{o.refresh()},3e3),l)),pauseQueue:async()=>fetch("/agent-scheduler/v1/queue/pause",{method:"POST"}).then(s=>s.json()).then(s=>(setTimeout(()=>{o.refresh()},500),s)),resumeQueue:async()=>fetch("/agent-scheduler/v1/queue/resume",{method:"POST"}).then(s=>s.json()).then(s=>(setTimeout(()=>{o.refresh()},500),s)),clearQueue:async()=>fetch("/agent-scheduler/v1/queue/clear",{method:"POST"}).then(s=>s.json()).then(s=>(o.refresh(),s)),runTask:async s=>fetch(`/agent-scheduler/v1/task/${s}/run`,{method:"POST"}).then(a=>a.json()).then(a=>(setTimeout(()=>{o.refresh()},500),a)),moveTask:async(s,a)=>fetch(`/agent-scheduler/v1/task/${s}/move/${a}`,{method:"POST"}).then(l=>l.json()).then(l=>(o.refresh(),l)),updateTask:async(s,a)=>{const l={name:a.name,checkpoint:a.params.checkpoint,params:{prompt:a.params.prompt,negative_prompt:a.params.negative_prompt,sampler_name:a.params.sampler_name,steps:a.params.steps,cfg_scale:a.params.cfg_scale}};return fetch(`/agent-scheduler/v1/task/${s}`,{method:"PUT",body:JSON.stringify(l),headers:{"Content-Type":"application/json"}}).then(u=>u.json())},deleteTask:async s=>fetch(`/agent-scheduler/v1/task/${s}`,{method:"DELETE"}).then(a=>a.json())};return{getState:e,setState:r,subscribe:i,...o}},Vw=n=>{const t=oa(()=>n),{getState:e,setState:r,subscribe:i}=t;return{getState:e,setState:r,subscribe:i,...{setSelectedTab:s=>{r({selectedTab:s})},getSamplers:async()=>fetch("/agent-scheduler/v1/samplers").then(s=>s.json()),getCheckpoints:async()=>fetch("/agent-scheduler/v1/sd-models").then(s=>s.json())}}};let $o;const lt=Vw({uiAsTab:!0,selectedTab:"pending"}),Et=Gw({current_task_id:null,total_pending_tasks:0,pending_tasks:[],paused:!1}),Ko=Nw({total:0,tasks:[]}),pc=[],dc=["System"],Cr={defaultColDef:{sortable:!1,filter:!0,resizable:!0,suppressMenu:!0},columnDefs:[{field:"name",headerName:"Task Id",cellDataType:"text",minWidth:240,maxWidth:240,pinned:"left",rowDrag:!0,valueGetter:({data:n})=>(n==null?void 0:n.name)??(n==null?void 0:n.id),cellClass:({data:n})=>{if(n!=null)return["cursor-pointer",`task-${n.status}`]}},{field:"type",headerName:"Type",minWidth:80,maxWidth:80,editable:!1},{field:"editing",editable:!1,hide:!0},{headerName:"Params",children:[{field:"params.prompt",headerName:"Prompt",cellDataType:"text",minWidth:200,maxWidth:400,autoHeight:!0,wrapText:!0,cellClass:"wrap-cell"},{field:"params.negative_prompt",headerName:"Negative Prompt",cellDataType:"text",minWidth:200,maxWidth:400,autoHeight:!0,wrapText:!0,cellClass:"wrap-cell"},{field:"params.checkpoint",headerName:"Checkpoint",cellDataType:"text",minWidth:150,maxWidth:300,valueFormatter:({value:n})=>n??"System",cellEditor:"agSelectCellEditor",cellEditorParams:()=>({values:dc})},{field:"params.sampler_name",headerName:"Sampler",cellDataType:"text",width:150,minWidth:150,cellEditor:"agSelectCellEditor",cellEditorParams:()=>({values:pc})},{field:"params.steps",headerName:"Steps",cellDataType:"number",minWidth:80,maxWidth:80,filter:"agNumberColumnFilter",cellEditor:"agNumberCellEditor",cellEditorParams:{min:1,max:150,precision:0,step:1}},{field:"params.cfg_scale",headerName:"CFG Scale",cellDataType:"number",width:100,minWidth:100,filter:"agNumberColumnFilter",cellEditor:"agNumberCellEditor",cellEditorParams:{min:1,max:30,precision:1,step:.5}},{field:"params.size",headerName:"Size",minWidth:110,maxWidth:110,editable:!1,valueGetter:({data:n})=>{const t=n==null?void 0:n.params;return t!=null?`${t.width} × ${t.height}`:void 0}},{field:"params.batch",headerName:"Batching",minWidth:100,maxWidth:100,editable:!1,valueGetter:({data:n})=>{const t=n==null?void 0:n.params;return t!=null?`${t.batch_size} × ${t.n_iter}`:"1 × 1"}}]},{field:"created_at",headerName:"Queued At",minWidth:180,editable:!1,valueFormatter:({value:n})=>n!=null?new Date(n).toLocaleString(document.documentElement.lang):""},{field:"updated_at",headerName:"Updated At",minWidth:180,editable:!1,valueFormatter:({value:n})=>n!=null?new Date(n).toLocaleString(document.documentElement.lang):""}],getRowId:({data:n})=>n.id,rowSelection:"single",animateRows:!0,pagination:!0,paginationAutoPageSize:!0,suppressCopyRowsToClipboard:!0,enableBrowserTooltips:!0};function hc(n){const t=gradioApp().querySelector(n);if(t==null)throw new Error(`Search container '${n}' not found.`);const e=t.getElementsByTagName("input")[0];if(e==null)throw new Error("Search input not found.");e.classList.add("ts-search-input");const r=document.createElement("div");return r.className="ts-search-icon",r.innerHTML=bw,e.parentElement.appendChild(r),e}async function Me(n){if($o==null){const t=await Promise.resolve().then(()=>Uw);$o=new t.Notyf({position:{x:"center",y:"bottom"},duration:3e3})}n.success?$o.success(n.message):$o.error(n.message)}window.notify=Me,window.origRandomId=window.randomId;function fc(n,t,e){if(Object.keys(opts).length===0){setTimeout(()=>fc(n,t,e),500);return}const r=xw(requestProgress),i=gradioApp().querySelector("#agent_scheduler_current_task_images");if(r.includes("progressbarContainer"))requestProgress(n,i,i,e);else{const o=document.createElement("div");o.className="progressDiv",i.parentElement.insertBefore(o,i),requestProgress(n,i,i,()=>{o.remove(),e()},s=>{const a=`${Math.round(s.progress*100)}%`,l=s.paused?"Paused":`ETA: ${Math.round(s.eta)}s`;o.innerText=`${a} ${l}`,o.style.background=`linear-gradient(to right, var(--primary-500) 0%, var(--primary-800) ${a}, var(--neutral-700) ${a})`})}window.randomId=()=>n,t==="txt2img"?submit():t==="img2img"&&submit_img2img(),window.randomId=window.origRandomId}function Hw(){const n=l=>{const u=gradioApp().querySelector(`#${l?"img2img_enqueue_wrapper":"txt2img_enqueue_wrapper"} input`);if(u!=null){const p=u.value;if(p==="Runtime Checkpoint"||p!=="Current Checkpoint")return p}const c=gradioApp().querySelector("#setting_sd_model_checkpoint input");return(c==null?void 0:c.value)??"Current Checkpoint"},t=gradioApp().querySelector("#txt2img_enqueue");window.submit_enqueue=(...l)=>{const u=create_submit_args(l);return u[0]=n(!1),u[1]=randomId(),window.randomId=window.origRandomId,t!=null&&(t.innerText="Queued",setTimeout(()=>{t.innerText="Enqueue",lt.getState().uiAsTab||lt.getState().selectedTab==="pending"&&Et.refresh()},1e3)),u};const e=gradioApp().querySelector("#img2img_enqueue");window.submit_enqueue_img2img=(...l)=>{const u=create_submit_args(l);return u[0]=n(!0),u[1]=randomId(),u[2]=get_tab_index("mode_img2img"),window.randomId=window.origRandomId,e!=null&&(e.innerText="Queued",setTimeout(()=>{e.innerText="Enqueue",lt.getState().uiAsTab||lt.getState().selectedTab==="pending"&&Et.refresh()},1e3)),u};const r=gradioApp().querySelector(".interrogate-col");r!=null&&r.childElementCount>2&&r.classList.add("has-queue-button");const i=gradioApp().querySelector("#setting_queue_keyboard_shortcut textarea");if(!i.value.includes("Disabled")){const l=i.value.split("+"),u=l.pop(),c=h=>{if(h.code!==u||l.includes("Shift")&&!h.shiftKey||l.includes("Alt")&&!h.altKey||l.includes("Command")&&!h.metaKey||(l.includes("Control")||l.includes("Ctrl"))&&!h.ctrlKey)return;h.preventDefault(),h.stopPropagation();const v=get_tab_index("tabs");v===0?t.click():v===1&&e.click()};window.addEventListener("keydown",c),gradioApp().querySelector("#txt2img_prompt textarea").addEventListener("keydown",c),gradioApp().querySelector("#img2img_prompt textarea").addEventListener("keydown",c)}Et.subscribe((l,u)=>{const c=l.current_task_id;if(c!==u.current_task_id&&c!=null){const p=l.pending_tasks.find(d=>d.id===c);fc(c,p==null?void 0:p.type,Et.refresh)}});const o=(l=!1)=>{const u=prompt("Enter task name");window.randomId=()=>u??window.origRandomId(),l?e.click():t.click()},s=(l=!1)=>{window.randomId=()=>"$$_queue_with_all_checkpoints_$$",l?e.click():t.click()};appendContextMenuOption("#txt2img_enqueue","Queue with task name",()=>o()),appendContextMenuOption("#txt2img_enqueue","Queue with all checkpoints",()=>s()),appendContextMenuOption("#img2img_enqueue","Queue with task name",()=>o(!0)),appendContextMenuOption("#img2img_enqueue","Queue with all checkpoints",()=>s(!0));const a=window.modalSaveImage;window.modalSaveImage=l=>{gradioApp().querySelector("#tab_agent_scheduler").style.display!=="none"?(gradioApp().querySelector("#agent_scheduler_save").click(),l.preventDefault()):a(l)}}function Bw(){lt.subscribe((e,r)=>{(!e.uiAsTab||e.selectedTab!==r.selectedTab)&&(e.selectedTab==="pending"?Et.refresh():Ko.refresh())});const n=new MutationObserver(e=>{e.forEach(r=>{const i=r.target;if(i.style.display!=="none")switch(i.id){case"tab_agent_scheduler":lt.getState().selectedTab==="pending"?Et.refresh():Ko.refresh();break;case"agent_scheduler_pending_tasks_tab":lt.setSelectedTab("pending");break;case"agent_scheduler_history_tab":lt.setSelectedTab("history");break}})}),t=gradioApp().querySelector("#tab_agent_scheduler");t!=null?n.observe(t,{attributeFilter:["style"]}):lt.setState({uiAsTab:!1}),n.observe(gradioApp().querySelector("#agent_scheduler_pending_tasks_tab"),{attributeFilter:["style"]}),n.observe(gradioApp().querySelector("#agent_scheduler_history_tab"),{attributeFilter:["style"]})}function kw(){const n=Et;lt.getSamplers().then(S=>pc.push(...S)),lt.getCheckpoints().then(S=>dc.push(...S)),gradioApp().querySelector("#agent_scheduler_action_reload").addEventListener("click",()=>n.refresh());const e=gradioApp().querySelector("#agent_scheduler_action_pause");e.addEventListener("click",()=>n.pauseQueue().then(Me));const r=gradioApp().querySelector("#agent_scheduler_action_resume");r.addEventListener("click",()=>n.resumeQueue().then(Me)),gradioApp().querySelector("#agent_scheduler_action_clear_queue").addEventListener("click",()=>{confirm("Are you sure you want to clear the queue?")&&n.clearQueue().then(Me)});const o=gradioApp().querySelector("#agent_scheduler_action_import"),s=gradioApp().querySelector("#agent_scheduler_import_file");o.addEventListener("click",()=>{s.click()}),s.addEventListener("change",S=>{if(S.target===null)return;const R=s.files;if(R==null||R.length===0)return;const T=R[0],F=new FileReader;F.onload=()=>{const A=F.result;n.importQueue(A).then(Me).then(()=>{s.value="",n.refresh()})},F.readAsText(T)}),gradioApp().querySelector("#agent_scheduler_action_export").addEventListener("click",()=>{n.exportQueue().then(S=>{const R="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(S)),T=document.createElement("a");T.setAttribute("href",R),T.setAttribute("download",`agent-scheduler-${Date.now()}.json`),T.click()})});const l=S=>{S.paused?(e.classList.add("hide","hidden"),r.classList.remove("hide","hidden")):(e.classList.remove("hide","hidden"),r.classList.add("hide","hidden"))};n.subscribe(l),l(n.getState());let u,c;const p=1.5*1e3,d=45/2,h=()=>{c!=null&&(clearTimeout(c),c=null)},v=(S,R)=>{if(u==null){h();return}const T=S.paginationGetPageSize()*S.paginationGetCurrentPage(),F=Math.min(S.paginationGetPageSize()*(S.paginationGetCurrentPage()+1)-1,S.getDisplayedRowCount()-1),A=u.rowIndex;if(A===T){if(ia(S,u,R)>d){h();return}c==null&&(c=setTimeout(()=>{S.paginationGetCurrentPage()>0&&(S.paginationGoToPreviousPage(),m(S)),c=null},p))}else if(A===F){if(ia(S,u,R)<u.rowHeight-d){h();return}c==null&&(c=setTimeout(()=>{S.paginationGetCurrentPage()<S.paginationGetTotalPages()-1&&(S.paginationGoToNextPage(),m(S)),c=null},p))}};let y;const C=()=>{h(),y=null,u!=null&&(u.setHighlighted(null),u=null)},m=(S,R)=>{if(R==null){if(y==null)return;R=y}else y=R;const T=Lw(S,R);if(T==null)return;const F=Iw(S,T,R);u!=null&&T.id!==u.id&&C(),T.setHighlighted(F),u=T,v(S,R)},w={...Cr,editType:"fullRow",defaultColDef:{...Cr.defaultColDef,editable:({data:S})=>(S==null?void 0:S.status)==="pending",cellDataType:!1},columnDefs:[{field:"priority",hide:!0,sort:"asc"},...Cr.columnDefs,{headerName:"Action",pinned:"right",minWidth:110,maxWidth:110,resizable:!1,editable:!1,valueGetter:({data:S})=>S==null?void 0:S.id,cellClass:"pending-actions",cellRenderer:({api:S,value:R,data:T})=>{if(T==null||R==null)return;const F=document.createElement("div");return F.innerHTML=`
|
||
<div class="inline-flex mt-1 edit-actions" role="group">
|
||
<button type="button" title="Save" class="ts-btn-action primary ts-btn-save">
|
||
${Aw}
|
||
</button>
|
||
<button type="button" title="Cancel" class="ts-btn-action secondary ts-btn-cancel">
|
||
${ac}
|
||
</button>
|
||
</div>
|
||
<div class="inline-flex mt-1 control-actions" role="group">
|
||
<button type="button" title="Run" class="ts-btn-action primary ts-btn-run"
|
||
${T.status==="running"?"disabled":""}>
|
||
${Pw}
|
||
</button>
|
||
<button type="button" title="${T.status==="pending"?"Delete":"Interrupt"}"
|
||
class="ts-btn-action stop ts-btn-delete">
|
||
${T.status==="pending"?lc:ac}
|
||
</button>
|
||
</div>
|
||
`,F.querySelector("button.ts-btn-save").addEventListener("click",()=>{S.showLoadingOverlay(),Et.updateTask(T.id,T).then(j=>{Me(j),S.hideOverlay(),S.stopEditing(!1)})}),F.querySelector("button.ts-btn-cancel").addEventListener("click",()=>S.stopEditing(!0)),F.querySelector("button.ts-btn-run").addEventListener("click",()=>{S.showLoadingOverlay(),n.runTask(R).then(()=>S.hideOverlay())}),F.querySelector("button.ts-btn-delete").addEventListener("click",()=>{S.showLoadingOverlay(),n.deleteTask(R).then(j=>{Me(j),S.applyTransaction({remove:[T]}),S.hideOverlay()})}),F}}],onColumnMoved:({api:S})=>{const R=S.getColumnState(),T=JSON.stringify(R);localStorage.setItem("agent_scheduler:queue_col_state",T)},onSortChanged:({api:S})=>{const R=S.getColumnState(),T=JSON.stringify(R);localStorage.setItem("agent_scheduler:queue_col_state",T)},onColumnResized:({api:S})=>{const R=S.getColumnState(),T=JSON.stringify(R);localStorage.setItem("agent_scheduler:queue_col_state",T)},onGridReady:({api:S})=>{hc("#agent_scheduler_action_search").addEventListener("keyup",uc(function(){S.updateGridOptions({quickFilterText:this.value})},200));const T=A=>{if(S.updateGridOptions({rowData:A.pending_tasks}),A.current_task_id!=null){const x=S.getRowNode(A.current_task_id);x!=null&&S.refreshCells({rowNodes:[x],force:!0})}S.clearFocusedCell(),S.autoSizeAllColumns()};n.subscribe(T),T(n.getState());const F=localStorage.getItem("agent_scheduler:queue_col_state");if(F!=null){const A=JSON.parse(F);S.applyColumnState({state:A,applyOrder:!0})}},onRowDragEnter:({api:S,y:R})=>m(S,R),onRowDragMove:({api:S,y:R})=>m(S,R),onRowDragLeave:()=>C(),onRowDragEnd:({api:S,node:R})=>{var ee,ie,J;const T=u;if(T==null){C();return}const F=(ee=R.data)==null?void 0:ee.id,A=(ie=T.data)==null?void 0:ie.id;if(F==null||A==null||F===A){C();return}let x=-1,G=-1;const N=[...n.getState().pending_tasks].sort((te,X)=>te.priority-X.priority);for(let te=0;te<N.length&&(N[te].id===F&&(x=te),N[te].id===A&&(G=te),!(x!==-1&&G!==-1));te++);if(x===-1||G===-1){C();return}if(T.highlighted===Xe.Below&&(G+=1),G===x||G===x+1){C();return}const j=((J=N[G])==null?void 0:J.id)??"bottom";S.showLoadingOverlay(),n.moveTask(F,j).then(()=>{C(),S.hideOverlay()})},onRowEditingStarted:({api:S,data:R,node:T})=>{R!=null&&(T.setDataValue("editing",!0),S.refreshCells({rowNodes:[T],force:!0}))},onRowEditingStopped:({api:S,data:R,node:T})=>{R!=null&&(T.setDataValue("editing",!1),S.refreshCells({rowNodes:[T],force:!0}))},onRowValueChanged:({api:S,data:R})=>{R!=null&&(S.showLoadingOverlay(),Et.updateTask(R.id,R).then(T=>{Me(T),S.hideOverlay()}))}},E=gradioApp().querySelector("#agent_scheduler_pending_tasks_grid");if(typeof E.dataset.pageSize=="string"){const S=parseInt(E.dataset.pageSize,10);S>0&&(w.paginationAutoPageSize=!1,w.paginationPageSize=S)}ec(E,w)}function Ww(){const n=Ko;gradioApp().querySelector("#agent_scheduler_action_refresh_history").addEventListener("click",()=>n.refresh()),gradioApp().querySelector("#agent_scheduler_action_clear_history").addEventListener("click",()=>{confirm("Are you sure you want to clear the history?")&&n.clearHistory().then(Me)}),gradioApp().querySelector("#agent_scheduler_action_requeue").addEventListener("click",()=>{n.requeueFailedTasks().then(Me)});const i=gradioApp().querySelector("#agent_scheduler_history_selected_task textarea"),o=gradioApp().querySelector("#agent_scheduler_history_selected_image textarea");gradioApp().querySelector("#agent_scheduler_history_gallery").addEventListener("click",u=>{const c=u.target;if((c==null?void 0:c.tagName)==="IMG"){const p=Array.prototype.indexOf.call(c.parentElement.parentElement.children,c.parentElement);o.value=p.toString(),o.dispatchEvent(new Event("input",{bubbles:!0}))}}),window.agent_scheduler_status_filter_changed=u=>{n.onFilterStatus(u==null?void 0:u.toLowerCase())};const a={...Cr,readOnlyEdit:!0,defaultColDef:{...Cr.defaultColDef,sortable:!0,editable:({colDef:u})=>(u==null?void 0:u.field)==="name"},columnDefs:[{headerName:"",field:"bookmarked",minWidth:55,maxWidth:55,pinned:"left",sort:"desc",tooltipValueGetter:({value:u})=>u===!0?"Unbookmark":"Bookmark",cellClass:({value:u})=>["cursor-pointer","pt-3",u===!0?"ts-bookmarked":"ts-bookmark"],cellRenderer:({value:u})=>u===!0?Tw:Ow,onCellClicked:({api:u,data:c,value:p,event:d})=>{if(c==null)return;d!=null&&(d.stopPropagation(),d.preventDefault());const h=p===!0;n.bookmarkTask(c.id,!h).then(v=>{Me(v),u.applyTransaction({update:[{...c,bookmarked:!h}]})})}},{field:"priority",hide:!0,sort:"desc"},{...Cr.columnDefs[0],rowDrag:!1},...Cr.columnDefs.slice(1),{headerName:"Action",pinned:"right",minWidth:110,maxWidth:110,resizable:!1,valueGetter:({data:u})=>u==null?void 0:u.id,cellRenderer:({api:u,data:c,value:p})=>{if(c==null||p==null)return;const d=document.createElement("div");return d.innerHTML=`
|
||
<div class="inline-flex mt-1" role="group">
|
||
<button type="button" title="Requeue" class="ts-btn-action primary ts-btn-run">
|
||
${Dw}
|
||
</button>
|
||
<button type="button" title="Delete" class="ts-btn-action stop ts-btn-delete">
|
||
${lc}
|
||
</button>
|
||
</div>
|
||
`,d.querySelector("button.ts-btn-run").addEventListener("click",y=>{y.preventDefault(),y.stopPropagation(),n.requeueTask(p).then(Me)}),d.querySelector("button.ts-btn-delete").addEventListener("click",y=>{y.preventDefault(),y.stopPropagation(),u.showLoadingOverlay(),Et.deleteTask(p).then(C=>{Me(C),u.applyTransaction({remove:[c]}),u.hideOverlay()})}),d}}],rowSelection:"single",suppressRowDeselection:!0,onColumnMoved:({api:u})=>{const c=u.getColumnState(),p=JSON.stringify(c);localStorage.setItem("agent_scheduler:history_col_state",p)},onSortChanged:({api:u})=>{const c=u.getColumnState(),p=JSON.stringify(c);localStorage.setItem("agent_scheduler:history_col_state",p)},onColumnResized:({api:u})=>{const c=u.getColumnState(),p=JSON.stringify(c);localStorage.setItem("agent_scheduler:history_col_state",p)},onGridReady:({api:u})=>{hc("#agent_scheduler_action_search_history").addEventListener("keyup",uc(function(){u.updateGridOptions({quickFilterText:this.value})},200));const p=h=>{u.updateGridOptions({rowData:h.tasks}),u.clearFocusedCell(),u.autoSizeAllColumns()};n.subscribe(p),p(n.getState());const d=localStorage.getItem("agent_scheduler:history_col_state");if(d!=null){const h=JSON.parse(d);u.applyColumnState({state:h,applyOrder:!0})}},onSelectionChanged:({api:u})=>{const[c]=u.getSelectedRows();i.value=c.id,i.dispatchEvent(new Event("input",{bubbles:!0}))},onCellEditRequest:({api:u,data:c,colDef:p,newValue:d})=>{if(p.field!=="name")return;const h=d;h!=null&&(u.showLoadingOverlay(),Ko.renameTask(c.id,h).then(v=>{Me(v);const y={...c,name:h};u.applyTransaction({update:[y]}),u.hideOverlay()}))}},l=gradioApp().querySelector("#agent_scheduler_history_tasks_grid");if(typeof l.dataset.pageSize=="string"){const u=parseInt(l.dataset.pageSize,10);u>0&&(a.paginationAutoPageSize=!1,a.paginationPageSize=u)}ec(l,a)}let vc=!1;onUiLoaded(function n(){if(gradioApp().querySelector("#agent_scheduler_tabs")==null){setTimeout(n,500);return}vc||(Hw(),Bw(),kw(),Ww(),vc=!0)});/*! *****************************************************************************
|
||
Copyright (c) Microsoft Corporation.
|
||
|
||
Permission to use, copy, modify, and/or distribute this software for any
|
||
purpose with or without fee is hereby granted.
|
||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
PERFORMANCE OF THIS SOFTWARE.
|
||
***************************************************************************** */var et=function(){return et=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},et.apply(this,arguments)},gc=function(){function n(t){this.options=t,this.listeners={}}return n.prototype.on=function(t,e){var r=this.listeners[t]||[];this.listeners[t]=r.concat([e])},n.prototype.triggerEvent=function(t,e){var r=this,i=this.listeners[t]||[];i.forEach(function(o){return o({target:r,event:e})})},n}(),mr;(function(n){n[n.Add=0]="Add",n[n.Remove=1]="Remove"})(mr||(mr={}));var yc=function(){function n(){this.notifications=[]}return n.prototype.push=function(t){this.notifications.push(t),this.updateFn(t,mr.Add,this.notifications)},n.prototype.splice=function(t,e){var r=this.notifications.splice(t,e)[0];return this.updateFn(r,mr.Remove,this.notifications),r},n.prototype.indexOf=function(t){return this.notifications.indexOf(t)},n.prototype.onUpdate=function(t){this.updateFn=t},n}(),Dt;(function(n){n.Dismiss="dismiss",n.Click="click"})(Dt||(Dt={}));var na={types:[{type:"success",className:"notyf__toast--success",backgroundColor:"#3dc763",icon:{className:"notyf__icon--success",tagName:"i"}},{type:"error",className:"notyf__toast--error",backgroundColor:"#ed3d3d",icon:{className:"notyf__icon--error",tagName:"i"}}],duration:2e3,ripple:!0,position:{x:"right",y:"bottom"},dismissible:!1},Cc=function(){function n(){this.notifications=[],this.events={},this.X_POSITION_FLEX_MAP={left:"flex-start",center:"center",right:"flex-end"},this.Y_POSITION_FLEX_MAP={top:"flex-start",center:"center",bottom:"flex-end"};var t=document.createDocumentFragment(),e=this._createHTMLElement({tagName:"div",className:"notyf"});t.appendChild(e),document.body.appendChild(t),this.container=e,this.animationEndEventName=this._getAnimationEndEventName(),this._createA11yContainer()}return n.prototype.on=function(t,e){var r;this.events=et(et({},this.events),(r={},r[t]=e,r))},n.prototype.update=function(t,e){e===mr.Add?this.addNotification(t):e===mr.Remove&&this.removeNotification(t)},n.prototype.removeNotification=function(t){var e=this,r=this._popRenderedNotification(t),i;if(r){i=r.node,i.classList.add("notyf__toast--disappear");var o;i.addEventListener(this.animationEndEventName,o=function(s){s.target===i&&(i.removeEventListener(e.animationEndEventName,o),e.container.removeChild(i))})}},n.prototype.addNotification=function(t){var e=this._renderNotification(t);this.notifications.push({notification:t,node:e}),this._announce(t.options.message||"Notification")},n.prototype._renderNotification=function(t){var e,r=this._buildNotificationCard(t),i=t.options.className;return i&&(e=r.classList).add.apply(e,i.split(" ")),this.container.appendChild(r),r},n.prototype._popRenderedNotification=function(t){for(var e=-1,r=0;r<this.notifications.length&&e<0;r++)this.notifications[r].notification===t&&(e=r);if(e!==-1)return this.notifications.splice(e,1)[0]},n.prototype.getXPosition=function(t){var e;return((e=t==null?void 0:t.position)===null||e===void 0?void 0:e.x)||"right"},n.prototype.getYPosition=function(t){var e;return((e=t==null?void 0:t.position)===null||e===void 0?void 0:e.y)||"bottom"},n.prototype.adjustContainerAlignment=function(t){var e=this.X_POSITION_FLEX_MAP[this.getXPosition(t)],r=this.Y_POSITION_FLEX_MAP[this.getYPosition(t)],i=this.container.style;i.setProperty("justify-content",r),i.setProperty("align-items",e)},n.prototype._buildNotificationCard=function(t){var e=this,r=t.options,i=r.icon;this.adjustContainerAlignment(r);var o=this._createHTMLElement({tagName:"div",className:"notyf__toast"}),s=this._createHTMLElement({tagName:"div",className:"notyf__ripple"}),a=this._createHTMLElement({tagName:"div",className:"notyf__wrapper"}),l=this._createHTMLElement({tagName:"div",className:"notyf__message"});l.innerHTML=r.message||"";var u=r.background||r.backgroundColor;if(i){var c=this._createHTMLElement({tagName:"div",className:"notyf__icon"});if((typeof i=="string"||i instanceof String)&&(c.innerHTML=new String(i).valueOf()),typeof i=="object"){var p=i.tagName,d=p===void 0?"i":p,h=i.className,v=i.text,y=i.color,C=y===void 0?u:y,m=this._createHTMLElement({tagName:d,className:h,text:v});C&&(m.style.color=C),c.appendChild(m)}a.appendChild(c)}if(a.appendChild(l),o.appendChild(a),u&&(r.ripple?(s.style.background=u,o.appendChild(s)):o.style.background=u),r.dismissible){var w=this._createHTMLElement({tagName:"div",className:"notyf__dismiss"}),E=this._createHTMLElement({tagName:"button",className:"notyf__dismiss-btn"});w.appendChild(E),a.appendChild(w),o.classList.add("notyf__toast--dismissible"),E.addEventListener("click",function(R){var T,F;(F=(T=e.events)[Dt.Dismiss])===null||F===void 0||F.call(T,{target:t,event:R}),R.stopPropagation()})}o.addEventListener("click",function(R){var T,F;return(F=(T=e.events)[Dt.Click])===null||F===void 0?void 0:F.call(T,{target:t,event:R})});var S=this.getYPosition(r)==="top"?"upper":"lower";return o.classList.add("notyf__toast--"+S),o},n.prototype._createHTMLElement=function(t){var e=t.tagName,r=t.className,i=t.text,o=document.createElement(e);return r&&(o.className=r),o.textContent=i||null,o},n.prototype._createA11yContainer=function(){var t=this._createHTMLElement({tagName:"div",className:"notyf-announcer"});t.setAttribute("aria-atomic","true"),t.setAttribute("aria-live","polite"),t.style.border="0",t.style.clip="rect(0 0 0 0)",t.style.height="1px",t.style.margin="-1px",t.style.overflow="hidden",t.style.padding="0",t.style.position="absolute",t.style.width="1px",t.style.outline="0",document.body.appendChild(t),this.a11yContainer=t},n.prototype._announce=function(t){var e=this;this.a11yContainer.textContent="",setTimeout(function(){e.a11yContainer.textContent=t},100)},n.prototype._getAnimationEndEventName=function(){var t=document.createElement("_fake"),e={MozTransition:"animationend",OTransition:"oAnimationEnd",WebkitTransition:"webkitAnimationEnd",transition:"animationend"},r;for(r in e)if(t.style[r]!==void 0)return e[r];return"animationend"},n}(),jw=function(){function n(t){var e=this;this.dismiss=this._removeNotification,this.notifications=new yc,this.view=new Cc;var r=this.registerTypes(t);this.options=et(et({},na),t),this.options.types=r,this.notifications.onUpdate(function(i,o){return e.view.update(i,o)}),this.view.on(Dt.Dismiss,function(i){var o=i.target,s=i.event;e._removeNotification(o),o.triggerEvent(Dt.Dismiss,s)}),this.view.on(Dt.Click,function(i){var o=i.target,s=i.event;return o.triggerEvent(Dt.Click,s)})}return n.prototype.error=function(t){var e=this.normalizeOptions("error",t);return this.open(e)},n.prototype.success=function(t){var e=this.normalizeOptions("success",t);return this.open(e)},n.prototype.open=function(t){var e=this.options.types.find(function(o){var s=o.type;return s===t.type})||{},r=et(et({},e),t);this.assignProps(["ripple","position","dismissible"],r);var i=new gc(r);return this._pushNotification(i),i},n.prototype.dismissAll=function(){for(;this.notifications.splice(0,1););},n.prototype.assignProps=function(t,e){var r=this;t.forEach(function(i){e[i]=e[i]==null?r.options[i]:e[i]})},n.prototype._pushNotification=function(t){var e=this;this.notifications.push(t);var r=t.options.duration!==void 0?t.options.duration:this.options.duration;r&&setTimeout(function(){return e._removeNotification(t)},r)},n.prototype._removeNotification=function(t){var e=this.notifications.indexOf(t);e!==-1&&this.notifications.splice(e,1)},n.prototype.normalizeOptions=function(t,e){var r={type:t};return typeof e=="string"?r.message=e:typeof e=="object"&&(r=et(et({},r),e)),r},n.prototype.registerTypes=function(t){var e=(t&&t.types||[]).slice(),r=na.types.map(function(i){var o=-1;e.forEach(function(a,l){a.type===i.type&&(o=l)});var s=o!==-1?e.splice(o,1)[0]:{};return et(et({},i),s)});return r.concat(e)},n}();const Uw=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_OPTIONS:na,Notyf:jw,NotyfArray:yc,get NotyfArrayEvent(){return mr},get NotyfEvent(){return Dt},NotyfNotification:gc,NotyfView:Cc},Symbol.toStringTag,{value:"Module"}))})();
|